From d48ee947ac09ebbceb1608e703264494409ebbea Mon Sep 17 00:00:00 2001 From: vnctdj Date: Wed, 1 Jul 2015 22:31:04 +0200 Subject: [PATCH 01/16] Consistently use *co for the Controls i18n category --- UI/GameSettingsScreen.cpp | 56 ++++++++++++++++----------------- UI/TiltAnalogSettingsScreen.cpp | 22 ++++++------- UI/TouchControlLayoutScreen.cpp | 6 ++-- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 83d35ca049..e5755aa91d 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -93,7 +93,7 @@ void GameSettingsScreen::CreateViews() { I18NCategory *d = GetI18NCategory("Dialog"); I18NCategory *gs = GetI18NCategory("Graphics"); - I18NCategory *c = GetI18NCategory("Controls"); + I18NCategory *co = GetI18NCategory("Controls"); I18NCategory *a = GetI18NCategory("Audio"); I18NCategory *sa = GetI18NCategory("Savedata"); I18NCategory *s = GetI18NCategory("System"); @@ -374,38 +374,38 @@ void GameSettingsScreen::CreateViews() { controlsSettingsScroll->Add(controlsSettings); tabHolder->AddTab(ms->T("Controls"), controlsSettingsScroll); controlsSettings->Add(new ItemHeader(ms->T("Controls"))); - controlsSettings->Add(new Choice(c->T("Control Mapping")))->OnClick.Handle(this, &GameSettingsScreen::OnControlMapping); + controlsSettings->Add(new Choice(co->T("Control Mapping")))->OnClick.Handle(this, &GameSettingsScreen::OnControlMapping); #if defined(USING_WIN_UI) - controlsSettings->Add(new CheckBox(&g_Config.bGamepadOnlyFocused, c->T("Ignore gamepads when not focused"))); + controlsSettings->Add(new CheckBox(&g_Config.bGamepadOnlyFocused, co->T("Ignore gamepads when not focused"))); #endif #if defined(MOBILE_DEVICE) - controlsSettings->Add(new CheckBox(&g_Config.bHapticFeedback, c->T("HapticFeedback", "Haptic Feedback (vibration)"))); + controlsSettings->Add(new CheckBox(&g_Config.bHapticFeedback, co->T("HapticFeedback", "Haptic Feedback (vibration)"))); static const char *tiltTypes[] = { "None (Disabled)", "Analog Stick", "D-PAD", "PSP Action Buttons"}; - controlsSettings->Add(new PopupMultiChoice(&g_Config.iTiltInputType, c->T("Tilt Input Type"), tiltTypes, 0, ARRAY_SIZE(tiltTypes), c, screenManager()))->OnClick.Handle(this, &GameSettingsScreen::OnTiltTypeChange); + controlsSettings->Add(new PopupMultiChoice(&g_Config.iTiltInputType, co->T("Tilt Input Type"), tiltTypes, 0, ARRAY_SIZE(tiltTypes), c, screenManager()))->OnClick.Handle(this, &GameSettingsScreen::OnTiltTypeChange); - Choice *customizeTilt = controlsSettings->Add(new Choice(c->T("Customize tilt"))); + Choice *customizeTilt = controlsSettings->Add(new Choice(co->T("Customize tilt"))); customizeTilt->OnClick.Handle(this, &GameSettingsScreen::OnTiltCustomize); customizeTilt->SetEnabledPtr((bool *)&g_Config.iTiltInputType); //<- dirty int-to-bool cast #endif // TVs don't have touch control, at least not yet. if (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) != DEVICE_TYPE_TV) { - controlsSettings->Add(new ItemHeader(c->T("OnScreen", "On-Screen Touch Controls"))); - controlsSettings->Add(new CheckBox(&g_Config.bShowTouchControls, c->T("OnScreen", "On-Screen Touch Controls"))); - layoutEditorChoice_ = controlsSettings->Add(new Choice(c->T("Custom layout..."))); + controlsSettings->Add(new ItemHeader(co->T("OnScreen", "On-Screen Touch Controls"))); + controlsSettings->Add(new CheckBox(&g_Config.bShowTouchControls, co->T("OnScreen", "On-Screen Touch Controls"))); + layoutEditorChoice_ = controlsSettings->Add(new Choice(co->T("Custom layout..."))); layoutEditorChoice_->OnClick.Handle(this, &GameSettingsScreen::OnTouchControlLayout); layoutEditorChoice_->SetEnabledPtr(&g_Config.bShowTouchControls); // Re-centers itself to the touch location on touch-down. - CheckBox *floatingAnalog = controlsSettings->Add(new CheckBox(&g_Config.bAutoCenterTouchAnalog, c->T("Auto-centering analog stick"))); + CheckBox *floatingAnalog = controlsSettings->Add(new CheckBox(&g_Config.bAutoCenterTouchAnalog, co->T("Auto-centering analog stick"))); floatingAnalog->SetEnabledPtr(&g_Config.bShowTouchControls); // On systems that aren't Symbian, iOS, and Maemo, offer to let the user see this button. // Some Windows touch devices don't have a back button or other button to call up the menu. #if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MAEMO) - CheckBox *enablePauseBtn = controlsSettings->Add(new CheckBox(&g_Config.bShowTouchPause, c->T("Show Touch Pause Menu Button"))); + CheckBox *enablePauseBtn = controlsSettings->Add(new CheckBox(&g_Config.bShowTouchPause, co->T("Show Touch Pause Menu Button"))); // Don't allow the user to disable it once in-game, so they can't lock themselves out of the menu. if (!PSP_IsInited()) { @@ -415,36 +415,36 @@ void GameSettingsScreen::CreateViews() { } #endif - CheckBox *disableDiags = controlsSettings->Add(new CheckBox(&g_Config.bDisableDpadDiagonals, c->T("Disable D-Pad diagonals (4-way touch)"))); + CheckBox *disableDiags = controlsSettings->Add(new CheckBox(&g_Config.bDisableDpadDiagonals, co->T("Disable D-Pad diagonals (4-way touch)"))); disableDiags->SetEnabledPtr(&g_Config.bShowTouchControls); - View *opacity = controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 0, 100, c->T("Button Opacity"), screenManager())); + View *opacity = controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 0, 100, co->T("Button Opacity"), screenManager())); opacity->SetEnabledPtr(&g_Config.bShowTouchControls); static const char *touchControlStyles[] = {"Classic", "Thin borders"}; - View *style = controlsSettings->Add(new PopupMultiChoice(&g_Config.iTouchButtonStyle, c->T("Button style"), touchControlStyles, 0, ARRAY_SIZE(touchControlStyles), c, screenManager())); + View *style = controlsSettings->Add(new PopupMultiChoice(&g_Config.iTouchButtonStyle, co->T("Button style"), touchControlStyles, 0, ARRAY_SIZE(touchControlStyles), c, screenManager())); style->SetEnabledPtr(&g_Config.bShowTouchControls); } #ifdef _WIN32 static const char *inverseDeadzoneModes[] = { "Off", "X", "Y", "X + Y" }; - controlsSettings->Add(new ItemHeader(c->T("DInput Analog Settings", "DInput Analog Settings"))); - controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogDeadzone, 0.0f, 1.0f, c->T("Deadzone Radius"), screenManager())); - controlsSettings->Add(new PopupMultiChoice(&g_Config.iDInputAnalogInverseMode, c->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), c, screenManager())); - controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogInverseDeadzone, 0.0f, 1.0f, c->T("Analog Mapper Low End", "Analog Mapper Low End (Inverse Deadzone)"), screenManager())); - controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogSensitivity, 0.0f, 10.0f, c->T("Analog Mapper High End", "Analog Mapper High End (Axis Sensitivity)"), screenManager())); + controlsSettings->Add(new ItemHeader(co->T("DInput Analog Settings", "DInput Analog Settings"))); + controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogDeadzone, 0.0f, 1.0f, co->T("Deadzone Radius"), screenManager())); + controlsSettings->Add(new PopupMultiChoice(&g_Config.iDInputAnalogInverseMode, co->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), c, screenManager())); + controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogInverseDeadzone, 0.0f, 1.0f, co->T("Analog Mapper Low End", "Analog Mapper Low End (Inverse Deadzone)"), screenManager())); + controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogSensitivity, 0.0f, 10.0f, co->T("Analog Mapper High End", "Analog Mapper High End (Axis Sensitivity)"), screenManager())); - controlsSettings->Add(new ItemHeader(c->T("XInput Analog Settings", "XInput Analog Settings"))); - controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogDeadzone, 0.0f, 1.0f, c->T("Deadzone Radius"), screenManager())); - controlsSettings->Add(new PopupMultiChoice(&g_Config.iXInputAnalogInverseMode, c->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), c, screenManager())); - controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogInverseDeadzone, 0.0f, 1.0f, c->T("Analog Mapper Low End", "Analog Mapper Low End (Inverse Deadzone)"), screenManager())); - controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogSensitivity, 0.0f, 10.0f, c->T("Analog Mapper High End", "Analog Mapper High End (Axis Sensitivity)"), screenManager())); + controlsSettings->Add(new ItemHeader(co->T("XInput Analog Settings", "XInput Analog Settings"))); + controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogDeadzone, 0.0f, 1.0f, co->T("Deadzone Radius"), screenManager())); + controlsSettings->Add(new PopupMultiChoice(&g_Config.iXInputAnalogInverseMode, co->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), c, screenManager())); + controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogInverseDeadzone, 0.0f, 1.0f, co->T("Analog Mapper Low End", "Analog Mapper Low End (Inverse Deadzone)"), screenManager())); + controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogSensitivity, 0.0f, 10.0f, co->T("Analog Mapper High End", "Analog Mapper High End (Axis Sensitivity)"), screenManager())); #endif - controlsSettings->Add(new ItemHeader(c->T("Keyboard", "Keyboard Control Settings"))); + controlsSettings->Add(new ItemHeader(co->T("Keyboard", "Keyboard Control Settings"))); #if defined(USING_WIN_UI) - controlsSettings->Add(new CheckBox(&g_Config.bIgnoreWindowsKey, c->T("Ignore Windows Key"))); + controlsSettings->Add(new CheckBox(&g_Config.bIgnoreWindowsKey, co->T("Ignore Windows Key"))); #endif // #if defined(USING_WIN_UI) - controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogLimiterDeadzone, 0.0f, 1.0f, c->T("Analog Limiter"), 0.10f, screenManager())); + controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogLimiterDeadzone, 0.0f, 1.0f, co->T("Analog Limiter"), 0.10f, screenManager())); ViewGroup *networkingSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); LinearLayout *networkingSettings = new LinearLayout(ORIENT_VERTICAL); @@ -516,7 +516,7 @@ void GameSettingsScreen::CreateViews() { #ifdef ANDROID if (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) == DEVICE_TYPE_MOBILE) { static const char *screenRotation[] = {"Auto", "Landscape", "Portrait", "Landscape Reversed", "Portrait Reversed"}; - PopupMultiChoice *rot = systemSettings->Add(new PopupMultiChoice(&g_Config.iScreenRotation, c->T("Screen Rotation"), screenRotation, 0, ARRAY_SIZE(screenRotation), c, screenManager())); + PopupMultiChoice *rot = systemSettings->Add(new PopupMultiChoice(&g_Config.iScreenRotation, co->T("Screen Rotation"), screenRotation, 0, ARRAY_SIZE(screenRotation), c, screenManager())); rot->OnChoice.Handle(this, &GameSettingsScreen::OnScreenRotation); } #endif diff --git a/UI/TiltAnalogSettingsScreen.cpp b/UI/TiltAnalogSettingsScreen.cpp index da073d6d32..23f46e187b 100644 --- a/UI/TiltAnalogSettingsScreen.cpp +++ b/UI/TiltAnalogSettingsScreen.cpp @@ -23,7 +23,7 @@ void TiltAnalogSettingsScreen::CreateViews() { using namespace UI; - I18NCategory *c = GetI18NCategory("Controls"); + I18NCategory *co = GetI18NCategory("Controls"); I18NCategory *d = GetI18NCategory("Dialog"); root_ = new ScrollView(ORIENT_VERTICAL); @@ -31,21 +31,21 @@ void TiltAnalogSettingsScreen::CreateViews() { LinearLayout *settings = new LinearLayout(ORIENT_VERTICAL); settings->SetSpacing(0); - settings->Add(new ItemHeader(c->T("Invert Axes"))); - settings->Add(new CheckBox(&g_Config.bInvertTiltX, c->T("Invert Tilt along X axis"))); - settings->Add(new CheckBox(&g_Config.bInvertTiltY, c->T("Invert Tilt along Y axis"))); + settings->Add(new ItemHeader(co->T("Invert Axes"))); + settings->Add(new CheckBox(&g_Config.bInvertTiltX, co->T("Invert Tilt along X axis"))); + settings->Add(new CheckBox(&g_Config.bInvertTiltY, co->T("Invert Tilt along Y axis"))); - settings->Add(new ItemHeader(c->T("Sensitivity"))); + settings->Add(new ItemHeader(co->T("Sensitivity"))); //TODO: allow values greater than 100? I'm not sure if that's needed. - settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityX, 0, 100, c->T("Tilt Sensitivity along X axis"), screenManager())); - settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityY, 0, 100, c->T("Tilt Sensitivity along Y axis"), screenManager())); - settings->Add(new PopupSliderChoiceFloat(&g_Config.fDeadzoneRadius, 0.0, 1.0, c->T("Deadzone Radius"), screenManager())); + settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityX, 0, 100, co->T("Tilt Sensitivity along X axis"), screenManager())); + settings->Add(new PopupSliderChoice(&g_Config.iTiltSensitivityY, 0, 100, co->T("Tilt Sensitivity along Y axis"), screenManager())); + settings->Add(new PopupSliderChoiceFloat(&g_Config.fDeadzoneRadius, 0.0, 1.0, co->T("Deadzone Radius"), screenManager())); - settings->Add(new ItemHeader(c->T("Calibration"))); - InfoItem *calibrationInfo = new InfoItem(c->T("To Calibrate", "To calibrate, keep device on a flat surface and press calibrate."), ""); + settings->Add(new ItemHeader(co->T("Calibration"))); + InfoItem *calibrationInfo = new InfoItem(co->T("To Calibrate", "To calibrate, keep device on a flat surface and press calibrate."), ""); settings->Add(calibrationInfo); - Choice *calibrate = new Choice(c->T("Calibrate D-Pad")); + Choice *calibrate = new Choice(co->T("Calibrate D-Pad")); calibrate->OnClick.Handle(this, &TiltAnalogSettingsScreen::OnCalibrate); settings->Add(calibrate); diff --git a/UI/TouchControlLayoutScreen.cpp b/UI/TouchControlLayoutScreen.cpp index 6a41b7779b..35f2c1a16b 100644 --- a/UI/TouchControlLayoutScreen.cpp +++ b/UI/TouchControlLayoutScreen.cpp @@ -310,15 +310,15 @@ void TouchControlLayoutScreen::CreateViews() { using namespace UI; - I18NCategory *c = GetI18NCategory("Controls"); + I18NCategory *co = GetI18NCategory("Controls"); I18NCategory *d = GetI18NCategory("Dialog"); root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); Choice *reset = new Choice(d->T("Reset"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 84)); Choice *back = new Choice(d->T("Back"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 10)); - Choice *visibility = new Choice(c->T("Visibility"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 158)); - // controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fButtonScale, 0.80, 2.0, c->T("Button Scaling"), screenManager())) + Choice *visibility = new Choice(co->T("Visibility"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 158)); + // controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fButtonScale, 0.80, 2.0, co->T("Button Scaling"), screenManager())) // ->OnChange.Handle(this, &GameSettingsScreen::OnChangeControlScaling); mode_ = new ChoiceStrip(ORIENT_VERTICAL, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 158 + 64 + 10)); From 44682d1bae78cf4d5f0eeb9e8a63a0fa69a9fdae Mon Sep 17 00:00:00 2001 From: vnctdj Date: Wed, 1 Jul 2015 22:40:11 +0200 Subject: [PATCH 02/16] Consistently use *cw for the CwCheats i18n category --- UI/CwCheatScreen.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/UI/CwCheatScreen.cpp b/UI/CwCheatScreen.cpp index 07b4138834..cf71bc89ec 100644 --- a/UI/CwCheatScreen.cpp +++ b/UI/CwCheatScreen.cpp @@ -60,7 +60,7 @@ void CwCheatScreen::CreateCodeList() { void CwCheatScreen::CreateViews() { using namespace UI; - I18NCategory *k = GetI18NCategory("CwCheats"); + I18NCategory *cw = GetI18NCategory("CwCheats"); I18NCategory *d = GetI18NCategory("Dialog"); CreateCodeList(); g_Config.bReloadCheats = true; @@ -68,15 +68,15 @@ void CwCheatScreen::CreateViews() { Margins actionMenuMargins(50, -15, 15, 0); LinearLayout *leftColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(400, FILL_PARENT)); - leftColumn->Add(new ItemHeader(k->T("Options"))); + leftColumn->Add(new ItemHeader(cw->T("Options"))); leftColumn->Add(new Choice(d->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); - //leftColumn->Add(new Choice(k->T("Add Cheat")))->OnClick.Handle(this, &CwCheatScreen::OnAddCheat); - leftColumn->Add(new Choice(k->T("Import Cheats")))->OnClick.Handle(this, &CwCheatScreen::OnImportCheat); + //leftColumn->Add(new Choice(cw->T("Add Cheat")))->OnClick.Handle(this, &CwCheatScreen::OnAddCheat); + leftColumn->Add(new Choice(cw->T("Import Cheats")))->OnClick.Handle(this, &CwCheatScreen::OnImportCheat); #if !defined(MOBILE_DEVICE) - leftColumn->Add(new Choice(k->T("Edit Cheat File")))->OnClick.Handle(this, &CwCheatScreen::OnEditCheatFile); + leftColumn->Add(new Choice(cw->T("Edit Cheat File")))->OnClick.Handle(this, &CwCheatScreen::OnEditCheatFile); #endif - leftColumn->Add(new Choice(k->T("Enable/Disable All")))->OnClick.Handle(this, &CwCheatScreen::OnEnableAll); - leftColumn->Add(new PopupSliderChoice(&g_Config.iCwCheatRefreshRate, 1, 1000, k->T("Refresh Rate"), 1, screenManager())); + leftColumn->Add(new Choice(cw->T("Enable/Disable All")))->OnClick.Handle(this, &CwCheatScreen::OnEnableAll); + leftColumn->Add(new PopupSliderChoice(&g_Config.iCwCheatRefreshRate, 1, 1000, cw->T("Refresh Rate"), 1, screenManager())); ScrollView *rightScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(0.5f)); rightScroll->SetScrollToTop(false); @@ -86,10 +86,10 @@ void CwCheatScreen::CreateViews() { root_->Add(leftColumn); root_->Add(rightScroll); - rightColumn->Add(new ItemHeader(k->T("Cheats"))); + rightColumn->Add(new ItemHeader(cw->T("Cheats"))); for (size_t i = 0; i < formattedList_.size(); i++) { name = formattedList_[i].c_str(); - rightColumn->Add(new CheatCheckBox(&bEnableCheat[i], k->T(name), ""))->OnClick.Handle(this, &CwCheatScreen::OnCheckBox); + rightColumn->Add(new CheatCheckBox(&bEnableCheat[i], cw->T(name), ""))->OnClick.Handle(this, &CwCheatScreen::OnCheckBox); } } From beda874ab518e1f7e2deb75cf3eb9e6d6e128d26 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Wed, 1 Jul 2015 22:45:35 +0200 Subject: [PATCH 03/16] Consistently use *des for the DesktopUI i18n category --- UI/NativeApp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index ec304ee1ad..dfc697a18d 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -447,7 +447,7 @@ void NativeInit(int argc, const char *argv[], else i18nrepo.LoadIni(g_Config.sLanguageIni, langOverridePath); - I18NCategory *d = GetI18NCategory("DesktopUI"); + I18NCategory *des = GetI18NCategory("DesktopUI"); // Note to translators: do not translate this/add this to PPSSPP-lang's files. // It's intended to be custom for every user. // Only add it to your own personal copies of PPSSPP. @@ -455,7 +455,7 @@ void NativeInit(int argc, const char *argv[], // TODO: Could allow a setting to specify a font file to load? // TODO: Make this a constant if we can sanely load the font on other systems? AddFontResourceEx(L"assets/Roboto-Condensed.ttf", FR_PRIVATE, NULL); - g_Config.sFont = d->T("Font", "Roboto"); + g_Config.sFont = des->T("Font", "Roboto"); #endif if (!boot_filename.empty() && stateToLoad != NULL) From d7eba2061e4e44ef63b74bfa847a5761570f7998 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Wed, 1 Jul 2015 23:26:55 +0200 Subject: [PATCH 04/16] Consistently use *di for the Dialog i18n category --- Core/Dialog/PSPDialog.cpp | 6 ++-- Core/Dialog/PSPMsgDialog.cpp | 20 +++++------ Core/Dialog/PSPNetconfDialog.cpp | 8 ++--- Core/Dialog/PSPOskDialog.cpp | 12 +++---- Core/Dialog/PSPSaveDialog.cpp | 58 ++++++++++++++++---------------- Core/Dialog/SavedataParam.cpp | 6 ++-- UI/ControlMappingScreen.cpp | 8 ++--- UI/CwCheatScreen.cpp | 4 +-- UI/DevScreens.cpp | 8 ++--- UI/GameScreen.cpp | 16 ++++----- UI/GameSettingsScreen.cpp | 30 ++++++++--------- UI/MainScreen.cpp | 4 +-- UI/MiscScreens.cpp | 10 +++--- UI/PauseScreen.cpp | 4 +-- UI/ReportScreen.cpp | 4 +-- UI/TiltAnalogSettingsScreen.cpp | 4 +-- UI/TouchControlLayoutScreen.cpp | 10 +++--- 17 files changed, 106 insertions(+), 106 deletions(-) diff --git a/Core/Dialog/PSPDialog.cpp b/Core/Dialog/PSPDialog.cpp index fb10fc59de..54c467dbd5 100644 --- a/Core/Dialog/PSPDialog.cpp +++ b/Core/Dialog/PSPDialog.cpp @@ -201,21 +201,21 @@ void PSPDialog::DisplayButtons(int flags, const char *caption) strncpy(safeCaption, caption, 64); } - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); float x1 = 183.5f, x2 = 261.5f; if (GetCommonParam()->buttonSwap == 1) { x1 = 261.5f; x2 = 183.5f; } if (flags & DS_BUTTON_OK) { - const char *text = useCaption ? safeCaption : d->T("Enter"); + const char *text = useCaption ? safeCaption : di->T("Enter"); PPGeDrawImage(okButtonImg, x2, 258, 11.5f, 11.5f, 0, CalcFadedColor(0x80000000)); PPGeDrawImage(okButtonImg, x2, 256, 11.5f, 11.5f, 0, CalcFadedColor(0xFFFFFFFF)); PPGeDrawText(text, x2 + 15.5f, 254, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0x80000000)); PPGeDrawText(text, x2 + 14.5f, 252, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0xFFFFFFFF)); } if (flags & DS_BUTTON_CANCEL) { - const char *text = useCaption ? safeCaption : d->T("Back"); + const char *text = useCaption ? safeCaption : di->T("Back"); PPGeDrawText(text, x1 + 15.5f, 254, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0x80000000)); PPGeDrawText(text, x1 + 14.5f, 252, PPGE_ALIGN_LEFT, FONT_SCALE, CalcFadedColor(0xFFFFFFFF)); PPGeDrawImage(cancelButtonImg, x1, 258, 11.5f, 11.5f, 0, CalcFadedColor(0x80000000)); diff --git a/Core/Dialog/PSPMsgDialog.cpp b/Core/Dialog/PSPMsgDialog.cpp index 54cb4865f6..3b5456c155 100755 --- a/Core/Dialog/PSPMsgDialog.cpp +++ b/Core/Dialog/PSPMsgDialog.cpp @@ -155,18 +155,18 @@ void PSPMsgDialog::DisplayMessage(std::string text, bool hasYesNo, bool hasOK) if (hasYesNo) { - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); const char *choiceText; u32 yesColor, noColor; float x, w; if (yesnoChoice == 1) { - choiceText = d->T("Yes"); + choiceText = di->T("Yes"); x = 204.0f; yesColor = 0xFFFFFFFF; noColor = 0xFFFFFFFF; } else { - choiceText = d->T("No"); + choiceText = di->T("No"); x = 273.0f; yesColor = 0xFFFFFFFF; noColor = 0xFFFFFFFF; @@ -178,10 +178,10 @@ void PSPMsgDialog::DisplayMessage(std::string text, bool hasYesNo, bool hasOK) h2 += h + 5.0f; y = 135.0f - h; PPGeDrawRect(x - w, y2 - h, x + w, y2 + h, CalcFadedColor(0x6DCFCFCF)); - PPGeDrawText(d->T("Yes"), 204.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000)); - PPGeDrawText(d->T("Yes"), 203.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(yesColor)); - PPGeDrawText(d->T("No"), 273.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000)); - PPGeDrawText(d->T("No"), 272.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(noColor)); + PPGeDrawText(di->T("Yes"), 204.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000)); + PPGeDrawText(di->T("Yes"), 203.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(yesColor)); + PPGeDrawText(di->T("No"), 273.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000)); + PPGeDrawText(di->T("No"), 272.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(noColor)); if (IsButtonPressed(CTRL_LEFT) && yesnoChoice == 0) { yesnoChoice = 1; } @@ -192,7 +192,7 @@ void PSPMsgDialog::DisplayMessage(std::string text, bool hasYesNo, bool hasOK) } if (hasOK) { - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); float x, w; x = 240.0f; w = 15.0f; @@ -201,8 +201,8 @@ void PSPMsgDialog::DisplayMessage(std::string text, bool hasYesNo, bool hasOK) h2 += h + 5.0f; y = 135.0f - h; PPGeDrawRect(x - w, y2 - h, x + w, y2 + h, CalcFadedColor(0x6DCFCFCF)); - PPGeDrawText(d->T("OK"), 240.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000)); - PPGeDrawText(d->T("OK"), 239.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText(di->T("OK"), 240.0f, y2 + 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000)); + PPGeDrawText(di->T("OK"), 239.0f, y2 - 1.0f, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0xFFFFFFFF)); ey = y2 + 25.0f; } diff --git a/Core/Dialog/PSPNetconfDialog.cpp b/Core/Dialog/PSPNetconfDialog.cpp index ded27c8cfd..3df74563f3 100644 --- a/Core/Dialog/PSPNetconfDialog.cpp +++ b/Core/Dialog/PSPNetconfDialog.cpp @@ -62,13 +62,13 @@ void PSPNetconfDialog::DrawBanner() { // TODO: Draw a hexagon icon PPGeDrawImage(10, 6, 12.0f, 12.0f, 1, 10, 1, 10, 10, 10, CalcFadedColor(0xFFFFFFFF)); - I18NCategory *d = GetI18NCategory("Dialog"); - PPGeDrawText(d->T("Network Connection"), 30, 11, PPGE_ALIGN_VCENTER, 0.6f, CalcFadedColor(0xFFFFFFFF)); + I18NCategory *di = GetI18NCategory("Dialog"); + PPGeDrawText(di->T("Network Connection"), 30, 11, PPGE_ALIGN_VCENTER, 0.6f, CalcFadedColor(0xFFFFFFFF)); } int PSPNetconfDialog::Update(int animSpeed) { UpdateButtons(); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); I18NCategory *err = GetI18NCategory("Error"); const float WRAP_WIDTH = 254.0f; const int confirmBtnImage = g_Config.iButtonPreference == PSP_SYSTEMPARAM_BUTTON_CROSS ? I_CROSS : I_CIRCLE; @@ -83,7 +83,7 @@ int PSPNetconfDialog::Update(int animSpeed) { PPGeDrawRect(0, 0, 480, 272, CalcFadedColor(0x63636363)); PPGeDrawTextWrapped(err->T("PPSSPPDoesNotSupportInternet", "PPSSPP currently does not support connecting to the Internet for DLC, PSN, or game updates."), 241, 132, WRAP_WIDTH, PPGE_ALIGN_CENTER, 0.5f, CalcFadedColor(0xFFFFFFFF)); PPGeDrawImage(confirmBtnImage, 195, 250, 20, 20, 0, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawText(d->T("OK"), 225, 252, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText(di->T("OK"), 225, 252, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); if (IsButtonPressed(confirmBtn)) { StartFade(false); diff --git a/Core/Dialog/PSPOskDialog.cpp b/Core/Dialog/PSPOskDialog.cpp index 881fd3b7c7..6ac4ed7350 100755 --- a/Core/Dialog/PSPOskDialog.cpp +++ b/Core/Dialog/PSPOskDialog.cpp @@ -872,10 +872,10 @@ int PSPOskDialog::Update(int animSpeed) { PPGeDrawRect(0, 0, 480, 272, CalcFadedColor(0x63636363)); RenderKeyboard(); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); PPGeDrawImage(I_SQUARE, 365, 222, 16, 16, 0, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawText(d->T("Space"), 390, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText(di->T("Space"), 390, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); if (g_Config.iButtonPreference != PSP_SYSTEMPARAM_BUTTON_CIRCLE) { PPGeDrawImage(I_CROSS, 45, 222, 16, 16, 0, CalcFadedColor(0xFFFFFFFF)); @@ -885,11 +885,11 @@ int PSPOskDialog::Update(int animSpeed) { PPGeDrawImage(I_CROSS, 45, 247, 16, 16, 0, CalcFadedColor(0xFFFFFFFF)); } - PPGeDrawText(d->T("Select"), 75, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawText(d->T("Delete"), 75, 247, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText(di->T("Select"), 75, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText(di->T("Delete"), 75, 247, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); PPGeDrawText("Start", 135, 220, PPGE_ALIGN_LEFT, 0.6f, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawText(d->T("Finish"), 185, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText(di->T("Finish"), 185, 222, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); int index = (currentKeyboardLanguage - 1) % OSK_LANGUAGE_COUNT; const char *countryCode; @@ -908,7 +908,7 @@ int PSPOskDialog::Update(int animSpeed) { if (strcmp(countryCode, "ko_KR")) { PPGeDrawText("Select", 135, 245, PPGE_ALIGN_LEFT, 0.6f, CalcFadedColor(0xFFFFFFFF)); - PPGeDrawText(d->T("Shift"), 185, 247, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); + PPGeDrawText(di->T("Shift"), 185, 247, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF)); } PPGeDrawText("L", 235, 220, PPGE_ALIGN_LEFT, 0.6f, CalcFadedColor(0xFFFFFFFF)); diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index 8410b96003..3c67ed2a86 100755 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -275,19 +275,19 @@ const std::string PSPSaveDialog::GetSelectedSaveDirName() const void PSPSaveDialog::DisplayBanner(int which) { - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); PPGeDrawRect(0, 0, 480, 23, CalcFadedColor(0x65636358)); const char *title; switch (which) { case DB_SAVE: - title = d->T("Save"); + title = di->T("Save"); break; case DB_LOAD: - title = d->T("Load"); + title = di->T("Load"); break; case DB_DELETE: - title = d->T("Delete"); + title = di->T("Delete"); break; default: title = ""; @@ -391,8 +391,8 @@ void PSPSaveDialog::DisplaySaveDataInfo1() { lock_guard guard(paramLock); if (param.GetFileInfo(currentSelectedSave).size == 0) { - I18NCategory *d = GetI18NCategory("Dialog"); - PPGeDrawText(d->T("NEW DATA"), 180, 136, PPGE_ALIGN_VCENTER, 0.6f, CalcFadedColor(0xFFFFFFFF)); + I18NCategory *di = GetI18NCategory("Dialog"); + PPGeDrawText(di->T("NEW DATA"), 180, 136, PPGE_ALIGN_VCENTER, 0.6f, CalcFadedColor(0xFFFFFFFF)); } else { char title[512]; char time[512]; @@ -524,18 +524,18 @@ void PSPSaveDialog::DisplayMessage(std::string text, bool hasYesNo) float h2 = h * (float)n / 2.0f; if (hasYesNo) { - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); const char *choiceText; u32 yesColor, noColor; float x, w; if (yesnoChoice == 1) { - choiceText = d->T("Yes"); + choiceText = di->T("Yes"); x = 302.0f; yesColor = 0xFFFFFFFF; noColor = 0xFFFFFFFF; } else { - choiceText = d->T("No"); + choiceText = di->T("No"); x = 366.0f; yesColor = 0xFFFFFFFF; noColor = 0xFFFFFFFF; @@ -547,10 +547,10 @@ void PSPSaveDialog::DisplayMessage(std::string text, bool hasYesNo) h2 += h + 4.0f; y = 132.0f - h; PPGeDrawRect(x - w, y2 - h, x + w, y2 + h, CalcFadedColor(0x40C0C0C0)); - PPGeDrawText(d->T("Yes"), 303.0f, y2+2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000)); - PPGeDrawText(d->T("Yes"), 302.0f, y2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(yesColor)); - PPGeDrawText(d->T("No"), 367.0f, y2+2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000)); - PPGeDrawText(d->T("No"), 366.0f, y2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(noColor)); + PPGeDrawText(di->T("Yes"), 303.0f, y2+2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000)); + PPGeDrawText(di->T("Yes"), 302.0f, y2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(yesColor)); + PPGeDrawText(di->T("No"), 367.0f, y2+2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(0x80000000)); + PPGeDrawText(di->T("No"), 366.0f, y2, PPGE_ALIGN_CENTER, FONT_SCALE, CalcFadedColor(noColor)); if (IsButtonPressed(CTRL_LEFT) && yesnoChoice == 0) { yesnoChoice = 1; } @@ -606,7 +606,7 @@ int PSPSaveDialog::Update(int animSpeed) cancelButtonFlag = CTRL_CIRCLE; } - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); switch (display) { @@ -640,7 +640,7 @@ int PSPSaveDialog::Update(int animSpeed) DisplaySaveIcon(); DisplaySaveDataInfo2(); - DisplayMessage(d->T("Confirm Save", "Do you want to save this data?"), true); + DisplayMessage(di->T("Confirm Save", "Do you want to save this data?"), true); DisplayButtons(DS_BUTTON_OK | DS_BUTTON_CANCEL); DisplayBanner(DB_SAVE); @@ -661,7 +661,7 @@ int PSPSaveDialog::Update(int animSpeed) DisplaySaveIcon(); DisplaySaveDataInfo2(); - DisplayMessage(d->T("Confirm Overwrite","Do you want to overwrite the data?"), true); + DisplayMessage(di->T("Confirm Overwrite","Do you want to overwrite the data?"), true); DisplayButtons(DS_BUTTON_OK | DS_BUTTON_CANCEL); DisplayBanner(DB_SAVE); @@ -690,7 +690,7 @@ int PSPSaveDialog::Update(int animSpeed) DisplaySaveIcon(); DisplaySaveDataInfo2(); - DisplayMessage(d->T("Saving","Saving\nPlease Wait...")); + DisplayMessage(di->T("Saving","Saving\nPlease Wait...")); DisplayBanner(DB_SAVE); @@ -703,7 +703,7 @@ int PSPSaveDialog::Update(int animSpeed) DisplaySaveIcon(); DisplaySaveDataInfo2(); - DisplayMessage(d->T("SavingFailed", "Unable to save data.")); + DisplayMessage(di->T("SavingFailed", "Unable to save data.")); DisplayButtons(DS_BUTTON_CANCEL); DisplayBanner(DB_SAVE); @@ -730,7 +730,7 @@ int PSPSaveDialog::Update(int animSpeed) DisplaySaveIcon(); DisplaySaveDataInfo2(); - DisplayMessage(d->T("Save completed")); + DisplayMessage(di->T("Save completed")); DisplayButtons(DS_BUTTON_CANCEL); DisplayBanner(DB_SAVE); @@ -770,7 +770,7 @@ int PSPSaveDialog::Update(int animSpeed) DisplaySaveIcon(); DisplaySaveDataInfo2(); - DisplayMessage(d->T("ConfirmLoad", "Load this data?"), true); + DisplayMessage(di->T("ConfirmLoad", "Load this data?"), true); DisplayButtons(DS_BUTTON_OK | DS_BUTTON_CANCEL); DisplayBanner(DB_LOAD); @@ -795,7 +795,7 @@ int PSPSaveDialog::Update(int animSpeed) DisplaySaveIcon(); DisplaySaveDataInfo2(); - DisplayMessage(d->T("Loading","Loading\nPlease Wait...")); + DisplayMessage(di->T("Loading","Loading\nPlease Wait...")); DisplayBanner(DB_LOAD); @@ -808,7 +808,7 @@ int PSPSaveDialog::Update(int animSpeed) DisplaySaveIcon(); DisplaySaveDataInfo2(); - DisplayMessage(d->T("LoadingFailed", "Unable to load data.")); + DisplayMessage(di->T("LoadingFailed", "Unable to load data.")); DisplayButtons(DS_BUTTON_CANCEL); DisplayBanner(DB_LOAD); @@ -832,7 +832,7 @@ int PSPSaveDialog::Update(int animSpeed) DisplaySaveIcon(); DisplaySaveDataInfo2(); - DisplayMessage(d->T("Load completed")); + DisplayMessage(di->T("Load completed")); DisplayButtons(DS_BUTTON_CANCEL); DisplayBanner(DB_LOAD); @@ -852,7 +852,7 @@ int PSPSaveDialog::Update(int animSpeed) case DS_LOAD_NODATA: StartDraw(); - DisplayMessage(d->T("There is no data")); + DisplayMessage(di->T("There is no data")); DisplayButtons(DS_BUTTON_CANCEL); DisplayBanner(DB_LOAD); @@ -890,7 +890,7 @@ int PSPSaveDialog::Update(int animSpeed) DisplaySaveIcon(); DisplaySaveDataInfo2(); - DisplayMessage(d->T("DeleteConfirm", + DisplayMessage(di->T("DeleteConfirm", "This save data will be deleted.\nAre you sure you want to continue?"), true); @@ -917,7 +917,7 @@ int PSPSaveDialog::Update(int animSpeed) StartDraw(); - DisplayMessage(d->T("Deleting","Deleting\nPlease Wait...")); + DisplayMessage(di->T("Deleting","Deleting\nPlease Wait...")); DisplayBanner(DB_DELETE); @@ -927,7 +927,7 @@ int PSPSaveDialog::Update(int animSpeed) JoinIOThread(); StartDraw(); - DisplayMessage(d->T("DeleteFailed", "Unable to delete data.")); + DisplayMessage(di->T("DeleteFailed", "Unable to delete data.")); DisplayButtons(DS_BUTTON_CANCEL); DisplayBanner(DB_DELETE); @@ -945,7 +945,7 @@ int PSPSaveDialog::Update(int animSpeed) } StartDraw(); - DisplayMessage(d->T("Delete completed")); + DisplayMessage(di->T("Delete completed")); DisplayButtons(DS_BUTTON_CANCEL); DisplayBanner(DB_DELETE); @@ -962,7 +962,7 @@ int PSPSaveDialog::Update(int animSpeed) case DS_DELETE_NODATA: StartDraw(); - DisplayMessage(d->T("There is no data")); + DisplayMessage(di->T("There is no data")); DisplayButtons(DS_BUTTON_CANCEL); DisplayBanner(DB_DELETE); diff --git a/Core/Dialog/SavedataParam.cpp b/Core/Dialog/SavedataParam.cpp index e9a6821ac8..c5c0f1d459 100644 --- a/Core/Dialog/SavedataParam.cpp +++ b/Core/Dialog/SavedataParam.cpp @@ -641,9 +641,9 @@ void SavedataParam::LoadCryptedSave(SceUtilitySavedataParam *param, u8 *data, u8 // Don't notify the user if we're not going to upgrade the save. if (!g_Config.bEncryptSave) { - I18NCategory *d = GetI18NCategory("Dialog"); - osm.Show(d->T("When you save, it will load on a PSP, but not an older PPSSPP"), 6.0f); - osm.Show(d->T("Old savedata detected"), 6.0f); + I18NCategory *di = GetI18NCategory("Dialog"); + osm.Show(di->T("When you save, it will load on a PSP, but not an older PPSSPP"), 6.0f); + osm.Show(di->T("Old savedata detected"), 6.0f); } } else { if (decryptMode == 5 && prevCryptMode == 3) { diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 952c70d364..5a62ff2b4b 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -203,7 +203,7 @@ void ControlMappingScreen::CreateViews() { mappers_.clear(); I18NCategory *k = GetI18NCategory("KeyMapping"); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); root_ = new LinearLayout(ORIENT_HORIZONTAL); @@ -215,7 +215,7 @@ void ControlMappingScreen::CreateViews() { } leftColumn->Add(new Choice(k->T("Test Analogs")))->OnClick.Handle(this, &ControlMappingScreen::OnTestAnalogs); leftColumn->Add(new Spacer(new LinearLayoutParams(1.0f))); - leftColumn->Add(new Choice(d->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); + leftColumn->Add(new Choice(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); rightScroll_ = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)); rightScroll_->SetScrollToTop(false); @@ -435,7 +435,7 @@ bool AnalogTestScreen::key(const KeyInput &key) { void AnalogTestScreen::CreateViews() { using namespace UI; - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); root_ = new LinearLayout(ORIENT_VERTICAL); @@ -458,5 +458,5 @@ void AnalogTestScreen::CreateViews() { lastKeyEvent_ = root_->Add(new TextView("", new LayoutParams(FILL_PARENT, WRAP_CONTENT))); - root_->Add(new Button(d->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); + root_->Add(new Button(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); } diff --git a/UI/CwCheatScreen.cpp b/UI/CwCheatScreen.cpp index cf71bc89ec..75a43e11bc 100644 --- a/UI/CwCheatScreen.cpp +++ b/UI/CwCheatScreen.cpp @@ -61,7 +61,7 @@ void CwCheatScreen::CreateCodeList() { void CwCheatScreen::CreateViews() { using namespace UI; I18NCategory *cw = GetI18NCategory("CwCheats"); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); CreateCodeList(); g_Config.bReloadCheats = true; root_ = new LinearLayout(ORIENT_HORIZONTAL); @@ -69,7 +69,7 @@ void CwCheatScreen::CreateViews() { LinearLayout *leftColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(400, FILL_PARENT)); leftColumn->Add(new ItemHeader(cw->T("Options"))); - leftColumn->Add(new Choice(d->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); + leftColumn->Add(new Choice(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); //leftColumn->Add(new Choice(cw->T("Add Cheat")))->OnClick.Handle(this, &CwCheatScreen::OnAddCheat); leftColumn->Add(new Choice(cw->T("Import Cheats")))->OnClick.Handle(this, &CwCheatScreen::OnImportCheat); #if !defined(MOBILE_DEVICE) diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 7f15c202d3..7b44a1f420 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -300,7 +300,7 @@ const char *GetCompilerABI() { void SystemInfoScreen::CreateViews() { // NOTE: Do not translate this section. It will change a lot and will be impossible to keep up. - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); using namespace UI; root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); @@ -308,7 +308,7 @@ void SystemInfoScreen::CreateViews() { ViewGroup *leftColumn = new AnchorLayout(new LinearLayoutParams(1.0f)); root_->Add(leftColumn); - root_->Add(new Choice(d->T("Back"), "", false, new AnchorLayoutParams(225, 64, 10, NONE, NONE, 10)))->OnClick.Handle(this, &UIScreen::OnBack); + root_->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(225, 64, 10, NONE, NONE, 10)))->OnClick.Handle(this, &UIScreen::OnBack); TabHolder *tabHolder = new TabHolder(ORIENT_VERTICAL, 225, new AnchorLayoutParams(10, 0, 10, 0, false)); @@ -544,7 +544,7 @@ bool AddressPromptScreen::key(const KeyInput &key) { // Three panes: Block chooser, MIPS view, ARM/x86 view void JitCompareScreen::CreateViews() { - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); I18NCategory *dev = GetI18NCategory("Developer"); using namespace UI; @@ -572,7 +572,7 @@ void JitCompareScreen::CreateViews() { leftColumn->Add(new Choice(dev->T("FPU")))->OnClick.Handle(this, &JitCompareScreen::OnRandomFPUBlock); leftColumn->Add(new Choice(dev->T("VFPU")))->OnClick.Handle(this, &JitCompareScreen::OnRandomVFPUBlock); leftColumn->Add(new Choice(dev->T("Stats")))->OnClick.Handle(this, &JitCompareScreen::OnShowStats); - leftColumn->Add(new Choice(d->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); + leftColumn->Add(new Choice(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); blockName_ = leftColumn->Add(new TextView(dev->T("No block"))); blockAddr_ = leftColumn->Add(new TextEdit("", "", new LayoutParams(FILL_PARENT, WRAP_CONTENT))); blockAddr_->OnTextChange.Handle(this, &JitCompareScreen::OnAddressChange); diff --git a/UI/GameScreen.cpp b/UI/GameScreen.cpp index 60263c61f7..7c4570df03 100644 --- a/UI/GameScreen.cpp +++ b/UI/GameScreen.cpp @@ -47,7 +47,7 @@ GameScreen::~GameScreen() { void GameScreen::CreateViews() { GameInfo *info = g_gameInfoCache.GetInfo(NULL, gamePath_, GAMEINFO_WANTBG | GAMEINFO_WANTSIZE); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); I18NCategory *ga = GetI18NCategory("Game"); // Information in the top left. @@ -62,7 +62,7 @@ void GameScreen::CreateViews() { ViewGroup *leftColumn = new AnchorLayout(new LinearLayoutParams(1.0f)); root_->Add(leftColumn); - leftColumn->Add(new Choice(d->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle(this, &GameScreen::OnSwitchBack); + leftColumn->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle(this, &GameScreen::OnSwitchBack); if (info) { texvGameIcon_ = leftColumn->Add(new Thin3DTextureView(0, IS_DEFAULT, new AnchorLayoutParams(144 * 2, 80 * 2, 10, 10, NONE, NONE))); tvTitle_ = leftColumn->Add(new TextView(info->title, ALIGN_LEFT, false, new AnchorLayoutParams(10, 200, NONE, NONE))); @@ -137,10 +137,10 @@ void GameScreen::CallbackDeleteConfig(bool yes) UI::EventReturn GameScreen::OnDeleteConfig(UI::EventParams &e) { - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); I18NCategory *ga = GetI18NCategory("Game"); screenManager()->push( - new PromptScreen(d->T("DeleteConfirmGameConfig", "Do you really want to delete the settings for this game?"), ga->T("ConfirmDelete"), d->T("Cancel"), + new PromptScreen(di->T("DeleteConfirmGameConfig", "Do you really want to delete the settings for this game?"), ga->T("ConfirmDelete"), di->T("Cancel"), std::bind(&GameScreen::CallbackDeleteConfig, this, placeholder::_1))); return UI::EVENT_DONE; @@ -223,7 +223,7 @@ UI::EventReturn GameScreen::OnGameSettings(UI::EventParams &e) { } UI::EventReturn GameScreen::OnDeleteSaveData(UI::EventParams &e) { - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); I18NCategory *ga = GetI18NCategory("Game"); GameInfo *info = g_gameInfoCache.GetInfo(NULL, gamePath_, GAMEINFO_WANTBG | GAMEINFO_WANTSIZE); if (info) { @@ -231,7 +231,7 @@ UI::EventReturn GameScreen::OnDeleteSaveData(UI::EventParams &e) { std::vector saveDirs = info->GetSaveDataDirectories(); if (saveDirs.size()) { screenManager()->push( - new PromptScreen(d->T("DeleteConfirmAll", "Do you really want to delete all\nyour save data for this game?"), ga->T("ConfirmDelete"), d->T("Cancel"), + new PromptScreen(di->T("DeleteConfirmAll", "Do you really want to delete all\nyour save data for this game?"), ga->T("ConfirmDelete"), di->T("Cancel"), std::bind(&GameScreen::CallbackDeleteSaveData, this, placeholder::_1))); } } @@ -250,12 +250,12 @@ void GameScreen::CallbackDeleteSaveData(bool yes) { } UI::EventReturn GameScreen::OnDeleteGame(UI::EventParams &e) { - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); I18NCategory *ga = GetI18NCategory("Game"); GameInfo *info = g_gameInfoCache.GetInfo(NULL, gamePath_, GAMEINFO_WANTBG | GAMEINFO_WANTSIZE); if (info) { screenManager()->push( - new PromptScreen(d->T("DeleteConfirmGame", "Do you really want to delete this game\nfrom your device? You can't undo this."), ga->T("ConfirmDelete"), d->T("Cancel"), + new PromptScreen(di->T("DeleteConfirmGame", "Do you really want to delete this game\nfrom your device? You can't undo this."), ga->T("ConfirmDelete"), di->T("Cancel"), std::bind(&GameScreen::CallbackDeleteGame, this, placeholder::_1))); } diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index e5755aa91d..ad7049ef7d 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -91,7 +91,7 @@ void GameSettingsScreen::CreateViews() { // Scrolling action menu to the right. using namespace UI; - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); I18NCategory *gs = GetI18NCategory("Graphics"); I18NCategory *co = GetI18NCategory("Controls"); I18NCategory *a = GetI18NCategory("Audio"); @@ -111,11 +111,11 @@ void GameSettingsScreen::CreateViews() { if (vertical) { tabHolder = new TabHolder(ORIENT_HORIZONTAL, 200, new LinearLayoutParams(1.0f)); root_->Add(tabHolder); - root_->Add(new Choice(d->T("Back"), "", false, new LinearLayoutParams(0.0f)))->OnClick.Handle(this, &UIScreen::OnBack); + root_->Add(new Choice(di->T("Back"), "", false, new LinearLayoutParams(0.0f)))->OnClick.Handle(this, &UIScreen::OnBack); } else { tabHolder = new TabHolder(ORIENT_VERTICAL, 200, new AnchorLayoutParams(10, 0, 10, 0, false)); root_->Add(tabHolder); - root_->Add(new Choice(d->T("Back"), "", false, new AnchorLayoutParams(150, 64, 10, NONE, NONE, 10)))->OnClick.Handle(this, &UIScreen::OnBack); + root_->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, 64, 10, NONE, NONE, 10)))->OnClick.Handle(this, &UIScreen::OnBack); } root_->SetDefaultFocusView(tabHolder); @@ -864,11 +864,11 @@ void GameSettingsScreen::CallbackRenderingBackend(bool yes) { UI::EventReturn GameSettingsScreen::OnRenderingBackend(UI::EventParams &e) { #if defined(_WIN32) - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); // It only makes sense to show the restart prompt if the backend was actually changed. if (g_Config.iTempGPUBackend != g_Config.iGPUBackend) { - screenManager()->push(new PromptScreen(d->T("ChangingGPUBackends", "Changing GPU backends requires PPSSPP to restart. Restart now?"), d->T("Yes"), d->T("No"), + screenManager()->push(new PromptScreen(di->T("ChangingGPUBackends", "Changing GPU backends requires PPSSPP to restart. Restart now?"), di->T("Yes"), di->T("No"), std::bind(&GameSettingsScreen::CallbackRenderingBackend, this, placeholder::_1))); } #endif @@ -990,7 +990,7 @@ void DeveloperToolsScreen::CreateViews() { using namespace UI; root_ = new ScrollView(ORIENT_VERTICAL); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); I18NCategory *dev = GetI18NCategory("Developer"); I18NCategory *gs = GetI18NCategory("Graphics"); I18NCategory *a = GetI18NCategory("Audio"); @@ -1031,7 +1031,7 @@ void DeveloperToolsScreen::CreateViews() { list->Add(new Choice(dev->T("Load language ini")))->OnClick.Handle(this, &DeveloperToolsScreen::OnLoadLanguageIni); list->Add(new Choice(dev->T("Save language ini")))->OnClick.Handle(this, &DeveloperToolsScreen::OnSaveLanguageIni); list->Add(new ItemHeader("")); - list->Add(new Choice(d->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); + list->Add(new Choice(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); } void DeveloperToolsScreen::onFinish(DialogResult result) { @@ -1046,17 +1046,17 @@ void GameSettingsScreen::CallbackRestoreDefaults(bool yes) { UI::EventReturn GameSettingsScreen::OnRestoreDefaultSettings(UI::EventParams &e) { I18NCategory *dev = GetI18NCategory("Developer"); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); if (g_Config.bGameSpecific) { screenManager()->push( - new PromptScreen(dev->T("RestoreGameDefaultSettings", "Are you sure you want to restore the game-specific settings back to the ppsspp defaults?\n"), d->T("OK"), d->T("Cancel"), + new PromptScreen(dev->T("RestoreGameDefaultSettings", "Are you sure you want to restore the game-specific settings back to the ppsspp defaults?\n"), di->T("OK"), di->T("Cancel"), std::bind(&GameSettingsScreen::CallbackRestoreDefaults, this, placeholder::_1))); } else { screenManager()->push( - new PromptScreen(dev->T("RestoreDefaultSettings", "Are you sure you want to restore all settings(except control mapping)\nback to their defaults?\nYou can't undo this.\nPlease restart PPSSPP after restoring settings."), d->T("OK"), d->T("Cancel"), + new PromptScreen(dev->T("RestoreDefaultSettings", "Are you sure you want to restore all settings(except control mapping)\nback to their defaults?\nYou can't undo this.\nPlease restart PPSSPP after restoring settings."), di->T("OK"), di->T("Cancel"), std::bind(&GameSettingsScreen::CallbackRestoreDefaults, this, placeholder::_1))); } @@ -1096,7 +1096,7 @@ UI::EventReturn DeveloperToolsScreen::OnJitAffectingSetting(UI::EventParams &e) void ProAdhocServerScreen::CreateViews() { using namespace UI; I18NCategory *s = GetI18NCategory("System"); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); tempProAdhocServer = g_Config.proAdhocServer; root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); @@ -1117,10 +1117,10 @@ void ProAdhocServerScreen::CreateViews() { rightColumn->Add(new Button("8"))->OnClick.Handle(this, &ProAdhocServerScreen::On8Click); rightColumn->Add(new Button("9"))->OnClick.Handle(this, &ProAdhocServerScreen::On9Click); rightColumn->Add(new Button("."))->OnClick.Handle(this, &ProAdhocServerScreen::OnPointClick); - rightColumn->Add(new Button(d->T("Delete")))->OnClick.Handle(this, &ProAdhocServerScreen::OnDeleteClick); - rightColumn->Add(new Button(d->T("Delete all")))->OnClick.Handle(this, &ProAdhocServerScreen::OnDeleteAllClick); - rightColumn->Add(new Button(d->T("OK")))->OnClick.Handle(this, &ProAdhocServerScreen::OnOKClick); - rightColumn->Add(new Button(d->T("Cancel")))->OnClick.Handle(this, &ProAdhocServerScreen::OnCancelClick); + rightColumn->Add(new Button(di->T("Delete")))->OnClick.Handle(this, &ProAdhocServerScreen::OnDeleteClick); + rightColumn->Add(new Button(di->T("Delete all")))->OnClick.Handle(this, &ProAdhocServerScreen::OnDeleteAllClick); + rightColumn->Add(new Button(di->T("OK")))->OnClick.Handle(this, &ProAdhocServerScreen::OnOKClick); + rightColumn->Add(new Button(di->T("Cancel")))->OnClick.Handle(this, &ProAdhocServerScreen::OnCancelClick); root_->Add(leftColumn); root_->Add(rightColumn); } diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index ad82a910b4..03f3d34f03 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -1094,7 +1094,7 @@ void UmdReplaceScreen::CreateViews() { using namespace UI; Margins actionMenuMargins(0, 100, 15, 0); I18NCategory *m = GetI18NCategory("MainMenu"); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); TabHolder *leftColumn = new TabHolder(ORIENT_HORIZONTAL, 64, new LinearLayoutParams(1.0)); leftColumn->SetClip(true); @@ -1128,7 +1128,7 @@ void UmdReplaceScreen::CreateViews() { tabAllGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected); - rightColumnItems->Add(new Choice(d->T("Cancel")))->OnClick.Handle(this, &UmdReplaceScreen::OnCancel); + rightColumnItems->Add(new Choice(di->T("Cancel")))->OnClick.Handle(this, &UmdReplaceScreen::OnCancel); rightColumnItems->Add(new Choice(m->T("Game Settings")))->OnClick.Handle(this, &UmdReplaceScreen::OnGameSettings); if (g_Config.recentIsos.size() > 0) { diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index d26a8bc258..9d3311639c 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -212,9 +212,9 @@ void UIDialogScreenWithBackground::sendMessage(const char *message, const char * PromptScreen::PromptScreen(std::string message, std::string yesButtonText, std::string noButtonText, std::function callback) : message_(message), callback_(callback) { - I18NCategory *d = GetI18NCategory("Dialog"); - yesButtonText_ = d->T(yesButtonText.c_str()); - noButtonText_ = d->T(noButtonText.c_str()); + I18NCategory *di = GetI18NCategory("Dialog"); + yesButtonText_ = di->T(yesButtonText.c_str()); + noButtonText_ = di->T(noButtonText.c_str()); } void PromptScreen::CreateViews() { @@ -456,11 +456,11 @@ void LogoScreen::render() { void CreditsScreen::CreateViews() { using namespace UI; - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); I18NCategory *c = GetI18NCategory("PSPCredits"); root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); - Button *back = root_->Add(new Button(d->T("Back"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 10, false))); + Button *back = root_->Add(new Button(di->T("Back"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 10, false))); back->OnClick.Handle(this, &CreditsScreen::OnOK); root_->SetDefaultFocusView(back); #ifndef GOLD diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index f6254e82e2..7144748a0e 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -424,10 +424,10 @@ UI::EventReturn GamePauseScreen::OnCreateConfig(UI::EventParams &e) } UI::EventReturn GamePauseScreen::OnDeleteConfig(UI::EventParams &e) { - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); I18NCategory *ga = GetI18NCategory("Game"); screenManager()->push( - new PromptScreen(d->T("DeleteConfirmGameConfig", "Do you really want to delete the settings for this game?"), ga->T("ConfirmDelete"), d->T("Cancel"), + new PromptScreen(di->T("DeleteConfirmGameConfig", "Do you really want to delete the settings for this game?"), ga->T("ConfirmDelete"), di->T("Cancel"), std::bind(&GamePauseScreen::CallbackDeleteConfig, this, placeholder::_1))); return UI::EVENT_DONE; diff --git a/UI/ReportScreen.cpp b/UI/ReportScreen.cpp index bd3a3db497..b8bd189bd9 100644 --- a/UI/ReportScreen.cpp +++ b/UI/ReportScreen.cpp @@ -131,7 +131,7 @@ EventReturn ReportScreen::HandleChoice(EventParams &e) { void ReportScreen::CreateViews() { I18NCategory *rp = GetI18NCategory("Reporting"); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); Margins actionMenuMargins(0, 100, 15, 0); ViewGroup *leftColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, FILL_PARENT, 0.4f)); LinearLayout *leftColumnItems = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(WRAP_CONTENT, FILL_PARENT)); @@ -153,7 +153,7 @@ void ReportScreen::CreateViews() { submit_->SetEnabled(overall_ >= 0 && graphics_ >= 0 && speed_ >= 0 && gameplay_ >= 0); rightColumnItems->Add(new Spacer(25.0)); - rightColumnItems->Add(new Choice(d->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle(this, &UIScreen::OnBack); + rightColumnItems->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle(this, &UIScreen::OnBack); root_ = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f)); root_->Add(leftColumn); diff --git a/UI/TiltAnalogSettingsScreen.cpp b/UI/TiltAnalogSettingsScreen.cpp index 23f46e187b..fc7ae6a8cc 100644 --- a/UI/TiltAnalogSettingsScreen.cpp +++ b/UI/TiltAnalogSettingsScreen.cpp @@ -24,7 +24,7 @@ void TiltAnalogSettingsScreen::CreateViews() { using namespace UI; I18NCategory *co = GetI18NCategory("Controls"); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); root_ = new ScrollView(ORIENT_VERTICAL); @@ -51,7 +51,7 @@ void TiltAnalogSettingsScreen::CreateViews() { root_->Add(settings); settings->Add(new ItemHeader("")); - settings->Add(new Choice(d->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); + settings->Add(new Choice(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); } void TiltAnalogSettingsScreen::update(InputState &input) { diff --git a/UI/TouchControlLayoutScreen.cpp b/UI/TouchControlLayoutScreen.cpp index 35f2c1a16b..b6f2cd17f9 100644 --- a/UI/TouchControlLayoutScreen.cpp +++ b/UI/TouchControlLayoutScreen.cpp @@ -311,19 +311,19 @@ void TouchControlLayoutScreen::CreateViews() { using namespace UI; I18NCategory *co = GetI18NCategory("Controls"); - I18NCategory *d = GetI18NCategory("Dialog"); + I18NCategory *di = GetI18NCategory("Dialog"); root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); - Choice *reset = new Choice(d->T("Reset"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 84)); - Choice *back = new Choice(d->T("Back"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 10)); + Choice *reset = new Choice(di->T("Reset"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 84)); + Choice *back = new Choice(di->T("Back"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 10)); Choice *visibility = new Choice(co->T("Visibility"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 158)); // controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fButtonScale, 0.80, 2.0, co->T("Button Scaling"), screenManager())) // ->OnChange.Handle(this, &GameSettingsScreen::OnChangeControlScaling); mode_ = new ChoiceStrip(ORIENT_VERTICAL, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 158 + 64 + 10)); - mode_->AddChoice(d->T("Move")); - mode_->AddChoice(d->T("Resize")); + mode_->AddChoice(di->T("Move")); + mode_->AddChoice(di->T("Resize")); mode_->SetSelection(0); reset->OnClick.Handle(this, &TouchControlLayoutScreen::OnReset); From 70d9e6cecb689fae678991f899e30d04b0ea35e5 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Wed, 1 Jul 2015 23:34:50 +0200 Subject: [PATCH 05/16] Consistently use *err for the Error i18n category --- UI/EmuScreen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 6089754b60..f1becc7139 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -695,11 +695,11 @@ void EmuScreen::update(InputState &input) { quit_ = true; return; } - I18NCategory *g = GetI18NCategory("Error"); - std::string errLoadingFile = g->T("Error loading file", "Could not load game"); + I18NCategory *err = GetI18NCategory("Error"); + std::string errLoadingFile = err->T("Error loading file", "Could not load game"); errLoadingFile.append(" "); - errLoadingFile.append(g->T(errorMessage_.c_str())); + errLoadingFile.append(err->T(errorMessage_.c_str())); screenManager()->push(new PromptScreen(errLoadingFile, "OK", "")); errorMessage_ = ""; From e791bea8a96757be10aa1adfcf2658e93de708f5 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Wed, 1 Jul 2015 23:50:16 +0200 Subject: [PATCH 06/16] Consistently use *gr for the Graphics i18n category --- GPU/GLES/ShaderManager.cpp | 4 +- UI/GameSettingsScreen.cpp | 128 ++++++++++++++++++------------------- UI/PauseScreen.cpp | 2 +- Windows/WndMainWindow.cpp | 28 ++++---- 4 files changed, 81 insertions(+), 81 deletions(-) diff --git a/GPU/GLES/ShaderManager.cpp b/GPU/GLES/ShaderManager.cpp index effebea574..503e4a0ba8 100644 --- a/GPU/GLES/ShaderManager.cpp +++ b/GPU/GLES/ShaderManager.cpp @@ -783,9 +783,9 @@ Shader *ShaderManager::ApplyVertexShader(int prim, u32 vertType) { vs = new Shader(codeBuffer_, GL_VERTEX_SHADER, useHWTransform, VSID); if (vs->Failed()) { - I18NCategory *gs = GetI18NCategory("Graphics"); + I18NCategory *gr = GetI18NCategory("Graphics"); ERROR_LOG(G3D, "Shader compilation failed, falling back to software transform"); - osm.Show(gs->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF, -1, true); + osm.Show(gr->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF, -1, true); delete vs; // TODO: Look for existing shader with the appropriate ID, use that instead of generating a new one - however, need to make sure diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index ad7049ef7d..82973eb1d8 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -92,7 +92,7 @@ void GameSettingsScreen::CreateViews() { using namespace UI; I18NCategory *di = GetI18NCategory("Dialog"); - I18NCategory *gs = GetI18NCategory("Graphics"); + I18NCategory *gr = GetI18NCategory("Graphics"); I18NCategory *co = GetI18NCategory("Controls"); I18NCategory *a = GetI18NCategory("Audio"); I18NCategory *sa = GetI18NCategory("Savedata"); @@ -128,64 +128,64 @@ void GameSettingsScreen::CreateViews() { graphicsSettingsScroll->Add(graphicsSettings); tabHolder->AddTab(ms->T("Graphics"), graphicsSettingsScroll); - graphicsSettings->Add(new ItemHeader(gs->T("Rendering Mode"))); + graphicsSettings->Add(new ItemHeader(gr->T("Rendering Mode"))); #if defined(_WIN32) static const char *renderingBackend[] = { "OpenGL", "Direct3D9" }; - PopupMultiChoice *renderingBackendChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTempGPUBackend, gs->T("Backend"), renderingBackend, GPU_BACKEND_OPENGL, ARRAY_SIZE(renderingBackend), gs, screenManager())); + PopupMultiChoice *renderingBackendChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTempGPUBackend, gr->T("Backend"), renderingBackend, GPU_BACKEND_OPENGL, ARRAY_SIZE(renderingBackend), gs, screenManager())); renderingBackendChoice->OnChoice.Handle(this, &GameSettingsScreen::OnRenderingBackend); #endif static const char *renderingMode[] = { "Non-Buffered Rendering", "Buffered Rendering", "Read Framebuffers To Memory (CPU)", "Read Framebuffers To Memory (GPU)"}; - PopupMultiChoice *renderingModeChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iRenderingMode, gs->T("Mode"), renderingMode, 0, ARRAY_SIZE(renderingMode), gs, screenManager())); + PopupMultiChoice *renderingModeChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iRenderingMode, gr->T("Mode"), renderingMode, 0, ARRAY_SIZE(renderingMode), gs, screenManager())); renderingModeChoice->OnChoice.Handle(this, &GameSettingsScreen::OnRenderingMode); renderingModeChoice->SetDisabledPtr(&g_Config.bSoftwareRendering); - CheckBox *blockTransfer = graphicsSettings->Add(new CheckBox(&g_Config.bBlockTransferGPU, gs->T("Simulate Block Transfer", "Simulate Block Transfer (unfinished)"))); + CheckBox *blockTransfer = graphicsSettings->Add(new CheckBox(&g_Config.bBlockTransferGPU, gr->T("Simulate Block Transfer", "Simulate Block Transfer (unfinished)"))); blockTransfer->SetDisabledPtr(&g_Config.bSoftwareRendering); - graphicsSettings->Add(new ItemHeader(gs->T("Frame Rate Control"))); + graphicsSettings->Add(new ItemHeader(gr->T("Frame Rate Control"))); static const char *frameSkip[] = {"Off", "1", "2", "3", "4", "5", "6", "7", "8"}; - graphicsSettings->Add(new PopupMultiChoice(&g_Config.iFrameSkip, gs->T("Frame Skipping"), frameSkip, 0, ARRAY_SIZE(frameSkip), gs, screenManager())); - frameSkipAuto_ = graphicsSettings->Add(new CheckBox(&g_Config.bAutoFrameSkip, gs->T("Auto FrameSkip"))); + graphicsSettings->Add(new PopupMultiChoice(&g_Config.iFrameSkip, gr->T("Frame Skipping"), frameSkip, 0, ARRAY_SIZE(frameSkip), gs, screenManager())); + frameSkipAuto_ = graphicsSettings->Add(new CheckBox(&g_Config.bAutoFrameSkip, gr->T("Auto FrameSkip"))); frameSkipAuto_->OnClick.Handle(this, &GameSettingsScreen::OnAutoFrameskip); - graphicsSettings->Add(new CheckBox(&cap60FPS_, gs->T("Force max 60 FPS (helps GoW)"))); + graphicsSettings->Add(new CheckBox(&cap60FPS_, gr->T("Force max 60 FPS (helps GoW)"))); - graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercent_, 0, 600, gs->T("Alternative Speed", "Alternative Speed (in %, 0 = unlimited)"), 5, screenManager())); + graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercent_, 0, 600, gr->T("Alternative Speed", "Alternative Speed (in %, 0 = unlimited)"), 5, screenManager())); - graphicsSettings->Add(new ItemHeader(gs->T("Features"))); + graphicsSettings->Add(new ItemHeader(gr->T("Features"))); I18NCategory *ps = GetI18NCategory("PostShaders"); - postProcChoice_ = graphicsSettings->Add(new ChoiceWithValueDisplay(&g_Config.sPostShaderName, gs->T("Postprocessing Shader"), ps)); + postProcChoice_ = graphicsSettings->Add(new ChoiceWithValueDisplay(&g_Config.sPostShaderName, gr->T("Postprocessing Shader"), ps)); postProcChoice_->OnClick.Handle(this, &GameSettingsScreen::OnPostProcShader); postProcEnable_ = !g_Config.bSoftwareRendering && (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE); postProcChoice_->SetEnabledPtr(&postProcEnable_); #if !defined(MOBILE_DEVICE) - graphicsSettings->Add(new CheckBox(&g_Config.bFullScreen, gs->T("FullScreen")))->OnClick.Handle(this, &GameSettingsScreen::OnFullscreenChange); + graphicsSettings->Add(new CheckBox(&g_Config.bFullScreen, gr->T("FullScreen")))->OnClick.Handle(this, &GameSettingsScreen::OnFullscreenChange); #endif - graphicsSettings->Add(new CheckBox(&g_Config.bStretchToDisplay, gs->T("Stretch to Display"))); + graphicsSettings->Add(new CheckBox(&g_Config.bStretchToDisplay, gr->T("Stretch to Display"))); // Small Display: To avoid overlapping touch controls on large tablets. Better control over this will be coming later. - graphicsSettings->Add(new CheckBox(&g_Config.bSmallDisplay, gs->T("Small Display"))); + graphicsSettings->Add(new CheckBox(&g_Config.bSmallDisplay, gr->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.bPartialStretch, gr->T("Partial Vertical Stretch"))); #ifdef ANDROID // 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); + graphicsSettings->Add(new CheckBox(&g_Config.bImmersiveMode, gr->T("Immersive Mode")))->OnClick.Handle(this, &GameSettingsScreen::OnImmersiveModeChange); } #endif - graphicsSettings->Add(new ItemHeader(gs->T("Performance"))); + graphicsSettings->Add(new ItemHeader(gr->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 static const char *internalResolutions[] = {"Auto (1:1)", "1x PSP", "2x PSP", "3x PSP", "4x PSP", "5x PSP" }; #endif - resolutionChoice_ = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalResolution, gs->T("Rendering Resolution"), internalResolutions, 0, ARRAY_SIZE(internalResolutions), gs, screenManager())); + resolutionChoice_ = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalResolution, gr->T("Rendering Resolution"), internalResolutions, 0, ARRAY_SIZE(internalResolutions), gs, screenManager())); resolutionChoice_->OnChoice.Handle(this, &GameSettingsScreen::OnResolutionChange); resolutionEnable_ = !g_Config.bSoftwareRendering && (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE); resolutionChoice_->SetEnabledPtr(&resolutionEnable_); static const char *displayRotation[] = {"Landscape", "Portrait", "Landscape Reversed", "Portrait Reversed"}; - PopupMultiChoice *dispRotChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalScreenRotation, gs->T("Display Rotation"), displayRotation, 1, ARRAY_SIZE(displayRotation), c, screenManager())); + PopupMultiChoice *dispRotChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalScreenRotation, gr->T("Display Rotation"), displayRotation, 1, ARRAY_SIZE(displayRotation), c, screenManager())); dispRotChoice->SetEnabledPtr(&displayRotEnable_); displayRotEnable_ = (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE); @@ -193,50 +193,50 @@ void GameSettingsScreen::CreateViews() { static const char *deviceResolutions[] = { "Native device resolution", "Auto (same as Rendering)", "1x PSP", "2x PSP", "3x PSP", "4x PSP", "5x PSP" }; int max_res_temp = std::max(System_GetPropertyInt(SYSPROP_DISPLAY_XRES), System_GetPropertyInt(SYSPROP_DISPLAY_YRES)) / 480 + 2; int max_res = std::min(max_res_temp, (int)ARRAY_SIZE(deviceResolutions)); - UI::PopupMultiChoice *hwscale = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAndroidHwScale, gs->T("Display Resolution (HW scaler)"), deviceResolutions, 0, max_res, gs, screenManager())); + UI::PopupMultiChoice *hwscale = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAndroidHwScale, gr->T("Display Resolution (HW scaler)"), deviceResolutions, 0, max_res, gs, screenManager())); hwscale->OnChoice.Handle(this, &GameSettingsScreen::OnHwScaleChange); // To refresh the display mode #endif #ifdef _WIN32 - graphicsSettings->Add(new CheckBox(&g_Config.bVSync, gs->T("VSync"))); + graphicsSettings->Add(new CheckBox(&g_Config.bVSync, gr->T("VSync"))); #endif - CheckBox *mipmapping = graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gs->T("Mipmapping"))); + CheckBox *mipmapping = graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gr->T("Mipmapping"))); mipmapping->SetDisabledPtr(&g_Config.bSoftwareRendering); - CheckBox *hwTransform = graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gs->T("Hardware Transform"))); + CheckBox *hwTransform = graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gr->T("Hardware Transform"))); hwTransform->OnClick.Handle(this, &GameSettingsScreen::OnHardwareTransform); hwTransform->SetDisabledPtr(&g_Config.bSoftwareRendering); - CheckBox *swSkin = graphicsSettings->Add(new CheckBox(&g_Config.bSoftwareSkinning, gs->T("Software Skinning"))); + CheckBox *swSkin = graphicsSettings->Add(new CheckBox(&g_Config.bSoftwareSkinning, gr->T("Software Skinning"))); swSkin->SetDisabledPtr(&g_Config.bSoftwareRendering); - CheckBox *vtxCache = graphicsSettings->Add(new CheckBox(&g_Config.bVertexCache, gs->T("Vertex Cache"))); + CheckBox *vtxCache = graphicsSettings->Add(new CheckBox(&g_Config.bVertexCache, gr->T("Vertex Cache"))); vtxCacheEnable_ = !g_Config.bSoftwareRendering && g_Config.bHardwareTransform; vtxCache->SetEnabledPtr(&vtxCacheEnable_); - CheckBox *texBackoff = graphicsSettings->Add(new CheckBox(&g_Config.bTextureBackoffCache, gs->T("Lazy texture caching", "Lazy texture caching (speedup)"))); + CheckBox *texBackoff = graphicsSettings->Add(new CheckBox(&g_Config.bTextureBackoffCache, gr->T("Lazy texture caching", "Lazy texture caching (speedup)"))); texBackoff->SetDisabledPtr(&g_Config.bSoftwareRendering); - CheckBox *texSecondary_ = graphicsSettings->Add(new CheckBox(&g_Config.bTextureSecondaryCache, gs->T("Retain changed textures", "Retain changed textures (speedup, mem hog)"))); + CheckBox *texSecondary_ = graphicsSettings->Add(new CheckBox(&g_Config.bTextureSecondaryCache, gr->T("Retain changed textures", "Retain changed textures (speedup, mem hog)"))); texSecondary_->SetDisabledPtr(&g_Config.bSoftwareRendering); - CheckBox *framebufferSlowEffects = graphicsSettings->Add(new CheckBox(&g_Config.bDisableSlowFramebufEffects, gs->T("Disable slower effects (speedup)"))); + CheckBox *framebufferSlowEffects = graphicsSettings->Add(new CheckBox(&g_Config.bDisableSlowFramebufEffects, gr->T("Disable slower effects (speedup)"))); framebufferSlowEffects->SetDisabledPtr(&g_Config.bSoftwareRendering); // Seems solid, so we hide the setting. - // CheckBox *vtxJit = graphicsSettings->Add(new CheckBox(&g_Config.bVertexDecoderJit, gs->T("Vertex Decoder JIT"))); + // CheckBox *vtxJit = graphicsSettings->Add(new CheckBox(&g_Config.bVertexDecoderJit, gr->T("Vertex Decoder JIT"))); // if (PSP_IsInited()) { // vtxJit->SetEnabled(false); // } static const char *quality[] = { "Low", "Medium", "High"}; - PopupMultiChoice *beziersChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iSplineBezierQuality, gs->T("LowCurves", "Spline/Bezier curves quality"), quality, 0, ARRAY_SIZE(quality), gs, screenManager())); + PopupMultiChoice *beziersChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iSplineBezierQuality, gr->T("LowCurves", "Spline/Bezier curves quality"), quality, 0, ARRAY_SIZE(quality), gs, screenManager())); beziersChoice->SetDisabledPtr(&g_Config.bSoftwareRendering); // In case we're going to add few other antialiasing option like MSAA in the future. - // graphicsSettings->Add(new CheckBox(&g_Config.bFXAA, gs->T("FXAA"))); - graphicsSettings->Add(new ItemHeader(gs->T("Texture Scaling"))); + // graphicsSettings->Add(new CheckBox(&g_Config.bFXAA, gr->T("FXAA"))); + graphicsSettings->Add(new ItemHeader(gr->T("Texture Scaling"))); #ifndef MOBILE_DEVICE static const char *texScaleLevelsNPOT[] = {"Auto", "Off", "2x", "3x", "4x", "5x"}; static const char *texScaleLevelsPOT[] = {"Auto", "Off", "2x", "4x"}; @@ -254,83 +254,83 @@ void GameSettingsScreen::CreateViews() { texScaleLevels = texScaleLevelsPOT; numTexScaleLevels = ARRAY_SIZE(texScaleLevelsPOT); } - PopupMultiChoice *texScalingChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingLevel, gs->T("Upscale Level"), texScaleLevels, 0, numTexScaleLevels, gs, screenManager())); + PopupMultiChoice *texScalingChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingLevel, gr->T("Upscale Level"), texScaleLevels, 0, numTexScaleLevels, gs, screenManager())); texScalingChoice->SetDisabledPtr(&g_Config.bSoftwareRendering); static const char *texScaleAlgos[] = { "xBRZ", "Hybrid", "Bicubic", "Hybrid + Bicubic", }; - PopupMultiChoice *texScalingType = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingType, gs->T("Upscale Type"), texScaleAlgos, 0, ARRAY_SIZE(texScaleAlgos), gs, screenManager())); + PopupMultiChoice *texScalingType = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingType, gr->T("Upscale Type"), texScaleAlgos, 0, ARRAY_SIZE(texScaleAlgos), gs, screenManager())); texScalingType->SetDisabledPtr(&g_Config.bSoftwareRendering); - CheckBox *deposterize = graphicsSettings->Add(new CheckBox(&g_Config.bTexDeposterize, gs->T("Deposterize"))); + CheckBox *deposterize = graphicsSettings->Add(new CheckBox(&g_Config.bTexDeposterize, gr->T("Deposterize"))); deposterize->SetDisabledPtr(&g_Config.bSoftwareRendering); - graphicsSettings->Add(new ItemHeader(gs->T("Texture Filtering"))); + graphicsSettings->Add(new ItemHeader(gr->T("Texture Filtering"))); static const char *anisoLevels[] = { "Off", "2x", "4x", "8x", "16x" }; - PopupMultiChoice *anisoFiltering = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAnisotropyLevel, gs->T("Anisotropic Filtering"), anisoLevels, 0, ARRAY_SIZE(anisoLevels), gs, screenManager())); + PopupMultiChoice *anisoFiltering = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAnisotropyLevel, gr->T("Anisotropic Filtering"), anisoLevels, 0, ARRAY_SIZE(anisoLevels), gs, screenManager())); anisoFiltering->SetDisabledPtr(&g_Config.bSoftwareRendering); static const char *texFilters[] = { "Auto", "Nearest", "Linear", "Linear on FMV", }; - PopupMultiChoice *texFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexFiltering, gs->T("Texture Filter"), texFilters, 1, ARRAY_SIZE(texFilters), gs, screenManager())); + PopupMultiChoice *texFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexFiltering, gr->T("Texture Filter"), texFilters, 1, ARRAY_SIZE(texFilters), gs, screenManager())); texFilter->SetDisabledPtr(&g_Config.bSoftwareRendering); static const char *bufFilters[] = { "Linear", "Nearest", }; - PopupMultiChoice *bufFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBufFilter, gs->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gs, screenManager())); + PopupMultiChoice *bufFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBufFilter, gr->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gs, screenManager())); bufFilter->SetDisabledPtr(&g_Config.bSoftwareRendering); #ifdef ANDROID - graphicsSettings->Add(new ItemHeader(gs->T("Cardboard Settings", "Cardboard Settings"))); - CheckBox *cardboardMode = graphicsSettings->Add(new CheckBox(&g_Config.bEnableCardboard, gs->T("Enable Cardboard", "Enable Cardboard"))); + graphicsSettings->Add(new ItemHeader(gr->T("Cardboard Settings", "Cardboard Settings"))); + CheckBox *cardboardMode = graphicsSettings->Add(new CheckBox(&g_Config.bEnableCardboard, gr->T("Enable Cardboard", "Enable Cardboard"))); cardboardMode->SetDisabledPtr(&g_Config.bSoftwareRendering); - PopupSliderChoice * cardboardScreenSize = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardScreenSize, 30, 100, gs->T("Cardboard Screen Size", "Screen Size (in % of the viewport)"), 1, screenManager())); + PopupSliderChoice * cardboardScreenSize = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardScreenSize, 30, 100, gr->T("Cardboard Screen Size", "Screen Size (in % of the viewport)"), 1, screenManager())); cardboardScreenSize->SetDisabledPtr(&g_Config.bSoftwareRendering); - PopupSliderChoice *cardboardXShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardXShift, -100, 100, gs->T("Cardboard Screen X Shift", "X Shift (in % of the void)"), 1, screenManager())); + PopupSliderChoice *cardboardXShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardXShift, -100, 100, gr->T("Cardboard Screen X Shift", "X Shift (in % of the void)"), 1, screenManager())); cardboardXShift->SetDisabledPtr(&g_Config.bSoftwareRendering); - PopupSliderChoice *cardboardYShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardYShift, -100, 100, gs->T("Cardboard Screen Y Shift", "Y Shift (in % of the void)"), 1, screenManager())); + PopupSliderChoice *cardboardYShift = graphicsSettings->Add(new PopupSliderChoice(&g_Config.iCardboardYShift, -100, 100, gr->T("Cardboard Screen Y Shift", "Y Shift (in % of the void)"), 1, screenManager())); cardboardYShift->SetDisabledPtr(&g_Config.bSoftwareRendering); #endif - graphicsSettings->Add(new ItemHeader(gs->T("Hack Settings", "Hack Settings (these WILL cause glitches)"))); - graphicsSettings->Add(new CheckBox(&g_Config.bTimerHack, gs->T("Timer Hack"))); - CheckBox *alphaHack = graphicsSettings->Add(new CheckBox(&g_Config.bDisableAlphaTest, gs->T("Disable Alpha Test (PowerVR speedup)"))); + graphicsSettings->Add(new ItemHeader(gr->T("Hack Settings", "Hack Settings (these WILL cause glitches)"))); + graphicsSettings->Add(new CheckBox(&g_Config.bTimerHack, gr->T("Timer Hack"))); + CheckBox *alphaHack = graphicsSettings->Add(new CheckBox(&g_Config.bDisableAlphaTest, gr->T("Disable Alpha Test (PowerVR speedup)"))); alphaHack->OnClick.Handle(this, &GameSettingsScreen::OnShaderChange); alphaHack->SetDisabledPtr(&g_Config.bSoftwareRendering); - CheckBox *stencilTest = graphicsSettings->Add(new CheckBox(&g_Config.bDisableStencilTest, gs->T("Disable Stencil Test"))); + CheckBox *stencilTest = graphicsSettings->Add(new CheckBox(&g_Config.bDisableStencilTest, gr->T("Disable Stencil Test"))); stencilTest->SetDisabledPtr(&g_Config.bSoftwareRendering); - CheckBox *depthWrite = graphicsSettings->Add(new CheckBox(&g_Config.bAlwaysDepthWrite, gs->T("Always Depth Write"))); + CheckBox *depthWrite = graphicsSettings->Add(new CheckBox(&g_Config.bAlwaysDepthWrite, gr->T("Always Depth Write"))); depthWrite->SetDisabledPtr(&g_Config.bSoftwareRendering); - CheckBox *prescale = graphicsSettings->Add(new CheckBox(&g_Config.bPrescaleUV, gs->T("Texture Coord Speedhack"))); + CheckBox *prescale = graphicsSettings->Add(new CheckBox(&g_Config.bPrescaleUV, gr->T("Texture Coord Speedhack"))); prescale->SetDisabledPtr(&g_Config.bSoftwareRendering); - CheckBox *depthRange = graphicsSettings->Add(new CheckBox(&g_Config.bDepthRangeHack, gs->T("Depth Range Hack (Phantasy Star Portable 2)"))); + CheckBox *depthRange = graphicsSettings->Add(new CheckBox(&g_Config.bDepthRangeHack, gr->T("Depth Range Hack (Phantasy Star Portable 2)"))); depthRange->SetDisabledPtr(&g_Config.bSoftwareRendering); static const char *bloomHackOptions[] = { "Off", "Safe", "Balanced", "Aggressive" }; - PopupMultiChoice *bloomHack = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBloomHack, gs->T("Lower resolution for effects (reduces artifacts)"), bloomHackOptions, 0, ARRAY_SIZE(bloomHackOptions), gs, screenManager())); + PopupMultiChoice *bloomHack = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBloomHack, gr->T("Lower resolution for effects (reduces artifacts)"), bloomHackOptions, 0, ARRAY_SIZE(bloomHackOptions), gs, screenManager())); bloomHackEnable_ = !g_Config.bSoftwareRendering && (g_Config.iInternalResolution != 1); bloomHack->SetEnabledPtr(&bloomHackEnable_); - graphicsSettings->Add(new ItemHeader(gs->T("Overlay Information"))); + graphicsSettings->Add(new ItemHeader(gr->T("Overlay Information"))); static const char *fpsChoices[] = { "None", "Speed", "FPS", "Both" #ifdef BLACKBERRY , "Statistics" #endif }; - graphicsSettings->Add(new PopupMultiChoice(&g_Config.iShowFPSCounter, gs->T("Show FPS Counter"), fpsChoices, 0, ARRAY_SIZE(fpsChoices), gs, screenManager())); - graphicsSettings->Add(new CheckBox(&g_Config.bShowDebugStats, gs->T("Show Debug Statistics")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting); + graphicsSettings->Add(new PopupMultiChoice(&g_Config.iShowFPSCounter, gr->T("Show FPS Counter"), fpsChoices, 0, ARRAY_SIZE(fpsChoices), gs, screenManager())); + graphicsSettings->Add(new CheckBox(&g_Config.bShowDebugStats, gr->T("Show Debug Statistics")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting); // Developer tools are not accessible ingame, so it goes here. - graphicsSettings->Add(new ItemHeader(gs->T("Debugging"))); - Choice *dump = graphicsSettings->Add(new Choice(gs->T("Dump next frame to log"))); + graphicsSettings->Add(new ItemHeader(gr->T("Debugging"))); + Choice *dump = graphicsSettings->Add(new Choice(gr->T("Dump next frame to log"))); dump->OnClick.Handle(this, &GameSettingsScreen::OnDumpNextFrameToLog); if (!PSP_IsInited()) dump->SetEnabled(false); // We normally use software rendering to debug so put it in debugging. - CheckBox *softwareGPU = graphicsSettings->Add(new CheckBox(&g_Config.bSoftwareRendering, gs->T("Software Rendering", "Software Rendering (experimental)"))); + CheckBox *softwareGPU = graphicsSettings->Add(new CheckBox(&g_Config.bSoftwareRendering, gr->T("Software Rendering", "Software Rendering (experimental)"))); softwareGPU->OnClick.Handle(this, &GameSettingsScreen::OnSoftwareRendering); if (PSP_IsInited() || g_Config.iGPUBackend != GPU_BACKEND_OPENGL) @@ -638,8 +638,8 @@ static void RecreateActivity() { if (System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= SYSTEM_JELLYBEAN) { System_SendMessage("recreate", ""); } else { - I18NCategory *gs = GetI18NCategory("Graphics"); - System_SendMessage("toast", gs->T("Must Restart", "You must restart PPSSPP for this change to take effect")); + I18NCategory *gr = GetI18NCategory("Graphics"); + System_SendMessage("toast", gr->T("Must Restart", "You must restart PPSSPP for this change to take effect")); } } @@ -934,8 +934,8 @@ UI::EventReturn GameSettingsScreen::OnLanguageChange(UI::EventParams &e) { } UI::EventReturn GameSettingsScreen::OnPostProcShader(UI::EventParams &e) { - I18NCategory *g = GetI18NCategory("Graphics"); - auto procScreen = new PostProcScreen(g->T("Postprocessing Shader")); + I18NCategory *gr = GetI18NCategory("Graphics"); + auto procScreen = new PostProcScreen(gr->T("Postprocessing Shader")); procScreen->OnChoice.Handle(this, &GameSettingsScreen::OnPostProcShaderChange); screenManager()->push(procScreen); return UI::EVENT_DONE; @@ -992,7 +992,7 @@ void DeveloperToolsScreen::CreateViews() { I18NCategory *di = GetI18NCategory("Dialog"); I18NCategory *dev = GetI18NCategory("Developer"); - I18NCategory *gs = GetI18NCategory("Graphics"); + I18NCategory *gr = GetI18NCategory("Graphics"); I18NCategory *a = GetI18NCategory("Audio"); I18NCategory *s = GetI18NCategory("System"); diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index 7144748a0e..fa19fd4528 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -269,7 +269,7 @@ void GamePauseScreen::CreateViews() { using namespace UI; Margins scrollMargins(0, 20, 0, 0); Margins actionMenuMargins(0, 20, 15, 0); - I18NCategory *gs = GetI18NCategory("Graphics"); + I18NCategory *gr = GetI18NCategory("Graphics"); I18NCategory *i = GetI18NCategory("Pause"); root_ = new LinearLayout(ORIENT_HORIZONTAL); diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 278e84314c..35f3945b99 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -216,12 +216,12 @@ namespace MainWindow } static void ShowScreenResolution() { - I18NCategory *g = GetI18NCategory("Graphics"); + I18NCategory *gr = GetI18NCategory("Graphics"); std::ostringstream messageStream; - messageStream << g->T("Internal Resolution") << ": "; + messageStream << gr->T("Internal Resolution") << ": "; messageStream << PSP_CoreParameter().renderWidth << "x" << PSP_CoreParameter().renderHeight << " "; - messageStream << g->T("Window Size") << ": "; + messageStream << gr->T("Window Size") << ": "; messageStream << PSP_CoreParameter().pixelWidth << "x" << PSP_CoreParameter().pixelHeight; osm.Show(messageStream.str(), 2.0f); @@ -745,24 +745,24 @@ namespace MainWindow g_Config.iRenderingMode = FB_NON_BUFFERED_MODE; } - I18NCategory *g = GetI18NCategory("Graphics"); + I18NCategory *gr = GetI18NCategory("Graphics"); switch(g_Config.iRenderingMode) { case FB_NON_BUFFERED_MODE: - osm.Show(g->T("Non-Buffered Rendering")); + osm.Show(gr->T("Non-Buffered Rendering")); g_Config.bAutoFrameSkip = false; break; case FB_BUFFERED_MODE: - osm.Show(g->T("Buffered Rendering")); + osm.Show(gr->T("Buffered Rendering")); break; case FB_READFBOMEMORY_CPU: - osm.Show(g->T("Read Framebuffers To Memory (CPU)")); + osm.Show(gr->T("Read Framebuffers To Memory (CPU)")); break; case FB_READFBOMEMORY_GPU: - osm.Show(g->T("Read Framebuffers To Memory (GPU)")); + osm.Show(gr->T("Read Framebuffers To Memory (GPU)")); break; } @@ -781,13 +781,13 @@ namespace MainWindow g_Config.iFrameSkip = FRAMESKIP_OFF; } - I18NCategory *g = GetI18NCategory("Graphics"); + I18NCategory *gr = GetI18NCategory("Graphics"); std::ostringstream messageStream; - messageStream << g->T("Frame Skipping") << ":" << " "; + messageStream << gr->T("Frame Skipping") << ":" << " "; if (g_Config.iFrameSkip == FRAMESKIP_OFF) - messageStream << g->T("Off"); + messageStream << gr->T("Off"); else messageStream << g_Config.iFrameSkip; @@ -1201,7 +1201,7 @@ namespace MainWindow { if (!EmuThread_Ready()) return DefWindowProc(hWnd, message, wParam, lParam); - I18NCategory *g = GetI18NCategory("Graphics"); + I18NCategory *gr = GetI18NCategory("Graphics"); wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); @@ -1266,7 +1266,7 @@ namespace MainWindow case ID_EMULATION_CHEATS: g_Config.bEnableCheats = !g_Config.bEnableCheats; - osm.ShowOnOff(g->T("Cheats"), g_Config.bEnableCheats); + osm.ShowOnOff(gr->T("Cheats"), g_Config.bEnableCheats); break; case ID_FILE_LOADSTATEFILE: @@ -1424,7 +1424,7 @@ namespace MainWindow case ID_OPTIONS_HARDWARETRANSFORM: g_Config.bHardwareTransform = !g_Config.bHardwareTransform; - osm.ShowOnOff(g->T("Hardware Transform"), g_Config.bHardwareTransform); + osm.ShowOnOff(gr->T("Hardware Transform"), g_Config.bHardwareTransform); break; case ID_OPTIONS_STRETCHDISPLAY: From 95f83570f4f723090f8e98120b6cd97aa88f1ec3 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Wed, 1 Jul 2015 23:54:35 +0200 Subject: [PATCH 07/16] Consistently use *km for the KeyMapping i18n category --- UI/ControlMappingScreen.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 5a62ff2b4b..d93b5da508 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -202,18 +202,18 @@ void ControlMappingScreen::CreateViews() { using namespace UI; mappers_.clear(); - I18NCategory *k = GetI18NCategory("KeyMapping"); + I18NCategory *km = GetI18NCategory("KeyMapping"); I18NCategory *di = GetI18NCategory("Dialog"); root_ = new LinearLayout(ORIENT_HORIZONTAL); LinearLayout *leftColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(200, FILL_PARENT)); - leftColumn->Add(new Choice(k->T("Clear All")))->OnClick.Handle(this, &ControlMappingScreen::OnClearMapping); - leftColumn->Add(new Choice(k->T("Default All")))->OnClick.Handle(this, &ControlMappingScreen::OnDefaultMapping); + leftColumn->Add(new Choice(km->T("Clear All")))->OnClick.Handle(this, &ControlMappingScreen::OnClearMapping); + leftColumn->Add(new Choice(km->T("Default All")))->OnClick.Handle(this, &ControlMappingScreen::OnDefaultMapping); if (KeyMap::GetSeenPads().size()) { - leftColumn->Add(new Choice(k->T("Autoconfigure")))->OnClick.Handle(this, &ControlMappingScreen::OnAutoConfigure); + leftColumn->Add(new Choice(km->T("Autoconfigure")))->OnClick.Handle(this, &ControlMappingScreen::OnAutoConfigure); } - leftColumn->Add(new Choice(k->T("Test Analogs")))->OnClick.Handle(this, &ControlMappingScreen::OnTestAnalogs); + leftColumn->Add(new Choice(km->T("Test Analogs")))->OnClick.Handle(this, &ControlMappingScreen::OnTestAnalogs); leftColumn->Add(new Spacer(new LinearLayoutParams(1.0f))); leftColumn->Add(new Choice(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); @@ -260,8 +260,8 @@ UI::EventReturn ControlMappingScreen::OnAutoConfigure(UI::EventParams ¶ms) { for (auto s = seenPads.begin(), end = seenPads.end(); s != end; ++s) { items.push_back(*s); } - I18NCategory *keyI18N = GetI18NCategory("KeyMapping"); - ListPopupScreen *autoConfList = new ListPopupScreen(keyI18N->T("Autoconfigure for device"), items, -1); + I18NCategory *km = GetI18NCategory("KeyMapping"); + ListPopupScreen *autoConfList = new ListPopupScreen(km->T("Autoconfigure for device"), items, -1); screenManager()->push(autoConfList); return UI::EVENT_DONE; } @@ -289,11 +289,11 @@ void ControlMappingScreen::KeyMapped(int pspkey) { // Notification to let us re void KeyMappingNewKeyDialog::CreatePopupContents(UI::ViewGroup *parent) { using namespace UI; - I18NCategory *keyI18N = GetI18NCategory("KeyMapping"); + I18NCategory *km = GetI18NCategory("KeyMapping"); std::string pspButtonName = KeyMap::GetPspButtonName(this->pspBtn_); - parent->Add(new TextView(std::string(keyI18N->T("Map a new key for")) + " " + pspButtonName, new LinearLayoutParams(Margins(10,0)))); + parent->Add(new TextView(std::string(km->T("Map a new key for")) + " " + pspButtonName, new LinearLayoutParams(Margins(10,0)))); } bool KeyMappingNewKeyDialog::key(const KeyInput &key) { From a5e63e4612c6d1c6e9e89d0d0f6a315b9401e3a5 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Thu, 2 Jul 2015 00:02:08 +0200 Subject: [PATCH 08/16] Consistently use *mm for the MainMenu i18n category --- UI/MainScreen.cpp | 50 +++++++++++++++++++++---------------------- UI/SavedataScreen.cpp | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 03f3d34f03..e93e67bb44 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -416,15 +416,15 @@ UI::EventReturn GameBrowser::HomeClick(UI::EventParams &e) { #ifdef ANDROID path_.SetPath(g_Config.memStickDirectory); #elif defined(USING_QT_UI) - I18NCategory *m = GetI18NCategory("MainMenu"); + I18NCategory *mm = GetI18NCategory("MainMenu"); QString fileName = QFileDialog::getExistingDirectory(NULL, "Browse for Folder", g_Config.currentDirectory.c_str()); if (QDir(fileName).exists()) path_.SetPath(fileName.toStdString()); else return UI::EVENT_DONE; #elif defined(_WIN32) - I18NCategory *m = GetI18NCategory("MainMenu"); - std::string folder = W32Util::BrowseForFolder(MainWindow::GetHWND(), m->T("Choose folder")); + I18NCategory *mm = GetI18NCategory("MainMenu"); + std::string folder = W32Util::BrowseForFolder(MainWindow::GetHWND(), mm->T("Choose folder")); if (!folder.size()) return UI::EVENT_DONE; path_.SetPath(folder); @@ -458,7 +458,7 @@ void GameBrowser::Refresh() { Clear(); Add(new Spacer(1.0f)); - I18NCategory *m = GetI18NCategory("MainMenu"); + I18NCategory *mm = GetI18NCategory("MainMenu"); // No topbar on recent screen if (path_.GetPath() != "!RECENT") { @@ -468,9 +468,9 @@ void GameBrowser::Refresh() { Margins pathMargins(5, 0); topBar->Add(new TextView(path_.GetFriendlyPath().c_str(), ALIGN_VCENTER, true, new LinearLayoutParams(1.0f))); #if defined(_WIN32) || defined(USING_QT_UI) - topBar->Add(new Choice(m->T("Browse", "Browse...")))->OnClick.Handle(this, &GameBrowser::HomeClick); + topBar->Add(new Choice(mm->T("Browse", "Browse...")))->OnClick.Handle(this, &GameBrowser::HomeClick); #else - topBar->Add(new Choice(m->T("Home")))->OnClick.Handle(this, &GameBrowser::HomeClick); + topBar->Add(new Choice(mm->T("Home")))->OnClick.Handle(this, &GameBrowser::HomeClick); #endif } else { topBar->Add(new Spacer(new LinearLayoutParams(1.0f))); @@ -571,7 +571,7 @@ void GameBrowser::Refresh() { if (allowBrowsing_) { std::string caption = IsCurrentPathPinned() ? "-" : "+"; if (!*gridStyle_) { - caption = IsCurrentPathPinned() ? m->T("UnpinPath", "Unpin") : m->T("PinPath", "Pin"); + caption = IsCurrentPathPinned() ? mm->T("UnpinPath", "Unpin") : mm->T("PinPath", "Pin"); } gameList_->Add(new UI::Button(caption, new UI::LinearLayoutParams(UI::FILL_PARENT, UI::FILL_PARENT)))-> OnClick.Handle(this, &GameBrowser::PinToggleClick); @@ -579,7 +579,7 @@ void GameBrowser::Refresh() { if (g_Config.bHomebrewStore && (flags_ & FLAG_HOMEBREWSTOREBUTTON)) { Add(new Spacer()); - homebrewStoreButton_ = Add(new Choice(m->T("DownloadFromStore", "Download from the PPSSPP Homebrew Store"), new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT))); + homebrewStoreButton_ = Add(new Choice(mm->T("DownloadFromStore", "Download from the PPSSPP Homebrew Store"), new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT))); } else { homebrewStoreButton_ = 0; } @@ -702,7 +702,7 @@ void MainScreen::CreateViews() { bool vertical = UseVerticalLayout(); - I18NCategory *m = GetI18NCategory("MainMenu"); + I18NCategory *mm = GetI18NCategory("MainMenu"); Margins actionMenuMargins(0, 10, 10, 0); @@ -717,7 +717,7 @@ void MainScreen::CreateViews() { "!RECENT", false, &g_Config.bGridView1, "", "", 0, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); scrollRecentGames->Add(tabRecentGames); - leftColumn->AddTab(m->T("Recent"), scrollRecentGames); + leftColumn->AddTab(mm->T("Recent"), scrollRecentGames); tabRecentGames->OnChoice.Handle(this, &MainScreen::OnGameSelectedInstant); tabRecentGames->OnHoldChoice.Handle(this, &MainScreen::OnGameSelected); tabRecentGames->OnHighlight.Handle(this, &MainScreen::OnGameHighlight); @@ -727,10 +727,10 @@ void MainScreen::CreateViews() { ScrollView *scrollHomebrew = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); GameBrowser *tabAllGames = new GameBrowser(g_Config.currentDirectory, true, &g_Config.bGridView2, - m->T("How to get games"), "http://www.ppsspp.org/getgames.html", 0, + mm->T("How to get games"), "http://www.ppsspp.org/getgames.html", 0, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); GameBrowser *tabHomebrew = new GameBrowser(GetSysDirectory(DIRECTORY_GAME), false, &g_Config.bGridView3, - m->T("How to get homebrew & demos", "How to get homebrew && demos"), "http://www.ppsspp.org/gethomebrew.html", + mm->T("How to get homebrew & demos", "How to get homebrew && demos"), "http://www.ppsspp.org/gethomebrew.html", FLAG_HOMEBREWSTOREBUTTON, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); @@ -742,8 +742,8 @@ void MainScreen::CreateViews() { scrollAllGames->Add(tabAllGames); scrollHomebrew->Add(tabHomebrew); - leftColumn->AddTab(m->T("Games"), scrollAllGames); - leftColumn->AddTab(m->T("Homebrew & Demos"), scrollHomebrew); + leftColumn->AddTab(mm->T("Games"), scrollAllGames); + leftColumn->AddTab(mm->T("Homebrew & Demos"), scrollHomebrew); tabAllGames->OnChoice.Handle(this, &MainScreen::OnGameSelectedInstant); tabHomebrew->OnChoice.Handle(this, &MainScreen::OnGameSelectedInstant); @@ -791,18 +791,18 @@ void MainScreen::CreateViews() { rightColumnItems->Add(logos); rightColumnItems->Add(new TextView(versionString, new LinearLayoutParams(Margins(70, -6, 0, 0))))->SetSmall(true); #if defined(_WIN32) || defined(USING_QT_UI) - rightColumnItems->Add(new Choice(m->T("Load","Load...")))->OnClick.Handle(this, &MainScreen::OnLoadFile); + rightColumnItems->Add(new Choice(mm->T("Load","Load...")))->OnClick.Handle(this, &MainScreen::OnLoadFile); #endif - rightColumnItems->Add(new Choice(m->T("Game Settings", "Settings")))->OnClick.Handle(this, &MainScreen::OnGameSettings); - rightColumnItems->Add(new Choice(m->T("Credits")))->OnClick.Handle(this, &MainScreen::OnCredits); - rightColumnItems->Add(new Choice(m->T("www.ppsspp.org")))->OnClick.Handle(this, &MainScreen::OnPPSSPPOrg); + rightColumnItems->Add(new Choice(mm->T("Game Settings", "Settings")))->OnClick.Handle(this, &MainScreen::OnGameSettings); + rightColumnItems->Add(new Choice(mm->T("Credits")))->OnClick.Handle(this, &MainScreen::OnCredits); + rightColumnItems->Add(new Choice(mm->T("www.ppsspp.org")))->OnClick.Handle(this, &MainScreen::OnPPSSPPOrg); #ifndef GOLD - Choice *gold = rightColumnItems->Add(new Choice(m->T("Support PPSSPP"))); + Choice *gold = rightColumnItems->Add(new Choice(mm->T("Support PPSSPP"))); gold->OnClick.Handle(this, &MainScreen::OnSupport); gold->SetIcon(I_ICONGOLD); #endif rightColumnItems->Add(new Spacer(25.0)); - rightColumnItems->Add(new Choice(m->T("Exit")))->OnClick.Handle(this, &MainScreen::OnExit); + rightColumnItems->Add(new Choice(mm->T("Exit")))->OnClick.Handle(this, &MainScreen::OnExit); if (vertical) { root_ = new LinearLayout(ORIENT_VERTICAL); @@ -1093,7 +1093,7 @@ void MainScreen::dialogFinished(const Screen *dialog, DialogResult result) { void UmdReplaceScreen::CreateViews() { using namespace UI; Margins actionMenuMargins(0, 100, 15, 0); - I18NCategory *m = GetI18NCategory("MainMenu"); + I18NCategory *mm = GetI18NCategory("MainMenu"); I18NCategory *di = GetI18NCategory("Dialog"); TabHolder *leftColumn = new TabHolder(ORIENT_HORIZONTAL, 64, new LinearLayoutParams(1.0)); @@ -1110,26 +1110,26 @@ void UmdReplaceScreen::CreateViews() { "!RECENT", false, &g_Config.bGridView1, "", "", 0, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); scrollRecentGames->Add(tabRecentGames); - leftColumn->AddTab(m->T("Recent"), scrollRecentGames); + leftColumn->AddTab(mm->T("Recent"), scrollRecentGames); tabRecentGames->OnChoice.Handle(this, &UmdReplaceScreen::OnGameSelectedInstant); tabRecentGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected); } ScrollView *scrollAllGames = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); GameBrowser *tabAllGames = new GameBrowser(g_Config.currentDirectory, true, &g_Config.bGridView2, - m->T("How to get games"), "http://www.ppsspp.org/getgames.html", 0, + mm->T("How to get games"), "http://www.ppsspp.org/getgames.html", 0, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); scrollAllGames->Add(tabAllGames); - leftColumn->AddTab(m->T("Games"), scrollAllGames); + leftColumn->AddTab(mm->T("Games"), scrollAllGames); tabAllGames->OnChoice.Handle(this, &UmdReplaceScreen::OnGameSelectedInstant); tabAllGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected); rightColumnItems->Add(new Choice(di->T("Cancel")))->OnClick.Handle(this, &UmdReplaceScreen::OnCancel); - rightColumnItems->Add(new Choice(m->T("Game Settings")))->OnClick.Handle(this, &UmdReplaceScreen::OnGameSettings); + rightColumnItems->Add(new Choice(mm->T("Game Settings")))->OnClick.Handle(this, &UmdReplaceScreen::OnGameSettings); if (g_Config.recentIsos.size() > 0) { leftColumn->SetCurrentTab(0); diff --git a/UI/SavedataScreen.cpp b/UI/SavedataScreen.cpp index 6e3ba6d17b..e7f241fbc1 100644 --- a/UI/SavedataScreen.cpp +++ b/UI/SavedataScreen.cpp @@ -279,7 +279,7 @@ void SavedataBrowser::Refresh() { Clear(); Add(new Spacer(1.0f)); - I18NCategory *m = GetI18NCategory("MainMenu"); + I18NCategory *mm = GetI18NCategory("MainMenu"); I18NCategory *s = GetI18NCategory("Savedata"); UI::LinearLayout *gl = new UI::LinearLayout(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); From 54d0b46224efd01c3a9020eca55fa78c90a19004 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Thu, 2 Jul 2015 00:13:35 +0200 Subject: [PATCH 09/16] Consistently use *pa for the Pause i18n category --- UI/PauseScreen.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index fa19fd4528..3d4e035dbf 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -186,19 +186,19 @@ SaveSlotView::SaveSlotView(int slot, UI::LayoutParams *layoutParams) : UI::Linea AsyncImageFileView *fv = Add(new AsyncImageFileView(screenshotFilename_, IS_DEFAULT, wq, new UI::LayoutParams(82 * 2, 47 * 2))); fv->SetOverlayText(StringFromFormat("%i", slot_ + 1)); - I18NCategory *i = GetI18NCategory("Pause"); + I18NCategory *pa = GetI18NCategory("Pause"); LinearLayout *buttons = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT)); buttons->SetSpacing(2.0); Add(buttons); - saveStateButton_ = buttons->Add(new Button(i->T("Save State"), new LinearLayoutParams(0.0, G_VCENTER))); + saveStateButton_ = buttons->Add(new Button(pa->T("Save State"), new LinearLayoutParams(0.0, G_VCENTER))); saveStateButton_->OnClick.Handle(this, &SaveSlotView::OnSaveState); fv->OnClick.Handle(this, &SaveSlotView::OnScreenshotClick); if (SaveState::HasSaveInSlot(slot)) { - loadStateButton_ = buttons->Add(new Button(i->T("Load State"), new LinearLayoutParams(0.0, G_VCENTER))); + loadStateButton_ = buttons->Add(new Button(pa->T("Load State"), new LinearLayoutParams(0.0, G_VCENTER))); loadStateButton_->OnClick.Handle(this, &SaveSlotView::OnLoadState); std::string dateStr = SaveState::GetSlotDateAsString(slot_); @@ -270,7 +270,7 @@ void GamePauseScreen::CreateViews() { Margins scrollMargins(0, 20, 0, 0); Margins actionMenuMargins(0, 20, 15, 0); I18NCategory *gr = GetI18NCategory("Graphics"); - I18NCategory *i = GetI18NCategory("Pause"); + I18NCategory *pa = GetI18NCategory("Pause"); root_ = new LinearLayout(ORIENT_HORIZONTAL); @@ -291,7 +291,7 @@ void GamePauseScreen::CreateViews() { leftColumnItems->Add(new Spacer(0.0)); if (g_Config.iRewindFlipFrequency > 0) { - UI::Choice *rewindButton = leftColumnItems->Add(new Choice(i->T("Rewind"))); + UI::Choice *rewindButton = leftColumnItems->Add(new Choice(pa->T("Rewind"))); rewindButton->SetEnabled(SaveState::CanRewind()); rewindButton->OnClick.Handle(this, &GamePauseScreen::OnRewind); } @@ -304,22 +304,22 @@ void GamePauseScreen::CreateViews() { rightColumnItems->SetSpacing(0.0f); if (getUMDReplacePermit()) { - rightColumnItems->Add(new Choice(i->T("Switch UMD")))->OnClick.Handle(this, &GamePauseScreen::OnSwitchUMD); + rightColumnItems->Add(new Choice(pa->T("Switch UMD")))->OnClick.Handle(this, &GamePauseScreen::OnSwitchUMD); } - Choice *continueChoice = rightColumnItems->Add(new Choice(i->T("Continue"))); + Choice *continueChoice = rightColumnItems->Add(new Choice(pa->T("Continue"))); root_->SetDefaultFocusView(continueChoice); continueChoice->OnClick.Handle(this, &UIScreen::OnBack); std::string gameId = g_paramSFO.GetValueString("DISC_ID"); if (g_Config.hasGameConfig(gameId)) { - rightColumnItems->Add(new Choice(i->T("Game Settings")))->OnClick.Handle(this, &GamePauseScreen::OnGameSettings); - rightColumnItems->Add(new Choice(i->T("Delete Game Config")))->OnClick.Handle(this, &GamePauseScreen::OnDeleteConfig); + rightColumnItems->Add(new Choice(pa->T("Game Settings")))->OnClick.Handle(this, &GamePauseScreen::OnGameSettings); + rightColumnItems->Add(new Choice(pa->T("Delete Game Config")))->OnClick.Handle(this, &GamePauseScreen::OnDeleteConfig); } else { - rightColumnItems->Add(new Choice(i->T("Settings")))->OnClick.Handle(this, &GamePauseScreen::OnGameSettings); - rightColumnItems->Add(new Choice(i->T("Create Game Config")))->OnClick.Handle(this, &GamePauseScreen::OnCreateConfig); + rightColumnItems->Add(new Choice(pa->T("Settings")))->OnClick.Handle(this, &GamePauseScreen::OnGameSettings); + rightColumnItems->Add(new Choice(pa->T("Create Game Config")))->OnClick.Handle(this, &GamePauseScreen::OnCreateConfig); } if (g_Config.bEnableCheats) { - rightColumnItems->Add(new Choice(i->T("Cheats")))->OnClick.Handle(this, &GamePauseScreen::OnCwCheat); + rightColumnItems->Add(new Choice(pa->T("Cheats")))->OnClick.Handle(this, &GamePauseScreen::OnCwCheat); } // TODO, also might be nice to show overall compat rating here? @@ -329,7 +329,7 @@ void GamePauseScreen::CreateViews() { rightColumnItems->Add(new Choice(rp->T("ReportButton", "Report Feedback")))->OnClick.Handle(this, &GamePauseScreen::OnReportFeedback); } rightColumnItems->Add(new Spacer(25.0)); - rightColumnItems->Add(new Choice(i->T("Exit to menu")))->OnClick.Handle(this, &GamePauseScreen::OnExitToMenu); + rightColumnItems->Add(new Choice(pa->T("Exit to menu")))->OnClick.Handle(this, &GamePauseScreen::OnExitToMenu); } UI::EventReturn GamePauseScreen::OnGameSettings(UI::EventParams &e) { @@ -368,7 +368,7 @@ UI::EventReturn GamePauseScreen::OnScreenshotClicked(UI::EventParams &e) { if (SaveState::HasSaveInSlot(slot)) { std::string fn = v->GetScreenshotFilename(); std::string title = v->GetScreenshotTitle(); - I18NCategory *p = GetI18NCategory("Pause"); + I18NCategory *pa = GetI18NCategory("Pause"); Screen *screen = new ScreenshotViewScreen(fn, title, v->GetSlot(), p); screenManager()->push(screen); } From 21158335af15e19b3ec8ec255ff5a68b0bd58ee3 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Thu, 2 Jul 2015 00:19:38 +0200 Subject: [PATCH 10/16] Consistently use *cr for the PSPCredits i18n category --- UI/MiscScreens.cpp | 64 +++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 9d3311639c..19633b7106 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -422,10 +422,10 @@ void LogoScreen::render() { ::DrawBackground(dc, alpha); - I18NCategory *c = GetI18NCategory("PSPCredits"); + I18NCategory *cr = GetI18NCategory("PSPCredits"); char temp[256]; // Manually formatting utf-8 is fun. \xXX doesn't work everywhere. - snprintf(temp, sizeof(temp), "%s Henrik Rydg%c%crd", c->T("created", "Created by"), 0xC3, 0xA5); + snprintf(temp, sizeof(temp), "%s Henrik Rydg%c%crd", cr->T("created", "Created by"), 0xC3, 0xA5); #ifdef GOLD dc.Draw()->DrawImage(I_ICONGOLD, bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER); #else @@ -436,7 +436,7 @@ void LogoScreen::render() { dc.SetFontScale(1.0f, 1.0f); dc.SetFontStyle(dc.theme->uiFont); dc.DrawText(temp, bounds.centerX(), bounds.centerY() + 40, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER); - dc.DrawText(c->T("license", "Free Software under GPL 2.0"), bounds.centerX(), bounds.centerY() + 70, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER); + dc.DrawText(cr->T("license", "Free Software under GPL 2.0"), bounds.centerX(), bounds.centerY() + 70, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER); dc.DrawText("www.ppsspp.org", bounds.centerX(), yres / 2 + 130, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER); if (boot_filename.size()) { dc.DrawTextShadow(boot_filename.c_str(), bounds.centerX(), bounds.centerY() + 180, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER); @@ -457,20 +457,20 @@ void LogoScreen::render() { void CreditsScreen::CreateViews() { using namespace UI; I18NCategory *di = GetI18NCategory("Dialog"); - I18NCategory *c = GetI18NCategory("PSPCredits"); + I18NCategory *cr = GetI18NCategory("PSPCredits"); root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); Button *back = root_->Add(new Button(di->T("Back"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 10, false))); back->OnClick.Handle(this, &CreditsScreen::OnOK); root_->SetDefaultFocusView(back); #ifndef GOLD - root_->Add(new Button(c->T("Buy Gold"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnSupport); + root_->Add(new Button(cr->T("Buy Gold"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnSupport); #endif - root_->Add(new Button(c->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); + root_->Add(new Button(cr->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 158, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); #ifdef ANDROID - root_->Add(new Button(c->T("Share PPSSPP"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnShare); - root_->Add(new Button(c->T("Twitter @PPSSPP_emu"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 154, false)))->OnClick.Handle(this, &CreditsScreen::OnTwitter); + root_->Add(new Button(cr->T("Share PPSSPP"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnShare); + root_->Add(new Button(cr->T("Twitter @PPSSPP_emu"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 154, false)))->OnClick.Handle(this, &CreditsScreen::OnTwitter); #endif #ifdef GOLD root_->Add(new ImageView(I_ICONGOLD, IS_DEFAULT, new AnchorLayoutParams(100, 64, 10, 10, NONE, NONE, false))); @@ -508,8 +508,8 @@ UI::EventReturn CreditsScreen::OnForums(UI::EventParams &e) { } UI::EventReturn CreditsScreen::OnShare(UI::EventParams &e) { - I18NCategory *c = GetI18NCategory("PSPCredits"); - System_SendMessage("sharetext", c->T("CheckOutPPSSPP", "Check out PPSSPP, the awesome PSP emulator: http://www.ppsspp.org/")); + I18NCategory *cr = GetI18NCategory("PSPCredits"); + System_SendMessage("sharetext", cr->T("CheckOutPPSSPP", "Check out PPSSPP, the awesome PSP emulator: http://www.ppsspp.org/")); return UI::EVENT_DONE; } @@ -530,19 +530,19 @@ void CreditsScreen::update(InputState &input_state) { void CreditsScreen::render() { UIScreen::render(); - I18NCategory *c = GetI18NCategory("PSPCredits"); + I18NCategory *cr = GetI18NCategory("PSPCredits"); const char * credits[] = { "PPSSPP", "", - c->T("title", "A fast and portable PSP emulator"), + cr->T("title", "A fast and portable PSP emulator"), "", "", - c->T("created", "Created by"), + cr->T("created", "Created by"), "Henrik Rydg\xc3\xa5rd", "", "", - c->T("contributors", "Contributors:"), + cr->T("contributors", "Contributors:"), "unknownbrackets", "oioitff", "xsacha", @@ -582,7 +582,7 @@ void CreditsScreen::render() { "Kyhel", "", "", - c->T("specialthanks", "Special thanks to:"), + cr->T("specialthanks", "Special thanks to:"), "Maxim for his amazing Atrac3+ decoder work", "Keith Galocy at nVidia (hw, advice)", "Orphis (build server)", @@ -591,18 +591,18 @@ void CreditsScreen::render() { "solarmystic (testing)", "all the forum mods", "", - c->T("this translation by", ""), // Empty string as this is the original :) - c->T("translators1", ""), - c->T("translators2", ""), - c->T("translators3", ""), - c->T("translators4", ""), - c->T("translators5", ""), - c->T("translators6", ""), + cr->T("this translation by", ""), // Empty string as this is the original :) + cr->T("translators1", ""), + cr->T("translators2", ""), + cr->T("translators3", ""), + cr->T("translators4", ""), + cr->T("translators5", ""), + cr->T("translators6", ""), "", - c->T("written", "Written in C++ for speed and portability"), + cr->T("written", "Written in C++ for speed and portability"), "", "", - c->T("tools", "Free tools used:"), + cr->T("tools", "Free tools used:"), #ifdef ANDROID "Android SDK + NDK", #elif defined(BLACKBERRY) @@ -619,22 +619,22 @@ void CreditsScreen::render() { "PSP SDK", "", "", - c->T("website", "Check out the website:"), + cr->T("website", "Check out the website:"), "www.ppsspp.org", - c->T("list", "compatibility lists, forums, and development info"), + cr->T("list", "compatibility lists, forums, and development info"), "", "", - c->T("check", "Also check out Dolphin, the best Wii/GC emu around:"), + cr->T("check", "Also check out Dolphin, the best Wii/GC emu around:"), "http://www.dolphin-emu.org", "", "", - c->T("info1", "PPSSPP is only intended to play games you own."), - c->T("info2", "Please make sure that you own the rights to any games"), - c->T("info3", "you play by owning the UMD or by buying the digital"), - c->T("info4", "download from the PSN store on your real PSP."), + cr->T("info1", "PPSSPP is only intended to play games you own."), + cr->T("info2", "Please make sure that you own the rights to any games"), + cr->T("info3", "you play by owning the UMD or by buying the digital"), + cr->T("info4", "download from the PSN store on your real PSP."), "", "", - c->T("info5", "PSP is a trademark by Sony, Inc."), + cr->T("info5", "PSP is a trademark by Sony, Inc."), }; From ad93113e04071111de6097b8a971c8ebed520497 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Thu, 2 Jul 2015 00:24:43 +0200 Subject: [PATCH 11/16] Consistently use *sa for the Savedata i18n category --- UI/SavedataScreen.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/UI/SavedataScreen.cpp b/UI/SavedataScreen.cpp index e7f241fbc1..5e9b1d8644 100644 --- a/UI/SavedataScreen.cpp +++ b/UI/SavedataScreen.cpp @@ -66,7 +66,7 @@ public: LinearLayout *toprow = new LinearLayout(ORIENT_HORIZONTAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT)); root->Add(toprow); - I18NCategory *s = GetI18NCategory("Savedata"); + I18NCategory *sa = GetI18NCategory("Savedata"); if (ginfo->fileType == FILETYPE_PSP_SAVEDATA_DIRECTORY) { std::string savedata_detail = ginfo->paramSFO.GetValueString("SAVEDATA_DETAIL"); std::string savedata_title = ginfo->paramSFO.GetValueString("SAVEDATA_TITLE"); @@ -89,7 +89,7 @@ public: PrioritizedWorkQueue *wq = g_gameInfoCache.WorkQueue(); toprow->Add(new AsyncImageFileView(image_path, IS_DEFAULT, wq, new UI::LayoutParams(500, 500/16*9))); } else { - toprow->Add(new TextView(s->T("No screenshot"), new LinearLayoutParams(Margins(10, 5)))); + toprow->Add(new TextView(sa->T("No screenshot"), new LinearLayoutParams(Margins(10, 5)))); } root->Add(new TextView(GetFileDateAsString(savePath_), 0, true, new LinearLayoutParams(Margins(10, 5)))); } @@ -280,7 +280,7 @@ void SavedataBrowser::Refresh() { Add(new Spacer(1.0f)); I18NCategory *mm = GetI18NCategory("MainMenu"); - I18NCategory *s = GetI18NCategory("Savedata"); + I18NCategory *sa = GetI18NCategory("Savedata"); UI::LinearLayout *gl = new UI::LinearLayout(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); gl->SetSpacing(4.0f); @@ -315,7 +315,7 @@ void SavedataBrowser::Refresh() { if (savedataButtons.empty()) { ViewGroup *group = new LinearLayout(ORIENT_VERTICAL, new UI::LinearLayoutParams(UI::Margins(12, 0))); - group->Add(new TextView(s->T("None yet. Things will appear here after you save."))); + group->Add(new TextView(sa->T("None yet. Things will appear here after you save."))); gameList_->Add(group); } } @@ -334,7 +334,7 @@ SavedataScreen::SavedataScreen(std::string gamePath) : UIDialogScreenWithGameBac void SavedataScreen::CreateViews() { using namespace UI; - I18NCategory *s = GetI18NCategory("Savedata"); + I18NCategory *sa = GetI18NCategory("Savedata"); I18NCategory *di = GetI18NCategory("Dialog"); std::string savedata_dir = GetSysDirectory(DIRECTORY_SAVEDATA); std::string savestate_dir = GetSysDirectory(DIRECTORY_SAVESTATE); @@ -347,12 +347,12 @@ void SavedataScreen::CreateViews() { browser_ = scroll->Add(new SavedataBrowser(savedata_dir, new LayoutParams(FILL_PARENT, FILL_PARENT))); browser_->OnChoice.Handle(this, &SavedataScreen::OnSavedataButtonClick); - tabs->AddTab(s->T("Save Data"), scroll); + tabs->AddTab(sa->T("Save Data"), scroll); ScrollView *scroll2 = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); SavedataBrowser *browser2 = scroll2->Add(new SavedataBrowser(savestate_dir)); browser2->OnChoice.Handle(this, &SavedataScreen::OnSavedataButtonClick); - tabs->AddTab(s->T("Save States"), scroll2); + tabs->AddTab(sa->T("Save States"), scroll2); root_->Add(tabs); root_->Add(new Button(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); From d4d91fc831bc558a87eccb6ccf1ccb7a700e9766 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Thu, 2 Jul 2015 00:50:07 +0200 Subject: [PATCH 12/16] Consistently use *sc for the Screen i18n category --- Core/SaveState.cpp | 23 +++++++++++------------ UI/EmuScreen.cpp | 16 ++++++++-------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/Core/SaveState.cpp b/Core/SaveState.cpp index 376c55ac79..5a2dee13f5 100644 --- a/Core/SaveState.cpp +++ b/Core/SaveState.cpp @@ -357,7 +357,7 @@ namespace SaveState SaveScreenshot(shot, Callback(), 0); Save(fn + ".tmp", renameCallback, cbUserData); } else { - I18NCategory *s = GetI18NCategory("Screen"); + I18NCategory *sc = GetI18NCategory("Screen"); osm.Show("Failed to save state. Error in the file system.", 2.0); if (callback) callback(false, cbUserData); @@ -508,14 +508,13 @@ namespace SaveState bool callbackResult; std::string reason; - I18NCategory *s = GetI18NCategory("Screen"); - // I couldn't stand the inconsistency. But trying not to break old lang files. - const char *i18nLoadFailure = s->T("Load savestate failed", ""); - const char *i18nSaveFailure = s->T("Save State Failed", ""); + I18NCategory *sc = GetI18NCategory("Screen"); + const char *i18nLoadFailure = sc->T("Load savestate failed", ""); + const char *i18nSaveFailure = sc->T("Save State Failed", ""); if (strlen(i18nLoadFailure) == 0) - i18nLoadFailure = s->T("Failed to load state"); + i18nLoadFailure = sc->T("Failed to load state"); if (strlen(i18nSaveFailure) == 0) - i18nSaveFailure = s->T("Failed to save state"); + i18nSaveFailure = sc->T("Failed to save state"); switch (op.type) { @@ -523,7 +522,7 @@ namespace SaveState INFO_LOG(COMMON, "Loading state from %s", op.filename.c_str()); result = CChunkFileReader::Load(op.filename, REVISION, PPSSPP_GIT_VERSION, state, &reason); if (result == CChunkFileReader::ERROR_NONE) { - osm.Show(s->T("Loaded State"), 2.0); + osm.Show(sc->T("Loaded State"), 2.0); callbackResult = true; hasLoadedState = true; } else if (result == CChunkFileReader::ERROR_BROKEN_STATE) { @@ -532,7 +531,7 @@ namespace SaveState ERROR_LOG(COMMON, "Load state failure: %s", reason.c_str()); callbackResult = false; } else { - osm.Show(s->T(reason.c_str(), i18nLoadFailure), 2.0); + osm.Show(sc->T(reason.c_str(), i18nLoadFailure), 2.0); callbackResult = false; } break; @@ -542,7 +541,7 @@ namespace SaveState result = CChunkFileReader::Save(op.filename, REVISION, PPSSPP_GIT_VERSION, state); if (result == CChunkFileReader::ERROR_NONE) { - osm.Show(s->T("Saved State"), 2.0); + osm.Show(sc->T("Saved State"), 2.0); callbackResult = true; } else if (result == CChunkFileReader::ERROR_BROKEN_STATE) { HandleFailure(); @@ -564,14 +563,14 @@ namespace SaveState INFO_LOG(COMMON, "Rewinding to recent savestate snapshot"); result = rewindStates.Restore(); if (result == CChunkFileReader::ERROR_NONE) { - osm.Show(s->T("Loaded State"), 2.0); + osm.Show(sc->T("Loaded State"), 2.0); callbackResult = true; hasLoadedState = true; } else if (result == CChunkFileReader::ERROR_BROKEN_STATE) { // Cripes. Good news is, we might have more. Let's try those too, better than a reset. if (HandleFailure()) { // Well, we did rewind, even if too much... - osm.Show(s->T("Loaded State"), 2.0); + osm.Show(sc->T("Loaded State"), 2.0); callbackResult = true; hasLoadedState = true; } else { diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index f1becc7139..d4419ba579 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -142,11 +142,11 @@ void EmuScreen::bootComplete() { NOTICE_LOG(BOOT, "Loading %s...", PSP_CoreParameter().fileToStart.c_str()); autoLoad(); - I18NCategory *s = GetI18NCategory("Screen"); + I18NCategory *sc = GetI18NCategory("Screen"); #ifndef MOBILE_DEVICE if (g_Config.bFirstRun) { - osm.Show(s->T("PressESC", "Press ESC to open the pause menu"), 3.0f); + osm.Show(sc->T("PressESC", "Press ESC to open the pause menu"), 3.0f); } #endif memset(virtKeys, 0, sizeof(virtKeys)); @@ -154,9 +154,9 @@ void EmuScreen::bootComplete() { if (g_Config.iGPUBackend == GPU_BACKEND_OPENGL) { const char *renderer = (const char*)glGetString(GL_RENDERER); if (strstr(renderer, "Chainfire3D") != 0) { - osm.Show(s->T("Chainfire3DWarning", "WARNING: Chainfire3D detected, may cause problems"), 10.0f, 0xFF30a0FF, -1, true); + osm.Show(sc->T("Chainfire3DWarning", "WARNING: Chainfire3D detected, may cause problems"), 10.0f, 0xFF30a0FF, -1, true); } else if (strstr(renderer, "GLTools") != 0) { - osm.Show(s->T("GLToolsWarning", "WARNING: GLTools detected, may cause problems"), 10.0f, 0xFF30a0FF, -1, true); + osm.Show(sc->T("GLToolsWarning", "WARNING: GLTools detected, may cause problems"), 10.0f, 0xFF30a0FF, -1, true); } } @@ -303,7 +303,7 @@ bool EmuScreen::touch(const TouchInput &touch) { } void EmuScreen::onVKeyDown(int virtualKeyCode) { - I18NCategory *s = GetI18NCategory("Screen"); + I18NCategory *sc = GetI18NCategory("Screen"); switch (virtualKeyCode) { case VIRTKEY_UNTHROTTLE: @@ -313,11 +313,11 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) { case VIRTKEY_SPEED_TOGGLE: if (PSP_CoreParameter().fpsLimit == 0) { PSP_CoreParameter().fpsLimit = 1; - osm.Show(s->T("fixed", "Speed: alternate"), 1.0); + osm.Show(sc->T("fixed", "Speed: alternate"), 1.0); } else if (PSP_CoreParameter().fpsLimit == 1) { PSP_CoreParameter().fpsLimit = 0; - osm.Show(s->T("standard", "Speed: standard"), 1.0); + osm.Show(sc->T("standard", "Speed: standard"), 1.0); } break; @@ -358,7 +358,7 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) { if (SaveState::CanRewind()) { SaveState::Rewind(); } else { - osm.Show(s->T("norewind", "No rewind save states available"), 2.0); + osm.Show(sc->T("norewind", "No rewind save states available"), 2.0); } break; case VIRTKEY_SAVE_STATE: From c8d4ebdbfa75e251a56cac16f5be94e138fc8561 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Thu, 2 Jul 2015 01:00:04 +0200 Subject: [PATCH 13/16] Consistently use *sy for the System i18n category --- Core/Util/GameManager.cpp | 6 +-- UI/GameSettingsScreen.cpp | 82 +++++++++++++++++++-------------------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/Core/Util/GameManager.cpp b/Core/Util/GameManager.cpp index 92d4888207..d726e2343b 100644 --- a/Core/Util/GameManager.cpp +++ b/Core/Util/GameManager.cpp @@ -121,7 +121,7 @@ bool GameManager::InstallGame(std::string zipfile, bool deleteAfter) { return false; } - I18NCategory *s = GetI18NCategory("System"); + I18NCategory *sy = GetI18NCategory("System"); installInProgress_ = true; std::string pspGame = GetSysDirectory(DIRECTORY_GAME); @@ -180,7 +180,7 @@ bool GameManager::InstallGame(std::string zipfile, bool deleteAfter) { ERROR_LOG(HLE, "File not a PSP game, no EBOOT.PBP found."); installProgress_ = 0.0f; installInProgress_ = false; - installError_ = s->T("Not a PSP game"); + installError_ = sy->T("Not a PSP game"); InstallDone(); return false; } @@ -284,7 +284,7 @@ bail: // We end up here if disk is full or couldn't write to storage for some other reason. installProgress_ = 0.0f; installInProgress_ = false; - installError_ = s->T("Storage full"); + installError_ = sy->T("Storage full"); if (deleteAfter) { deleteFile(zipfile.c_str()); } diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 82973eb1d8..ddc009f135 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -96,7 +96,7 @@ void GameSettingsScreen::CreateViews() { I18NCategory *co = GetI18NCategory("Controls"); I18NCategory *a = GetI18NCategory("Audio"); I18NCategory *sa = GetI18NCategory("Savedata"); - I18NCategory *s = GetI18NCategory("System"); + I18NCategory *sy = GetI18NCategory("System"); I18NCategory *n = GetI18NCategory("Networking"); I18NCategory *ms = GetI18NCategory("MainSettings"); I18NCategory *dev = GetI18NCategory("Developer"); @@ -483,35 +483,35 @@ void GameSettingsScreen::CreateViews() { systemSettingsScroll->Add(systemSettings); tabHolder->AddTab(ms->T("System"), systemSettingsScroll); - systemSettings->Add(new ItemHeader(s->T("UI Language"))); + systemSettings->Add(new ItemHeader(sy->T("UI Language"))); systemSettings->Add(new Choice(dev->T("Language", "Language")))->OnClick.Handle(this, &GameSettingsScreen::OnLanguage); - systemSettings->Add(new ItemHeader(s->T("Developer Tools"))); - systemSettings->Add(new Choice(s->T("Developer Tools")))->OnClick.Handle(this, &GameSettingsScreen::OnDeveloperTools); + systemSettings->Add(new ItemHeader(sy->T("Developer Tools"))); + systemSettings->Add(new Choice(sy->T("Developer Tools")))->OnClick.Handle(this, &GameSettingsScreen::OnDeveloperTools); - systemSettings->Add(new ItemHeader(s->T("Help the PPSSPP team"))); + systemSettings->Add(new ItemHeader(sy->T("Help the PPSSPP team"))); enableReports_ = Reporting::IsEnabled(); - enableReportsCheckbox_ = new CheckBox(&enableReports_, s->T("Enable Compatibility Server Reports")); + enableReportsCheckbox_ = new CheckBox(&enableReports_, sy->T("Enable Compatibility Server Reports")); enableReportsCheckbox_->SetEnabled(Reporting::IsSupported()); systemSettings->Add(enableReportsCheckbox_); - systemSettings->Add(new ItemHeader(s->T("Emulation"))); + systemSettings->Add(new ItemHeader(sy->T("Emulation"))); - systemSettings->Add(new CheckBox(&g_Config.bFastMemory, s->T("Fast Memory", "Fast Memory (Unstable)")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting); + systemSettings->Add(new CheckBox(&g_Config.bFastMemory, sy->T("Fast Memory", "Fast Memory (Unstable)")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting); - systemSettings->Add(new CheckBox(&g_Config.bSeparateCPUThread, s->T("Multithreaded (experimental)"))); - systemSettings->Add(new CheckBox(&g_Config.bSeparateIOThread, s->T("I/O on thread (experimental)")))->SetEnabled(!PSP_IsInited()); + systemSettings->Add(new CheckBox(&g_Config.bSeparateCPUThread, sy->T("Multithreaded (experimental)"))); + systemSettings->Add(new CheckBox(&g_Config.bSeparateIOThread, sy->T("I/O on thread (experimental)")))->SetEnabled(!PSP_IsInited()); static const char *ioTimingMethods[] = { "Fast (lag on slow storage)", "Host (bugs, less lag)", "Simulate UMD delays" }; - View *ioTimingMethod = systemSettings->Add(new PopupMultiChoice(&g_Config.iIOTimingMethod, s->T("IO timing method"), ioTimingMethods, 0, ARRAY_SIZE(ioTimingMethods), s, screenManager())); + View *ioTimingMethod = systemSettings->Add(new PopupMultiChoice(&g_Config.iIOTimingMethod, sy->T("IO timing method"), ioTimingMethods, 0, ARRAY_SIZE(ioTimingMethods), s, screenManager())); ioTimingMethod->SetEnabledPtr(&g_Config.bSeparateIOThread); - systemSettings->Add(new CheckBox(&g_Config.bForceLagSync, s->T("Force real clock sync (slower, less lag)"))); - systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, s->T("Change CPU Clock", "Change CPU Clock (0 = default) (unstable)"), screenManager())); + systemSettings->Add(new CheckBox(&g_Config.bForceLagSync, sy->T("Force real clock sync (slower, less lag)"))); + systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, sy->T("Change CPU Clock", "Change CPU Clock (0 = default) (unstable)"), screenManager())); #ifndef MOBILE_DEVICE - systemSettings->Add(new PopupSliderChoice(&g_Config.iRewindFlipFrequency, 0, 1800, s->T("Rewind Snapshot Frequency", "Rewind Snapshot Frequency (0 = off, mem hog)"), screenManager())); + systemSettings->Add(new PopupSliderChoice(&g_Config.iRewindFlipFrequency, 0, 1800, sy->T("Rewind Snapshot Frequency", "Rewind Snapshot Frequency (0 = off, mem hog)"), screenManager())); #endif - systemSettings->Add(new CheckBox(&g_Config.bSetRoundingMode, s->T("Respect FPU rounding (disable for old GEB saves)")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting); + systemSettings->Add(new CheckBox(&g_Config.bSetRoundingMode, sy->T("Respect FPU rounding (disable for old GEB saves)")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting); - systemSettings->Add(new ItemHeader(s->T("General"))); + systemSettings->Add(new ItemHeader(sy->T("General"))); #ifdef ANDROID if (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) == DEVICE_TYPE_MOBILE) { @@ -521,19 +521,19 @@ void GameSettingsScreen::CreateViews() { } #endif - systemSettings->Add(new CheckBox(&g_Config.bCheckForNewVersion, s->T("VersionCheck", "Check for new versions of PPSSPP"))); + systemSettings->Add(new CheckBox(&g_Config.bCheckForNewVersion, sy->T("VersionCheck", "Check for new versions of PPSSPP"))); if (g_Config.iMaxRecent > 0) - systemSettings->Add(new Choice(s->T("Clear Recent Games List")))->OnClick.Handle(this, &GameSettingsScreen::OnClearRecents); - systemSettings->Add(new Choice(s->T("Restore Default Settings")))->OnClick.Handle(this, &GameSettingsScreen::OnRestoreDefaultSettings); - systemSettings->Add(new CheckBox(&g_Config.bEnableAutoLoad, s->T("Auto Load Newest Savestate"))); + systemSettings->Add(new Choice(sy->T("Clear Recent Games List")))->OnClick.Handle(this, &GameSettingsScreen::OnClearRecents); + systemSettings->Add(new Choice(sy->T("Restore Default Settings")))->OnClick.Handle(this, &GameSettingsScreen::OnRestoreDefaultSettings); + systemSettings->Add(new CheckBox(&g_Config.bEnableAutoLoad, sy->T("Auto Load Newest Savestate"))); #if defined(USING_WIN_UI) - systemSettings->Add(new CheckBox(&g_Config.bBypassOSKWithKeyboard, s->T("Enable Windows native keyboard", "Enable Windows native keyboard"))); + systemSettings->Add(new CheckBox(&g_Config.bBypassOSKWithKeyboard, sy->T("Enable Windows native keyboard", "Enable Windows native keyboard"))); #endif #if defined(_WIN32) - SavePathInMyDocumentChoice = systemSettings->Add(new CheckBox(&installed_, s->T("Save path in My Documents", "Save path in My Documents"))); + SavePathInMyDocumentChoice = systemSettings->Add(new CheckBox(&installed_, sy->T("Save path in My Documents", "Save path in My Documents"))); SavePathInMyDocumentChoice->OnClick.Handle(this, &GameSettingsScreen::OnSavePathMydoc); - SavePathInOtherChoice = systemSettings->Add(new CheckBox(&otherinstalled_, s->T("Save path in installed.txt", "Save path in installed.txt"))); + SavePathInOtherChoice = systemSettings->Add(new CheckBox(&otherinstalled_, sy->T("Save path in installed.txt", "Save path in installed.txt"))); SavePathInOtherChoice->SetEnabled(false); SavePathInOtherChoice->OnClick.Handle(this, &GameSettingsScreen::OnSavePathOther); wchar_t myDocumentsPath[MAX_PATH]; @@ -574,36 +574,36 @@ void GameSettingsScreen::CreateViews() { #endif #if defined(_M_X64) - systemSettings->Add(new CheckBox(&g_Config.bCacheFullIsoInRam, s->T("Cache ISO in RAM", "Cache full ISO in RAM (slow startup)"))); + systemSettings->Add(new CheckBox(&g_Config.bCacheFullIsoInRam, sy->T("Cache ISO in RAM", "Cache full ISO in RAM (slow startup)"))); #endif //#ifndef ANDROID - systemSettings->Add(new ItemHeader(s->T("Cheats", "Cheats (experimental, see forums)"))); - systemSettings->Add(new CheckBox(&g_Config.bEnableCheats, s->T("Enable Cheats"))); + systemSettings->Add(new ItemHeader(sy->T("Cheats", "Cheats (experimental, see forums)"))); + systemSettings->Add(new CheckBox(&g_Config.bEnableCheats, sy->T("Enable Cheats"))); //#endif systemSettings->SetSpacing(0); - systemSettings->Add(new ItemHeader(s->T("PSP Settings"))); + systemSettings->Add(new ItemHeader(sy->T("PSP Settings"))); static const char *models[] = {"PSP-1000" , "PSP-2000/3000"}; - systemSettings->Add(new PopupMultiChoice(&g_Config.iPSPModel, s->T("PSP Model"), models, 0, ARRAY_SIZE(models), s, screenManager()))->SetEnabled(!PSP_IsInited()); + systemSettings->Add(new PopupMultiChoice(&g_Config.iPSPModel, sy->T("PSP Model"), models, 0, ARRAY_SIZE(models), s, screenManager()))->SetEnabled(!PSP_IsInited()); // TODO: Come up with a way to display a keyboard for mobile users, // so until then, this is Windows/Desktop only. #if defined(_WIN32) // TODO: Add all platforms where KEY_CHAR support is added - systemSettings->Add(new PopupTextInputChoice(&g_Config.sNickName, s->T("Change Nickname"), "", 32, screenManager())); + systemSettings->Add(new PopupTextInputChoice(&g_Config.sNickName, sy->T("Change Nickname"), "", 32, screenManager())); #elif defined(USING_QT_UI) - systemSettings->Add(new Choice(s->T("Change Nickname")))->OnClick.Handle(this, &GameSettingsScreen::OnChangeNickname); + systemSettings->Add(new Choice(sy->T("Change Nickname")))->OnClick.Handle(this, &GameSettingsScreen::OnChangeNickname); #endif #if defined(_WIN32) || (defined(USING_QT_UI) && !defined(MOBILE_DEVICE)) // Screenshot functionality is not yet available on non-Windows/non-Qt - systemSettings->Add(new CheckBox(&g_Config.bScreenshotsAsPNG, s->T("Screenshots as PNG"))); + systemSettings->Add(new CheckBox(&g_Config.bScreenshotsAsPNG, sy->T("Screenshots as PNG"))); #endif - systemSettings->Add(new CheckBox(&g_Config.bDayLightSavings, s->T("Day Light Saving"))); + systemSettings->Add(new CheckBox(&g_Config.bDayLightSavings, sy->T("Day Light Saving"))); static const char *dateFormat[] = { "YYYYMMDD", "MMDDYYYY", "DDMMYYYY"}; - systemSettings->Add(new PopupMultiChoice(&g_Config.iDateFormat, s->T("Date Format"), dateFormat, 1, 3, s, screenManager())); + systemSettings->Add(new PopupMultiChoice(&g_Config.iDateFormat, sy->T("Date Format"), dateFormat, 1, 3, s, screenManager())); static const char *timeFormat[] = { "12HR", "24HR"}; - systemSettings->Add(new PopupMultiChoice(&g_Config.iTimeFormat, s->T("Time Format"), timeFormat, 1, 2, s, screenManager())); + systemSettings->Add(new PopupMultiChoice(&g_Config.iTimeFormat, sy->T("Time Format"), timeFormat, 1, 2, s, screenManager())); static const char *buttonPref[] = { "Use O to confirm", "Use X to confirm" }; - systemSettings->Add(new PopupMultiChoice(&g_Config.iButtonPreference, s->T("Confirmation Button"), buttonPref, 0, 2, s, screenManager())); + systemSettings->Add(new PopupMultiChoice(&g_Config.iButtonPreference, sy->T("Confirmation Button"), buttonPref, 0, 2, s, screenManager())); } UI::EventReturn GameSettingsScreen::OnAutoFrameskip(UI::EventParams &e) { @@ -994,21 +994,21 @@ void DeveloperToolsScreen::CreateViews() { I18NCategory *dev = GetI18NCategory("Developer"); I18NCategory *gr = GetI18NCategory("Graphics"); I18NCategory *a = GetI18NCategory("Audio"); - I18NCategory *s = GetI18NCategory("System"); + I18NCategory *sy = GetI18NCategory("System"); LinearLayout *list = root_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f))); list->SetSpacing(0); - list->Add(new ItemHeader(s->T("General"))); + list->Add(new ItemHeader(sy->T("General"))); bool canUseJit = true; #ifdef IOS if (!iosCanUseJit) { canUseJit = false; - list->Add(new TextView(s->T("DynarecisJailed", "Dynarec (JIT) - (Not jailbroken - JIT not available)"))); + list->Add(new TextView(sy->T("DynarecisJailed", "Dynarec (JIT) - (Not jailbroken - JIT not available)"))); } #endif if (canUseJit) { - list->Add(new CheckBox(&g_Config.bJit, s->T("Dynarec", "Dynarec (JIT)")))->OnClick.Handle(this, &DeveloperToolsScreen::OnJitAffectingSetting); + list->Add(new CheckBox(&g_Config.bJit, sy->T("Dynarec", "Dynarec (JIT)")))->OnClick.Handle(this, &DeveloperToolsScreen::OnJitAffectingSetting); } list->Add(new CheckBox(&g_Config.bShowDeveloperMenu, dev->T("Show Developer Menu"))); @@ -1095,14 +1095,14 @@ UI::EventReturn DeveloperToolsScreen::OnJitAffectingSetting(UI::EventParams &e) void ProAdhocServerScreen::CreateViews() { using namespace UI; - I18NCategory *s = GetI18NCategory("System"); + I18NCategory *sy = GetI18NCategory("System"); I18NCategory *di = GetI18NCategory("Dialog"); tempProAdhocServer = g_Config.proAdhocServer; root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); LinearLayout *leftColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); - leftColumn->Add(new ItemHeader(s->T("proAdhocServer Address:"))); + leftColumn->Add(new ItemHeader(sy->T("proAdhocServer Address:"))); addrView_ = new TextView(tempProAdhocServer, ALIGN_LEFT, false); leftColumn->Add(addrView_); LinearLayout *rightColumn = new LinearLayout(ORIENT_HORIZONTAL, new AnchorLayoutParams(0, 120, 10, NONE, NONE,10)); From cf9b6b60d5188a96fefc716b3bed232b7dae456c Mon Sep 17 00:00:00 2001 From: vnctdj Date: Thu, 2 Jul 2015 01:13:05 +0200 Subject: [PATCH 14/16] Fix errors --- UI/GameSettingsScreen.cpp | 44 +++++++++++++++++++-------------------- UI/PauseScreen.cpp | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index ddc009f135..c5968f7979 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -131,11 +131,11 @@ void GameSettingsScreen::CreateViews() { graphicsSettings->Add(new ItemHeader(gr->T("Rendering Mode"))); #if defined(_WIN32) static const char *renderingBackend[] = { "OpenGL", "Direct3D9" }; - PopupMultiChoice *renderingBackendChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTempGPUBackend, gr->T("Backend"), renderingBackend, GPU_BACKEND_OPENGL, ARRAY_SIZE(renderingBackend), gs, screenManager())); + PopupMultiChoice *renderingBackendChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTempGPUBackend, gr->T("Backend"), renderingBackend, GPU_BACKEND_OPENGL, ARRAY_SIZE(renderingBackend), gr, screenManager())); renderingBackendChoice->OnChoice.Handle(this, &GameSettingsScreen::OnRenderingBackend); #endif static const char *renderingMode[] = { "Non-Buffered Rendering", "Buffered Rendering", "Read Framebuffers To Memory (CPU)", "Read Framebuffers To Memory (GPU)"}; - PopupMultiChoice *renderingModeChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iRenderingMode, gr->T("Mode"), renderingMode, 0, ARRAY_SIZE(renderingMode), gs, screenManager())); + PopupMultiChoice *renderingModeChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iRenderingMode, gr->T("Mode"), renderingMode, 0, ARRAY_SIZE(renderingMode), gr, screenManager())); renderingModeChoice->OnChoice.Handle(this, &GameSettingsScreen::OnRenderingMode); renderingModeChoice->SetDisabledPtr(&g_Config.bSoftwareRendering); CheckBox *blockTransfer = graphicsSettings->Add(new CheckBox(&g_Config.bBlockTransferGPU, gr->T("Simulate Block Transfer", "Simulate Block Transfer (unfinished)"))); @@ -143,7 +143,7 @@ void GameSettingsScreen::CreateViews() { graphicsSettings->Add(new ItemHeader(gr->T("Frame Rate Control"))); static const char *frameSkip[] = {"Off", "1", "2", "3", "4", "5", "6", "7", "8"}; - graphicsSettings->Add(new PopupMultiChoice(&g_Config.iFrameSkip, gr->T("Frame Skipping"), frameSkip, 0, ARRAY_SIZE(frameSkip), gs, screenManager())); + graphicsSettings->Add(new PopupMultiChoice(&g_Config.iFrameSkip, gr->T("Frame Skipping"), frameSkip, 0, ARRAY_SIZE(frameSkip), gr, screenManager())); frameSkipAuto_ = graphicsSettings->Add(new CheckBox(&g_Config.bAutoFrameSkip, gr->T("Auto FrameSkip"))); frameSkipAuto_->OnClick.Handle(this, &GameSettingsScreen::OnAutoFrameskip); graphicsSettings->Add(new CheckBox(&cap60FPS_, gr->T("Force max 60 FPS (helps GoW)"))); @@ -179,13 +179,13 @@ void GameSettingsScreen::CreateViews() { #else static const char *internalResolutions[] = {"Auto (1:1)", "1x PSP", "2x PSP", "3x PSP", "4x PSP", "5x PSP" }; #endif - resolutionChoice_ = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalResolution, gr->T("Rendering Resolution"), internalResolutions, 0, ARRAY_SIZE(internalResolutions), gs, screenManager())); + resolutionChoice_ = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalResolution, gr->T("Rendering Resolution"), internalResolutions, 0, ARRAY_SIZE(internalResolutions), gr, screenManager())); resolutionChoice_->OnChoice.Handle(this, &GameSettingsScreen::OnResolutionChange); resolutionEnable_ = !g_Config.bSoftwareRendering && (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE); resolutionChoice_->SetEnabledPtr(&resolutionEnable_); static const char *displayRotation[] = {"Landscape", "Portrait", "Landscape Reversed", "Portrait Reversed"}; - PopupMultiChoice *dispRotChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalScreenRotation, gr->T("Display Rotation"), displayRotation, 1, ARRAY_SIZE(displayRotation), c, screenManager())); + PopupMultiChoice *dispRotChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalScreenRotation, gr->T("Display Rotation"), displayRotation, 1, ARRAY_SIZE(displayRotation), co, screenManager())); dispRotChoice->SetEnabledPtr(&displayRotEnable_); displayRotEnable_ = (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE); @@ -231,7 +231,7 @@ void GameSettingsScreen::CreateViews() { // } static const char *quality[] = { "Low", "Medium", "High"}; - PopupMultiChoice *beziersChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iSplineBezierQuality, gr->T("LowCurves", "Spline/Bezier curves quality"), quality, 0, ARRAY_SIZE(quality), gs, screenManager())); + PopupMultiChoice *beziersChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iSplineBezierQuality, gr->T("LowCurves", "Spline/Bezier curves quality"), quality, 0, ARRAY_SIZE(quality), gr, screenManager())); beziersChoice->SetDisabledPtr(&g_Config.bSoftwareRendering); // In case we're going to add few other antialiasing option like MSAA in the future. @@ -254,11 +254,11 @@ void GameSettingsScreen::CreateViews() { texScaleLevels = texScaleLevelsPOT; numTexScaleLevels = ARRAY_SIZE(texScaleLevelsPOT); } - PopupMultiChoice *texScalingChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingLevel, gr->T("Upscale Level"), texScaleLevels, 0, numTexScaleLevels, gs, screenManager())); + PopupMultiChoice *texScalingChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingLevel, gr->T("Upscale Level"), texScaleLevels, 0, numTexScaleLevels, gr, screenManager())); texScalingChoice->SetDisabledPtr(&g_Config.bSoftwareRendering); static const char *texScaleAlgos[] = { "xBRZ", "Hybrid", "Bicubic", "Hybrid + Bicubic", }; - PopupMultiChoice *texScalingType = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingType, gr->T("Upscale Type"), texScaleAlgos, 0, ARRAY_SIZE(texScaleAlgos), gs, screenManager())); + PopupMultiChoice *texScalingType = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingType, gr->T("Upscale Type"), texScaleAlgos, 0, ARRAY_SIZE(texScaleAlgos), gr, screenManager())); texScalingType->SetDisabledPtr(&g_Config.bSoftwareRendering); CheckBox *deposterize = graphicsSettings->Add(new CheckBox(&g_Config.bTexDeposterize, gr->T("Deposterize"))); @@ -266,15 +266,15 @@ void GameSettingsScreen::CreateViews() { graphicsSettings->Add(new ItemHeader(gr->T("Texture Filtering"))); static const char *anisoLevels[] = { "Off", "2x", "4x", "8x", "16x" }; - PopupMultiChoice *anisoFiltering = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAnisotropyLevel, gr->T("Anisotropic Filtering"), anisoLevels, 0, ARRAY_SIZE(anisoLevels), gs, screenManager())); + PopupMultiChoice *anisoFiltering = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAnisotropyLevel, gr->T("Anisotropic Filtering"), anisoLevels, 0, ARRAY_SIZE(anisoLevels), gr, screenManager())); anisoFiltering->SetDisabledPtr(&g_Config.bSoftwareRendering); static const char *texFilters[] = { "Auto", "Nearest", "Linear", "Linear on FMV", }; - PopupMultiChoice *texFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexFiltering, gr->T("Texture Filter"), texFilters, 1, ARRAY_SIZE(texFilters), gs, screenManager())); + PopupMultiChoice *texFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexFiltering, gr->T("Texture Filter"), texFilters, 1, ARRAY_SIZE(texFilters), gr, screenManager())); texFilter->SetDisabledPtr(&g_Config.bSoftwareRendering); static const char *bufFilters[] = { "Linear", "Nearest", }; - PopupMultiChoice *bufFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBufFilter, gr->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gs, screenManager())); + PopupMultiChoice *bufFilter = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBufFilter, gr->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gr, screenManager())); bufFilter->SetDisabledPtr(&g_Config.bSoftwareRendering); #ifdef ANDROID @@ -308,7 +308,7 @@ void GameSettingsScreen::CreateViews() { depthRange->SetDisabledPtr(&g_Config.bSoftwareRendering); static const char *bloomHackOptions[] = { "Off", "Safe", "Balanced", "Aggressive" }; - PopupMultiChoice *bloomHack = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBloomHack, gr->T("Lower resolution for effects (reduces artifacts)"), bloomHackOptions, 0, ARRAY_SIZE(bloomHackOptions), gs, screenManager())); + PopupMultiChoice *bloomHack = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBloomHack, gr->T("Lower resolution for effects (reduces artifacts)"), bloomHackOptions, 0, ARRAY_SIZE(bloomHackOptions), gr, screenManager())); bloomHackEnable_ = !g_Config.bSoftwareRendering && (g_Config.iInternalResolution != 1); bloomHack->SetEnabledPtr(&bloomHackEnable_); @@ -319,7 +319,7 @@ void GameSettingsScreen::CreateViews() { , "Statistics" #endif }; - graphicsSettings->Add(new PopupMultiChoice(&g_Config.iShowFPSCounter, gr->T("Show FPS Counter"), fpsChoices, 0, ARRAY_SIZE(fpsChoices), gs, screenManager())); + graphicsSettings->Add(new PopupMultiChoice(&g_Config.iShowFPSCounter, gr->T("Show FPS Counter"), fpsChoices, 0, ARRAY_SIZE(fpsChoices), gr, screenManager())); graphicsSettings->Add(new CheckBox(&g_Config.bShowDebugStats, gr->T("Show Debug Statistics")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting); // Developer tools are not accessible ingame, so it goes here. @@ -356,7 +356,7 @@ void GameSettingsScreen::CreateViews() { #endif static const char *latency[] = { "Low", "Medium", "High" }; - PopupMultiChoice *lowAudio = audioSettings->Add(new PopupMultiChoice(&g_Config.iAudioLatency, a->T("Audio Latency"), latency, 0, ARRAY_SIZE(latency), gs, screenManager())); + PopupMultiChoice *lowAudio = audioSettings->Add(new PopupMultiChoice(&g_Config.iAudioLatency, a->T("Audio Latency"), latency, 0, ARRAY_SIZE(latency), gr, screenManager())); lowAudio->SetEnabledPtr(&g_Config.bEnableSound); if (System_GetPropertyInt(SYSPROP_AUDIO_SAMPLE_RATE) == 44100) { @@ -420,7 +420,7 @@ void GameSettingsScreen::CreateViews() { View *opacity = controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonOpacity, 0, 100, co->T("Button Opacity"), screenManager())); opacity->SetEnabledPtr(&g_Config.bShowTouchControls); static const char *touchControlStyles[] = {"Classic", "Thin borders"}; - View *style = controlsSettings->Add(new PopupMultiChoice(&g_Config.iTouchButtonStyle, co->T("Button style"), touchControlStyles, 0, ARRAY_SIZE(touchControlStyles), c, screenManager())); + View *style = controlsSettings->Add(new PopupMultiChoice(&g_Config.iTouchButtonStyle, co->T("Button style"), touchControlStyles, 0, ARRAY_SIZE(touchControlStyles), co, screenManager())); style->SetEnabledPtr(&g_Config.bShowTouchControls); } @@ -429,13 +429,13 @@ void GameSettingsScreen::CreateViews() { controlsSettings->Add(new ItemHeader(co->T("DInput Analog Settings", "DInput Analog Settings"))); controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogDeadzone, 0.0f, 1.0f, co->T("Deadzone Radius"), screenManager())); - controlsSettings->Add(new PopupMultiChoice(&g_Config.iDInputAnalogInverseMode, co->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), c, screenManager())); + controlsSettings->Add(new PopupMultiChoice(&g_Config.iDInputAnalogInverseMode, co->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), co, screenManager())); controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogInverseDeadzone, 0.0f, 1.0f, co->T("Analog Mapper Low End", "Analog Mapper Low End (Inverse Deadzone)"), screenManager())); controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fDInputAnalogSensitivity, 0.0f, 10.0f, co->T("Analog Mapper High End", "Analog Mapper High End (Axis Sensitivity)"), screenManager())); controlsSettings->Add(new ItemHeader(co->T("XInput Analog Settings", "XInput Analog Settings"))); controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogDeadzone, 0.0f, 1.0f, co->T("Deadzone Radius"), screenManager())); - controlsSettings->Add(new PopupMultiChoice(&g_Config.iXInputAnalogInverseMode, co->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), c, screenManager())); + controlsSettings->Add(new PopupMultiChoice(&g_Config.iXInputAnalogInverseMode, co->T("Analog Mapper Mode"), inverseDeadzoneModes, 0, ARRAY_SIZE(inverseDeadzoneModes), co, screenManager())); controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogInverseDeadzone, 0.0f, 1.0f, co->T("Analog Mapper Low End", "Analog Mapper Low End (Inverse Deadzone)"), screenManager())); controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fXInputAnalogSensitivity, 0.0f, 10.0f, co->T("Analog Mapper High End", "Analog Mapper High End (Axis Sensitivity)"), screenManager())); #endif @@ -502,7 +502,7 @@ void GameSettingsScreen::CreateViews() { systemSettings->Add(new CheckBox(&g_Config.bSeparateCPUThread, sy->T("Multithreaded (experimental)"))); systemSettings->Add(new CheckBox(&g_Config.bSeparateIOThread, sy->T("I/O on thread (experimental)")))->SetEnabled(!PSP_IsInited()); static const char *ioTimingMethods[] = { "Fast (lag on slow storage)", "Host (bugs, less lag)", "Simulate UMD delays" }; - View *ioTimingMethod = systemSettings->Add(new PopupMultiChoice(&g_Config.iIOTimingMethod, sy->T("IO timing method"), ioTimingMethods, 0, ARRAY_SIZE(ioTimingMethods), s, screenManager())); + View *ioTimingMethod = systemSettings->Add(new PopupMultiChoice(&g_Config.iIOTimingMethod, sy->T("IO timing method"), ioTimingMethods, 0, ARRAY_SIZE(ioTimingMethods), sy, screenManager())); ioTimingMethod->SetEnabledPtr(&g_Config.bSeparateIOThread); systemSettings->Add(new CheckBox(&g_Config.bForceLagSync, sy->T("Force real clock sync (slower, less lag)"))); systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, sy->T("Change CPU Clock", "Change CPU Clock (0 = default) (unstable)"), screenManager())); @@ -585,7 +585,7 @@ void GameSettingsScreen::CreateViews() { systemSettings->Add(new ItemHeader(sy->T("PSP Settings"))); static const char *models[] = {"PSP-1000" , "PSP-2000/3000"}; - systemSettings->Add(new PopupMultiChoice(&g_Config.iPSPModel, sy->T("PSP Model"), models, 0, ARRAY_SIZE(models), s, screenManager()))->SetEnabled(!PSP_IsInited()); + systemSettings->Add(new PopupMultiChoice(&g_Config.iPSPModel, sy->T("PSP Model"), models, 0, ARRAY_SIZE(models), sy, screenManager()))->SetEnabled(!PSP_IsInited()); // TODO: Come up with a way to display a keyboard for mobile users, // so until then, this is Windows/Desktop only. #if defined(_WIN32) // TODO: Add all platforms where KEY_CHAR support is added @@ -599,11 +599,11 @@ void GameSettingsScreen::CreateViews() { #endif systemSettings->Add(new CheckBox(&g_Config.bDayLightSavings, sy->T("Day Light Saving"))); static const char *dateFormat[] = { "YYYYMMDD", "MMDDYYYY", "DDMMYYYY"}; - systemSettings->Add(new PopupMultiChoice(&g_Config.iDateFormat, sy->T("Date Format"), dateFormat, 1, 3, s, screenManager())); + systemSettings->Add(new PopupMultiChoice(&g_Config.iDateFormat, sy->T("Date Format"), dateFormat, 1, 3, sy, screenManager())); static const char *timeFormat[] = { "12HR", "24HR"}; - systemSettings->Add(new PopupMultiChoice(&g_Config.iTimeFormat, sy->T("Time Format"), timeFormat, 1, 2, s, screenManager())); + systemSettings->Add(new PopupMultiChoice(&g_Config.iTimeFormat, sy->T("Time Format"), timeFormat, 1, 2, sy, screenManager())); static const char *buttonPref[] = { "Use O to confirm", "Use X to confirm" }; - systemSettings->Add(new PopupMultiChoice(&g_Config.iButtonPreference, sy->T("Confirmation Button"), buttonPref, 0, 2, s, screenManager())); + systemSettings->Add(new PopupMultiChoice(&g_Config.iButtonPreference, sy->T("Confirmation Button"), buttonPref, 0, 2, sy, screenManager())); } UI::EventReturn GameSettingsScreen::OnAutoFrameskip(UI::EventParams &e) { diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index 3d4e035dbf..423d6c19b2 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -369,7 +369,7 @@ UI::EventReturn GamePauseScreen::OnScreenshotClicked(UI::EventParams &e) { std::string fn = v->GetScreenshotFilename(); std::string title = v->GetScreenshotTitle(); I18NCategory *pa = GetI18NCategory("Pause"); - Screen *screen = new ScreenshotViewScreen(fn, title, v->GetSlot(), p); + Screen *screen = new ScreenshotViewScreen(fn, title, v->GetSlot(), pa); screenManager()->push(screen); } return UI::EVENT_DONE; From d248d77839118a7b73dd3e598829fb3cbcad87a1 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Thu, 2 Jul 2015 01:48:52 +0200 Subject: [PATCH 15/16] Oops, forgot these ones --- UI/GameSettingsScreen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index c5968f7979..6be2220ae2 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -383,7 +383,7 @@ void GameSettingsScreen::CreateViews() { #if defined(MOBILE_DEVICE) controlsSettings->Add(new CheckBox(&g_Config.bHapticFeedback, co->T("HapticFeedback", "Haptic Feedback (vibration)"))); static const char *tiltTypes[] = { "None (Disabled)", "Analog Stick", "D-PAD", "PSP Action Buttons"}; - controlsSettings->Add(new PopupMultiChoice(&g_Config.iTiltInputType, co->T("Tilt Input Type"), tiltTypes, 0, ARRAY_SIZE(tiltTypes), c, screenManager()))->OnClick.Handle(this, &GameSettingsScreen::OnTiltTypeChange); + controlsSettings->Add(new PopupMultiChoice(&g_Config.iTiltInputType, co->T("Tilt Input Type"), tiltTypes, 0, ARRAY_SIZE(tiltTypes), co, screenManager()))->OnClick.Handle(this, &GameSettingsScreen::OnTiltTypeChange); Choice *customizeTilt = controlsSettings->Add(new Choice(co->T("Customize tilt"))); customizeTilt->OnClick.Handle(this, &GameSettingsScreen::OnTiltCustomize); @@ -516,7 +516,7 @@ void GameSettingsScreen::CreateViews() { #ifdef ANDROID if (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) == DEVICE_TYPE_MOBILE) { static const char *screenRotation[] = {"Auto", "Landscape", "Portrait", "Landscape Reversed", "Portrait Reversed"}; - PopupMultiChoice *rot = systemSettings->Add(new PopupMultiChoice(&g_Config.iScreenRotation, co->T("Screen Rotation"), screenRotation, 0, ARRAY_SIZE(screenRotation), c, screenManager())); + PopupMultiChoice *rot = systemSettings->Add(new PopupMultiChoice(&g_Config.iScreenRotation, co->T("Screen Rotation"), screenRotation, 0, ARRAY_SIZE(screenRotation), co, screenManager())); rot->OnChoice.Handle(this, &GameSettingsScreen::OnScreenRotation); } #endif From 373346dcebe719374eb0830ff5e42aed05aaac56 Mon Sep 17 00:00:00 2001 From: vnctdj Date: Thu, 2 Jul 2015 09:14:33 +0200 Subject: [PATCH 16/16] Fix error catched by Travis CI, should fix Android build --- UI/GameSettingsScreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 6be2220ae2..726f6312a6 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -193,7 +193,7 @@ void GameSettingsScreen::CreateViews() { static const char *deviceResolutions[] = { "Native device resolution", "Auto (same as Rendering)", "1x PSP", "2x PSP", "3x PSP", "4x PSP", "5x PSP" }; int max_res_temp = std::max(System_GetPropertyInt(SYSPROP_DISPLAY_XRES), System_GetPropertyInt(SYSPROP_DISPLAY_YRES)) / 480 + 2; int max_res = std::min(max_res_temp, (int)ARRAY_SIZE(deviceResolutions)); - UI::PopupMultiChoice *hwscale = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAndroidHwScale, gr->T("Display Resolution (HW scaler)"), deviceResolutions, 0, max_res, gs, screenManager())); + UI::PopupMultiChoice *hwscale = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAndroidHwScale, gr->T("Display Resolution (HW scaler)"), deviceResolutions, 0, max_res, gr, screenManager())); hwscale->OnChoice.Handle(this, &GameSettingsScreen::OnHwScaleChange); // To refresh the display mode #endif