mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
Hide "immersive mode" on pre-kitkat Android.
This commit is contained in:
1 parent
358050800f
commit
39cde7fc48
6 files changed
+16
-2
No files matched your search
@@ -126,8 +126,12 @@ void GameSettingsScreen::CreateViews() {
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bSmallDisplay, gs->T("Small Display")));
|
||||
if (pixel_xres < pixel_yres * 1.3) // Smaller than 4:3
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bPartialStretch, gs->T("Partial Vertical Stretch")));
|
||||
|
||||
#ifdef ANDROID
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bImmersiveMode, gs->T("Immersive Mode")))->OnClick.Handle(this, &GameSettingsScreen::OnImmersiveModeChange);
|
||||
// Hide Immersive Mode on pre-kitkat Android
|
||||
if (System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= 19) {
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bImmersiveMode, gs->T("Immersive Mode")))->OnClick.Handle(this, &GameSettingsScreen::OnImmersiveModeChange);
|
||||
}
|
||||
#endif
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Performance")));
|
||||
@@ -441,6 +445,8 @@ UI::EventReturn GameSettingsScreen::OnScreenRotation(UI::EventParams &e) {
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnImmersiveModeChange(UI::EventParams &e) {
|
||||
System_SendMessage("immersive", "");
|
||||
if (g_Config.iAndroidHwScale != 0)
|
||||
System_SendMessage("recreate", "");
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
|
||||
@@ -169,6 +169,10 @@ std::string System_GetProperty(SystemProperty prop) {
|
||||
}
|
||||
}
|
||||
|
||||
int System_GetPropertyInt(SystemProperty prop) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
void System_SendMessage(const char *command, const char *parameter) {
|
||||
if (!strcmp(command, "finish")) {
|
||||
PostMessage(MainWindow::GetHWND(), WM_CLOSE, 0, 0);
|
||||
|
||||
@@ -73,6 +73,7 @@ void NativeRender() { }
|
||||
void NativeResized() { }
|
||||
|
||||
std::string System_GetProperty(SystemProperty prop) { return ""; }
|
||||
int System_GetPropertyInt(SystemProperty prop) { return -1; }
|
||||
void System_SendMessage(const char *command, const char *parameter) {}
|
||||
bool System_InputBoxGetWString(const wchar_t *title, const std::wstring &defaultvalue, std::wstring &outvalue) { return false; }
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ std::string System_GetProperty(SystemProperty prop) {
|
||||
}
|
||||
}
|
||||
|
||||
int System_GetPropertyInt(SystemProperty prop) { return -1; }
|
||||
|
||||
void System_SendMessage(const char *command, const char *parameter) {
|
||||
if (!strcmp(command, "finish")) {
|
||||
exit(0);
|
||||
|
||||
+1
-1
Submodule native updated: ed04a0bf28...1bc2fef02c.
@@ -48,6 +48,7 @@
|
||||
#define RET(a) if (!(a)) { return false; }
|
||||
|
||||
std::string System_GetProperty(SystemProperty prop) { return ""; }
|
||||
int System_GetPropertyInt(SystemProperty prop) { return -1; }
|
||||
|
||||
#define M_PI_2 1.57079632679489661923
|
||||
|
||||
|
||||
Reference in new issue
Block a user