diff --git a/GPU/Common/GPUStateUtils.cpp b/GPU/Common/GPUStateUtils.cpp index 7f9bc2b77d..c66d4c6083 100644 --- a/GPU/Common/GPUStateUtils.cpp +++ b/GPU/Common/GPUStateUtils.cpp @@ -490,7 +490,7 @@ ReplaceBlendType ReplaceBlendWithShader(GEBufferFormat bufferFormat) { if (gstate_c.Use(GPU_USE_FRAMEBUFFER_FETCH)) return REPLACE_BLEND_READ_FRAMEBUFFER; // Hm, this is similar to the L.A. Rush case above. This will not be accurate. - // Wonder in which games we encounter this? + // Wonder in which games we encounter this? One example is MotorStorm. return REPLACE_BLEND_2X_ALPHA; } diff --git a/UI/DeveloperToolsScreen.cpp b/UI/DeveloperToolsScreen.cpp index 1799fcba8c..43701be41e 100644 --- a/UI/DeveloperToolsScreen.cpp +++ b/UI/DeveloperToolsScreen.cpp @@ -73,26 +73,9 @@ static std::string PostShaderTranslateName(std::string_view value) { } } -void DeveloperToolsScreen::CreateViews() { +void DeveloperToolsScreen::CreateTextureReplacementTab(UI::LinearLayout *list) { using namespace UI; - root_ = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, FILL_PARENT)); - ScrollView *settingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)); - settingsScroll->SetTag("DevToolsSettings"); - root_->Add(settingsScroll); - - auto di = GetI18NCategory(I18NCat::DIALOG); auto dev = GetI18NCategory(I18NCat::DEVELOPER); - auto gr = GetI18NCategory(I18NCat::GRAPHICS); - auto a = GetI18NCategory(I18NCat::AUDIO); - auto sy = GetI18NCategory(I18NCat::SYSTEM); - auto ps = GetI18NCategory(I18NCat::POSTSHADERS); - auto ms = GetI18NCategory(I18NCat::MEMSTICK); - auto si = GetI18NCategory(I18NCat::SYSINFO); - - AddStandardBack(root_); - - LinearLayout *list = settingsScroll->Add(new LinearLayoutList(ORIENT_VERTICAL, new LinearLayoutParams(1.0f))); - list->SetSpacing(0); list->Add(new ItemHeader(dev->T("Texture Replacement"))); list->Add(new CheckBox(&g_Config.bSaveNewTextures, dev->T("Save new textures"))); @@ -112,6 +95,14 @@ void DeveloperToolsScreen::CreateViews() { } return true; }); +} + +void DeveloperToolsScreen::CreateGeneralTab(UI::LinearLayout *list) { + using namespace UI; + auto dev = GetI18NCategory(I18NCat::DEVELOPER); + auto si = GetI18NCategory(I18NCat::SYSINFO); + auto sy = GetI18NCategory(I18NCat::SYSTEM); + auto gr = GetI18NCategory(I18NCat::GRAPHICS); list->Add(new ItemHeader(sy->T("General"))); @@ -226,14 +217,31 @@ void DeveloperToolsScreen::CreateViews() { auto displayRefreshRate = list->Add(new PopupSliderChoice(&g_Config.iDisplayRefreshRate, 60, 1000, 60, dev->T("Display refresh rate"), 1, screenManager())); displayRefreshRate->SetFormat(si->T("%d Hz")); - list->Add(new CheckBox(&g_Config.bUseOldAtrac, dev->T("Use the old sceAtrac implementation"))); + // Makes it easy to get savestates out of an iOS device. The file listing shown in MacOS doesn't allow + // you to descend into directories. +#if PPSSPP_PLATFORM(IOS) + list->Add(new Choice(dev->T("Copy savestates to memstick root")))->OnClick.Handle(this, &DeveloperToolsScreen::OnCopyStatesToRoot); +#endif + +} + +void DeveloperToolsScreen::CreateDumpFileTab(UI::LinearLayout *list) { + using namespace UI; + auto dev = GetI18NCategory(I18NCat::DEVELOPER); list->Add(new ItemHeader("Dump file types")); list->Add(new BitCheckBox(&g_Config.iDumpFileTypes, (int)DumpFileType::EBOOT, dev->T("Dump Decrypted Eboot", "Dump Decrypted EBOOT.BIN (If Encrypted) When Booting Game"))); list->Add(new BitCheckBox(&g_Config.iDumpFileTypes, (int)DumpFileType::PRX, dev->T("PRX"))); list->Add(new BitCheckBox(&g_Config.iDumpFileTypes, (int)DumpFileType::Atrac3, dev->T("Atrac3/3+"))); +} - list->Add(new ItemHeader("Disable HLE (experimental! Not expected to work yet)")); +void DeveloperToolsScreen::CreateHLETab(UI::LinearLayout *list) { + using namespace UI; + auto dev = GetI18NCategory(I18NCat::DEVELOPER); + + list->Add(new CheckBox(&g_Config.bUseOldAtrac, dev->T("Use the old sceAtrac implementation"))); + + list->Add(new ItemHeader(dev->T("Disable HLE"))); for (int i = 0; i < (int)DisableHLEFlags::Count; i++) { DisableHLEFlags flag = (DisableHLEFlags)(1 << i); @@ -247,8 +255,11 @@ void DeveloperToolsScreen::CreateViews() { } } } +} -#if !PPSSPP_PLATFORM(ANDROID) && !PPSSPP_PLATFORM(IOS) && !PPSSPP_PLATFORM(SWITCH) +void DeveloperToolsScreen::CreateMIPSTracerTab(UI::LinearLayout *list) { + using namespace UI; + auto dev = GetI18NCategory(I18NCat::DEVELOPER); list->Add(new ItemHeader(dev->T("MIPSTracer"))); MIPSTracerEnabled_ = mipsTracer.tracing_enabled; @@ -300,7 +311,13 @@ void DeveloperToolsScreen::CreateViews() { Button *ClearMIPSTracer = list->Add(new Button(dev->T("Clear the MIPSTracer"))); ClearMIPSTracer->OnClick.Handle(this, &DeveloperToolsScreen::OnMIPSTracerClearTracer); -#endif +} + +void DeveloperToolsScreen::CreateRenderingTab(UI::LinearLayout *list) { + using namespace UI; + auto dev = GetI18NCategory(I18NCat::DEVELOPER); + auto gr = GetI18NCategory(I18NCat::GRAPHICS); + auto ps = GetI18NCategory(I18NCat::POSTSHADERS); Draw::DrawContext *draw = screenManager()->getDrawContext(); @@ -312,7 +329,7 @@ void DeveloperToolsScreen::CreateViews() { #if !PPSSPP_PLATFORM(UWP) if (g_Config.iGPUBackend != (int)GPUBackend::OPENGL || gl_extensions.GLES3) { #else - { + { #endif list->Add(new CheckBox(&g_Config.bUberShaderFragment, dev->T("Fragment"))); } @@ -365,12 +382,28 @@ void DeveloperToolsScreen::CreateViews() { } } } +} - // Makes it easy to get savestates out of an iOS device. The file listing shown in MacOS doesn't allow - // you to descend into directories. -#if PPSSPP_PLATFORM(IOS) - list->Add(new Choice(dev->T("Copy savestates to memstick root")))->OnClick.Handle(this, &DeveloperToolsScreen::OnCopyStatesToRoot); +void DeveloperToolsScreen::CreateViews() { + using namespace UI; + root_ = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, FILL_PARENT)); + ScrollView *settingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)); + settingsScroll->SetTag("DevToolsSettings"); + root_->Add(settingsScroll); + + AddStandardBack(root_); + + LinearLayout *list = settingsScroll->Add(new LinearLayoutList(ORIENT_VERTICAL, new LinearLayoutParams(1.0f))); + list->SetSpacing(0); + + CreateTextureReplacementTab(list); + CreateGeneralTab(list); + CreateDumpFileTab(list); + CreateHLETab(list); +#if !PPSSPP_PLATFORM(ANDROID) && !PPSSPP_PLATFORM(IOS) && !PPSSPP_PLATFORM(SWITCH) + CreateMIPSTracerTab(list); #endif + CreateRenderingTab(list); // Reconsider whenever recreating views. hasTexturesIni_ = HasIni::MAYBE; diff --git a/UI/DeveloperToolsScreen.h b/UI/DeveloperToolsScreen.h index 50e9e01743..6ada22e10b 100644 --- a/UI/DeveloperToolsScreen.h +++ b/UI/DeveloperToolsScreen.h @@ -17,6 +17,13 @@ protected: void CreateViews() override; private: + void CreateTextureReplacementTab(UI::LinearLayout *parent); + void CreateGeneralTab(UI::LinearLayout *parent); + void CreateDumpFileTab(UI::LinearLayout *parent); + void CreateHLETab(UI::LinearLayout *parent); + void CreateMIPSTracerTab(UI::LinearLayout *list); + void CreateRenderingTab(UI::LinearLayout *list); + UI::EventReturn OnRunCPUTests(UI::EventParams &e); UI::EventReturn OnLoggingChanged(UI::EventParams &e); UI::EventReturn OnOpenTexturesIniFile(UI::EventParams &e);