diff --git a/Core/Config.cpp b/Core/Config.cpp index f2ee5c3203..d71d950adb 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -257,6 +257,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { graphics->Get("PartialStretch", &bPartialStretch, partialStretchDefault); graphics->Get("StretchToDisplay", &bStretchToDisplay, false); graphics->Get("SmallDisplay", &bSmallDisplay, false); + graphics->Get("ImmersiveMode", &bImmersiveMode, false); graphics->Get("TrueColor", &bTrueColor, true); @@ -571,6 +572,7 @@ void Config::Save() { graphics->Set("PartialStretch", bPartialStretch); graphics->Set("StretchToDisplay", bStretchToDisplay); graphics->Set("SmallDisplay", bSmallDisplay); + graphics->Set("ImmersiveMode", bImmersiveMode); graphics->Set("TrueColor", bTrueColor); graphics->Set("MipMap", bMipMap); graphics->Set("TexScalingLevel", iTexScalingLevel); diff --git a/Core/Config.h b/Core/Config.h index 7b0085ec42..13935c4a20 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -101,6 +101,7 @@ public: bool bPartialStretch; bool bStretchToDisplay; bool bSmallDisplay; // Useful on large tablets with touch controls to not overlap the image. Temporary setting - will be replaced by more comprehensive display size settings. + bool bImmersiveMode; // Mode on Android Kitkat 4.4 that hides the back button etc. bool bVSync; int iFrameSkip; bool bAutoFrameSkip; diff --git a/Core/Debugger/SymbolMap.cpp b/Core/Debugger/SymbolMap.cpp index 9af74a11e8..aea9f40153 100644 --- a/Core/Debugger/SymbolMap.cpp +++ b/Core/Debugger/SymbolMap.cpp @@ -593,6 +593,7 @@ void SymbolMap::AssignFunctionIndices() { } void SymbolMap::UpdateActiveSymbols() { + return; lock_guard guard(lock_); std::map activeModuleIndexes; for (auto it = activeModuleEnds.begin(), end = activeModuleEnds.end(); it != end; ++it) { diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index fd882d3fde..33954ae5d8 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -128,10 +128,11 @@ 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"))); - graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gs->T("Mipmapping"))); +#ifdef ANDROID + graphicsSettings->Add(new CheckBox(&g_Config.bImmersiveMode, gs->T("Immersive Mode")))->OnClick.Handle(this, &GameSettingsScreen::OnImmersiveModeChange); +#endif graphicsSettings->Add(new ItemHeader(gs->T("Performance"))); - #ifndef MOBILE_DEVICE static const char *internalResolutions[] = {"Auto (1:1)", "1x PSP", "2x PSP", "3x PSP", "4x PSP", "5x PSP", "6x PSP", "7x PSP", "8x PSP", "9x PSP", "10x PSP" }; #else @@ -143,6 +144,7 @@ void GameSettingsScreen::CreateViews() { #ifdef _WIN32 graphicsSettings->Add(new CheckBox(&g_Config.bVSync, gs->T("VSync"))); #endif + graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gs->T("Mipmapping"))); graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gs->T("Hardware Transform"))); CheckBox *swSkin = graphicsSettings->Add(new CheckBox(&g_Config.bSoftwareSkinning, gs->T("Software Skinning"))); CheckBox *vtxCache = graphicsSettings->Add(new CheckBox(&g_Config.bVertexCache, gs->T("Vertex Cache"))); @@ -355,6 +357,11 @@ UI::EventReturn GameSettingsScreen::OnScreenRotation(UI::EventParams &e) { return UI::EVENT_DONE; } +UI::EventReturn GameSettingsScreen::OnImmersiveModeChange(UI::EventParams &e) { + System_SendMessage("immersive", ""); + return UI::EVENT_DONE; +} + UI::EventReturn GameSettingsScreen::OnRenderingMode(UI::EventParams &e) { // We do not want to report when rendering mode is Framebuffer to memory - so many issues // are caused by that (framebuffer copies overwriting display lists, etc). diff --git a/UI/GameSettingsScreen.h b/UI/GameSettingsScreen.h index 6db709e52b..e0c55270bb 100644 --- a/UI/GameSettingsScreen.h +++ b/UI/GameSettingsScreen.h @@ -72,6 +72,7 @@ private: UI::EventReturn OnRenderingMode(UI::EventParams &e); UI::EventReturn OnScreenRotation(UI::EventParams &e); + UI::EventReturn OnImmersiveModeChange(UI::EventParams &e); // Temporaries to convert bools to int settings bool cap60FPS_; diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 66dca8e56a..1d97bf5a88 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -943,7 +943,6 @@ UI::EventReturn MainScreen::OnForums(UI::EventParams &e) { UI::EventReturn MainScreen::OnExit(UI::EventParams &e) { System_SendMessage("event", "exitprogram"); NativeShutdown(); - exit(0); return UI::EVENT_DONE; } diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 1e55b9a1d5..48dc469c74 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -202,8 +202,9 @@ std::string NativeQueryConfig(std::string query) { if (query == "screenRotation") { char temp[128]; sprintf(temp, "%i", g_Config.iScreenRotation); - ILOG("Rotation queried: %s", temp); return temp; + } else if (query == "immersiveMode") { + return g_Config.bImmersiveMode ? "1" : "0"; } else { return ""; } @@ -793,11 +794,14 @@ void NativeShutdown() { #ifdef ANDROID_NDK_PROFILER moncleanup(); #endif + + ILOG("NativeShutdown called"); + + System_SendMessage("finish", ""); // This means that the activity has been completely destroyed. PPSSPP does not // boot up correctly with "dirty" global variables currently, so we hack around that // by simply exiting. #ifdef ANDROID - ILOG("NativeShutdown called"); exit(0); #endif diff --git a/native b/native index 0ba6299413..4ae715832e 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 0ba62994137392e447570b8f0eef8a819556fd3b +Subproject commit 4ae715832edace32e80cbc340b9d37d83ef5aa73