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: