mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-17 04:39:34 +00:00
Blackberry: remove invocation check from NativeApp (moved to native/).
LogoScreen: Don't take boot_filename as a parameter (no one uses it anyway) but check the global variable, boot_filename in case it was populated during initialisation, eg. Blackberry system message.
This commit is contained in:
parent
5490ed441a
commit
4e4657e94f
@ -356,12 +356,11 @@ void NativeInitGraphics()
|
||||
|
||||
screenManager = new ScreenManager();
|
||||
if (boot_filename.empty()) {
|
||||
screenManager->switchScreen(new LogoScreen(boot_filename));
|
||||
screenManager->switchScreen(new LogoScreen());
|
||||
} else {
|
||||
// Go directly into the game.
|
||||
screenManager->switchScreen(new EmuScreen(boot_filename));
|
||||
}
|
||||
// screenManager->switchScreen(new FileSelectScreen());
|
||||
|
||||
UIShader_Init();
|
||||
|
||||
|
@ -266,8 +266,8 @@ void NewLanguageScreen::OnCompleted(DialogResult result) {
|
||||
void LogoScreen::Next() {
|
||||
if (!switched_) {
|
||||
switched_ = true;
|
||||
if (bootFilename_.size()) {
|
||||
screenManager()->switchScreen(new EmuScreen(bootFilename_));
|
||||
if (boot_filename.size()) {
|
||||
screenManager()->switchScreen(new EmuScreen(boot_filename));
|
||||
} else {
|
||||
screenManager()->switchScreen(new MainScreen());
|
||||
}
|
||||
@ -324,8 +324,8 @@ void LogoScreen::render() {
|
||||
dc.DrawText(temp, dp_xres / 2, dp_yres / 2 + 40, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
dc.DrawText(c->T("license", "Free Software under GPL 2.0"), dp_xres / 2, dp_yres / 2 + 70, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
dc.DrawText("www.ppsspp.org", dp_xres / 2, dp_yres / 2 + 130, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
if (bootFilename_.size()) {
|
||||
ui_draw2d.DrawTextShadow(UBUNTU24, bootFilename_.c_str(), dp_xres / 2, dp_yres / 2 + 180, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
if (boot_filename.size()) {
|
||||
ui_draw2d.DrawTextShadow(UBUNTU24, boot_filename.c_str(), dp_xres / 2, dp_yres / 2 + 180, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
}
|
||||
|
||||
dc.End();
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include "ui/ui_screen.h"
|
||||
#include "GPU/Common/PostShader.h"
|
||||
|
||||
extern std::string boot_filename;
|
||||
|
||||
inline void NoOpVoidBool(bool) {}
|
||||
|
||||
class UIScreenWithBackground : public UIScreen {
|
||||
@ -85,8 +87,8 @@ private:
|
||||
|
||||
class LogoScreen : public UIScreen {
|
||||
public:
|
||||
LogoScreen(const std::string &bootFilename)
|
||||
: bootFilename_(bootFilename), frames_(0), switched_(false) {}
|
||||
LogoScreen()
|
||||
: frames_(0), switched_(false) {}
|
||||
void key(const KeyInput &key);
|
||||
void update(InputState &input);
|
||||
void render();
|
||||
@ -95,7 +97,6 @@ public:
|
||||
|
||||
private:
|
||||
void Next();
|
||||
std::string bootFilename_;
|
||||
int frames_;
|
||||
bool switched_;
|
||||
};
|
||||
|
@ -85,11 +85,6 @@ static UI::Theme ui_theme;
|
||||
#include "ios/iOSCoreAudio.h"
|
||||
#endif
|
||||
|
||||
#ifdef BLACKBERRY
|
||||
#include <bps/navigator.h>
|
||||
#include <bps/navigator_invoke.h>
|
||||
#endif
|
||||
|
||||
Texture *uiTexture;
|
||||
|
||||
ScreenManager *screenManager;
|
||||
@ -420,29 +415,10 @@ void NativeInit(int argc, const char *argv[],
|
||||
|
||||
screenManager = new ScreenManager();
|
||||
|
||||
#ifdef BLACKBERRY
|
||||
// Check if the system has sent us any messages at runtime
|
||||
while (true) {
|
||||
bps_event_t *event = NULL;
|
||||
bps_get_event(&event, 0);
|
||||
if (event == NULL)
|
||||
break;
|
||||
// Were we opened to run a specific ROM?
|
||||
if (bps_event_get_domain(event) == navigator_get_domain() &&
|
||||
bps_event_get_code(event) == NAVIGATOR_INVOKE_TARGET) {
|
||||
const navigator_invoke_invocation_t *invoke = navigator_invoke_event_get_invocation(event);
|
||||
if(invoke) {
|
||||
boot_filename = navigator_invoke_invocation_get_uri(invoke)+7; // Remove file://
|
||||
skipLogo = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (skipLogo) {
|
||||
screenManager->switchScreen(new EmuScreen(boot_filename));
|
||||
} else {
|
||||
screenManager->switchScreen(new LogoScreen(boot_filename));
|
||||
screenManager->switchScreen(new LogoScreen());
|
||||
}
|
||||
|
||||
std::string sysName = System_GetProperty(SYSPROP_NAME);
|
||||
|
2
native
2
native
@ -1 +1 @@
|
||||
Subproject commit 045c24d0648da396a3feb3d7dd65293edda976af
|
||||
Subproject commit a02668cf8a0167104513ea4fddcf3fe0a8b5572c
|
Loading…
x
Reference in New Issue
Block a user