From 96572a32266d9407bd502c516c685c39f6b6febd Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sat, 17 Aug 2013 23:49:06 +0200 Subject: [PATCH] Misc UI stuff, back button should now work as expected. --- UI/GameSettingsScreen.cpp | 18 ++++++++++++++++++ UI/MenuScreens.cpp | 2 -- UI/NativeApp.cpp | 2 +- UI/PluginScreen.h | 2 +- native | 2 +- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index cefacc2ffd..b4fb06a6fa 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -45,6 +45,9 @@ namespace MainWindow { extern HWND hwndMain; } #endif +#ifdef IOS +extern bool isJailed; +#endif namespace UI { @@ -285,7 +288,16 @@ void GameSettingsScreen::CreateViews() { ViewGroup *systemSettings = new LinearLayout(ORIENT_VERTICAL); systemSettingsScroll->Add(systemSettings); tabHolder->AddTab(ms->T("System"), systemSettingsScroll); + +#ifdef IOS + if (isJailed) { + systemSettings->Add(new TextView(s->T("DynarecisJailed", "Dynarec (JIT) - (Not jailbroken - JIT not available)"))); + } else { + systemSettings->Add(new CheckBox(&g_Config.bJit, s->T("Dynarec", "Dynarec (JIT)"))); + } +#else systemSettings->Add(new CheckBox(&g_Config.bJit, s->T("Dynarec", "Dynarec (JIT)"))); +#endif systemSettings->Add(new CheckBox(&g_Config.bFastMemory, s->T("Fast Memory", "Fast Memory (Unstable)"))); systemSettings->Add(new CheckBox(&g_Config.bSeparateCPUThread, s->T("Multithreaded (experimental)"))); systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, gs->T("Change CPU Clock", "Change CPU Clock (0 = default)"), screenManager())); @@ -368,8 +380,14 @@ void GlobalSettingsScreen::CreateViews() { list->Add(new ItemHeader(g->T("General"))); list->Add(new CheckBox(&g_Config.bNewUI, gs->T("Enable New UI"))); list->Add(new CheckBox(&enableReports_, gs->T("Enable Compatibility Server Reports"))); +#ifndef ANDROID + // Need to move the cheat config dir somewhere where it can be read/written on android list->Add(new CheckBox(&g_Config.bEnableCheats, gs->T("Enable Cheats"))); +#endif +#ifdef _WIN32 + // Screenshot functionality is not yet available on non-Windows list->Add(new CheckBox(&g_Config.bScreenshotsAsPNG, gs->T("Screenshots as PNG"))); +#endif list->Add(new Choice(gs->T("System Language")))->OnClick.Handle(this, &GlobalSettingsScreen::OnLanguage); list->Add(new Choice(gs->T("Developer Tools")))->OnClick.Handle(this, &GlobalSettingsScreen::OnDeveloperTools); list->Add(new Choice(g->T("Back")))->OnClick.Handle(this, &GlobalSettingsScreen::OnBack); diff --git a/UI/MenuScreens.cpp b/UI/MenuScreens.cpp index 77ca739101..fc6b134245 100644 --- a/UI/MenuScreens.cpp +++ b/UI/MenuScreens.cpp @@ -445,7 +445,6 @@ void PauseScreen::render() { #endif UICheckBox(GEN_ID, x, y += stride, gs->T("Stretch to Display"), ALIGN_TOPLEFT, &g_Config.bStretchToDisplay); - UICheckBox(GEN_ID, x, y += stride, gs->T("Software Rendering"), ALIGN_TOPLEFT, &g_Config.bSoftwareRendering); UICheckBox(GEN_ID, x, y += stride, gs->T("Hardware Transform"), ALIGN_TOPLEFT, &g_Config.bHardwareTransform); bool enableFrameSkip = g_Config.iFrameSkip != 0; UICheckBox(GEN_ID, x, y += stride , gs->T("Frame Skipping"), ALIGN_TOPLEFT, &enableFrameSkip); @@ -941,7 +940,6 @@ void GraphicsScreenP1::render() { int stride = 40; int columnw = 400; - UICheckBox(GEN_ID, x, y += stride, gs->T("Software Rendering"), ALIGN_TOPLEFT, &g_Config.bSoftwareRendering); #ifndef __SYMBIAN32__ UICheckBox(GEN_ID, x, y += stride, gs->T("Hardware Transform"), ALIGN_TOPLEFT, &g_Config.bHardwareTransform); #endif diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 93adf15e5b..761704a8f6 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -583,7 +583,7 @@ void NativeDeviceLost() { } bool NativeIsAtTopLevel() { - return globalUIState == UISTATE_MENU; + return false; } void NativeTouch(const TouchInput &touch) { diff --git a/UI/PluginScreen.h b/UI/PluginScreen.h index d1112be0ff..1d95eaccca 100644 --- a/UI/PluginScreen.h +++ b/UI/PluginScreen.h @@ -30,7 +30,7 @@ #include "UI/MiscScreens.h" -class PluginScreen : public UIScreenWithBackground { +class PluginScreen : public UIDialogScreenWithBackground { public: PluginScreen(); diff --git a/native b/native index 1effa13869..2175499217 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 1effa138697927d5e74b40bd5f26133c6a7bc0d2 +Subproject commit 217549921782067d433fc8e449a9aa3e186798a6