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
5 changed files with 11 additions and 35 deletions
|
@ -356,12 +356,11 @@ void NativeInitGraphics()
|
||||||
|
|
||||||
screenManager = new ScreenManager();
|
screenManager = new ScreenManager();
|
||||||
if (boot_filename.empty()) {
|
if (boot_filename.empty()) {
|
||||||
screenManager->switchScreen(new LogoScreen(boot_filename));
|
screenManager->switchScreen(new LogoScreen());
|
||||||
} else {
|
} else {
|
||||||
// Go directly into the game.
|
// Go directly into the game.
|
||||||
screenManager->switchScreen(new EmuScreen(boot_filename));
|
screenManager->switchScreen(new EmuScreen(boot_filename));
|
||||||
}
|
}
|
||||||
// screenManager->switchScreen(new FileSelectScreen());
|
|
||||||
|
|
||||||
UIShader_Init();
|
UIShader_Init();
|
||||||
|
|
||||||
|
|
|
@ -266,8 +266,8 @@ void NewLanguageScreen::OnCompleted(DialogResult result) {
|
||||||
void LogoScreen::Next() {
|
void LogoScreen::Next() {
|
||||||
if (!switched_) {
|
if (!switched_) {
|
||||||
switched_ = true;
|
switched_ = true;
|
||||||
if (bootFilename_.size()) {
|
if (boot_filename.size()) {
|
||||||
screenManager()->switchScreen(new EmuScreen(bootFilename_));
|
screenManager()->switchScreen(new EmuScreen(boot_filename));
|
||||||
} else {
|
} else {
|
||||||
screenManager()->switchScreen(new MainScreen());
|
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(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(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);
|
dc.DrawText("www.ppsspp.org", dp_xres / 2, dp_yres / 2 + 130, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||||
if (bootFilename_.size()) {
|
if (boot_filename.size()) {
|
||||||
ui_draw2d.DrawTextShadow(UBUNTU24, bootFilename_.c_str(), dp_xres / 2, dp_yres / 2 + 180, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
ui_draw2d.DrawTextShadow(UBUNTU24, boot_filename.c_str(), dp_xres / 2, dp_yres / 2 + 180, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
dc.End();
|
dc.End();
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
#include "ui/ui_screen.h"
|
#include "ui/ui_screen.h"
|
||||||
#include "GPU/Common/PostShader.h"
|
#include "GPU/Common/PostShader.h"
|
||||||
|
|
||||||
|
extern std::string boot_filename;
|
||||||
|
|
||||||
inline void NoOpVoidBool(bool) {}
|
inline void NoOpVoidBool(bool) {}
|
||||||
|
|
||||||
class UIScreenWithBackground : public UIScreen {
|
class UIScreenWithBackground : public UIScreen {
|
||||||
|
@ -85,8 +87,8 @@ private:
|
||||||
|
|
||||||
class LogoScreen : public UIScreen {
|
class LogoScreen : public UIScreen {
|
||||||
public:
|
public:
|
||||||
LogoScreen(const std::string &bootFilename)
|
LogoScreen()
|
||||||
: bootFilename_(bootFilename), frames_(0), switched_(false) {}
|
: frames_(0), switched_(false) {}
|
||||||
void key(const KeyInput &key);
|
void key(const KeyInput &key);
|
||||||
void update(InputState &input);
|
void update(InputState &input);
|
||||||
void render();
|
void render();
|
||||||
|
@ -95,7 +97,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Next();
|
void Next();
|
||||||
std::string bootFilename_;
|
|
||||||
int frames_;
|
int frames_;
|
||||||
bool switched_;
|
bool switched_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -85,11 +85,6 @@ static UI::Theme ui_theme;
|
||||||
#include "ios/iOSCoreAudio.h"
|
#include "ios/iOSCoreAudio.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BLACKBERRY
|
|
||||||
#include <bps/navigator.h>
|
|
||||||
#include <bps/navigator_invoke.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Texture *uiTexture;
|
Texture *uiTexture;
|
||||||
|
|
||||||
ScreenManager *screenManager;
|
ScreenManager *screenManager;
|
||||||
|
@ -420,29 +415,10 @@ void NativeInit(int argc, const char *argv[],
|
||||||
|
|
||||||
screenManager = new ScreenManager();
|
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) {
|
if (skipLogo) {
|
||||||
screenManager->switchScreen(new EmuScreen(boot_filename));
|
screenManager->switchScreen(new EmuScreen(boot_filename));
|
||||||
} else {
|
} else {
|
||||||
screenManager->switchScreen(new LogoScreen(boot_filename));
|
screenManager->switchScreen(new LogoScreen());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string sysName = System_GetProperty(SYSPROP_NAME);
|
std::string sysName = System_GetProperty(SYSPROP_NAME);
|
||||||
|
|
2
native
2
native
|
@ -1 +1 @@
|
||||||
Subproject commit 045c24d0648da396a3feb3d7dd65293edda976af
|
Subproject commit a02668cf8a0167104513ea4fddcf3fe0a8b5572c
|
Loading…
Add table
Add a link
Reference in a new issue