mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Add setting for Kitkat Immersive Mode on Android.
This commit is contained in:
parent
a0d5610f36
commit
ca500b0bf4
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -593,6 +593,7 @@ void SymbolMap::AssignFunctionIndices() {
|
||||
}
|
||||
|
||||
void SymbolMap::UpdateActiveSymbols() {
|
||||
return;
|
||||
lock_guard guard(lock_);
|
||||
std::map<int, u32> activeModuleIndexes;
|
||||
for (auto it = activeModuleEnds.begin(), end = activeModuleEnds.end(); it != end; ++it) {
|
||||
|
@ -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).
|
||||
|
@ -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_;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
2
native
2
native
@ -1 +1 @@
|
||||
Subproject commit 0ba62994137392e447570b8f0eef8a819556fd3b
|
||||
Subproject commit 4ae715832edace32e80cbc340b9d37d83ef5aa73
|
Loading…
Reference in New Issue
Block a user