From 15f1c69fa2fd98ebe176cffd9cac89c837ce261d Mon Sep 17 00:00:00 2001 From: LunaMoo Date: Mon, 13 Nov 2017 02:11:22 +0100 Subject: [PATCH] Vulkan too fast;p / prefer to hold alternative speed than toggle. --- Core/Config.cpp | 1 + Core/Config.h | 1 + GPU/Vulkan/GPU_Vulkan.cpp | 2 +- UI/EmuScreen.cpp | 21 +++++++++++++++------ UI/GameSettingsScreen.cpp | 1 + UI/GameSettingsScreen.h | 1 + 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index e37f4ee68e..962e594aac 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -495,6 +495,7 @@ static ConfigSetting graphicsSettings[] = { ReportedConfigSetting("FrameSkip", &g_Config.iFrameSkip, 0, true, true), ReportedConfigSetting("AutoFrameSkip", &g_Config.bAutoFrameSkip, false, true, true), ConfigSetting("FrameRate", &g_Config.iFpsLimit, 0, true, true), + ConfigSetting("UnToggleFpsLimit", &g_Config.bUnToggleFpsLimit, false, true, true), ConfigSetting("FrameSkipUnthrottle", &g_Config.bFrameSkipUnthrottle, &DefaultFrameskipUnthrottle, true, false), #if defined(USING_WIN_UI) ConfigSetting("RestartRequired", &g_Config.bRestartRequired, false, false), diff --git a/Core/Config.h b/Core/Config.h index f571cfca19..662ef45fba 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -202,6 +202,7 @@ public: int iTexScalingType; // 0 = xBRZ, 1 = Hybrid bool bTexDeposterize; int iFpsLimit; + bool bUnToggleFpsLimit; int iForceMaxEmulatedFPS; int iMaxRecent; int iCurrentStateSlot; diff --git a/GPU/Vulkan/GPU_Vulkan.cpp b/GPU/Vulkan/GPU_Vulkan.cpp index b09f060cf6..d62f58d670 100644 --- a/GPU/Vulkan/GPU_Vulkan.cpp +++ b/GPU/Vulkan/GPU_Vulkan.cpp @@ -182,7 +182,7 @@ void GPU_Vulkan::CheckGPUFeatures() { if (vulkan_->GetFeaturesEnabled().dualSrcBlend) { switch (vulkan_->GetPhysicalDeviceProperties().vendorID) { case VULKAN_VENDOR_INTEL: - case VULKAN_VENDOR_AMD: + //case VULKAN_VENDOR_AMD: //AMD doesn't need it on updated drivers. // Work around for Intel driver bug. See issue #10074, and also #10065 (AMD) break; default: diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index e85c92e221..35e8f9576c 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -414,13 +414,16 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) { break; case VIRTKEY_SPEED_TOGGLE: - if (PSP_CoreParameter().fpsLimit == 0) { + if (!g_Config.bUnToggleFpsLimit) { + if (PSP_CoreParameter().fpsLimit == 0) { + PSP_CoreParameter().fpsLimit = 1; + osm.Show(sc->T("fixed", "Speed: alternate"), 1.0); + } else if (PSP_CoreParameter().fpsLimit == 1) { + PSP_CoreParameter().fpsLimit = 0; + osm.Show(sc->T("standard", "Speed: standard"), 1.0); + } + } else { PSP_CoreParameter().fpsLimit = 1; - osm.Show(sc->T("fixed", "Speed: alternate"), 1.0); - } - else if (PSP_CoreParameter().fpsLimit == 1) { - PSP_CoreParameter().fpsLimit = 0; - osm.Show(sc->T("standard", "Speed: standard"), 1.0); } break; @@ -506,6 +509,12 @@ void EmuScreen::onVKeyUp(int virtualKeyCode) { PSP_CoreParameter().unthrottle = false; break; + case VIRTKEY_SPEED_TOGGLE: + if (g_Config.bUnToggleFpsLimit) { + PSP_CoreParameter().fpsLimit = 0; + } + break; + case VIRTKEY_AXIS_X_MIN: case VIRTKEY_AXIS_X_MAX: setVKeyAnalogX(CTRL_STICK_LEFT, VIRTKEY_AXIS_X_MIN, VIRTKEY_AXIS_X_MAX); diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index e77d97dd27..32a9910849 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -255,6 +255,7 @@ void GameSettingsScreen::CreateViews() { PopupSliderChoice *altSpeed = graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercent_, 0, 1000, gr->T("Alternative Speed", "Alternative speed"), 5, screenManager(), gr->T("%, 0:unlimited"))); altSpeed->SetFormat("%i%%"); altSpeed->SetZeroLabel(gr->T("Unlimited")); + CheckBox *untoggleFpsLimit = graphicsSettings->Add(new CheckBox(&g_Config.bUnToggleFpsLimit, gr->T("Unthrottle-like Alternative Speed"))); } graphicsSettings->Add(new ItemHeader(gr->T("Features"))); I18NCategory *ps = GetI18NCategory("PostShaders"); diff --git a/UI/GameSettingsScreen.h b/UI/GameSettingsScreen.h index 66ded9f009..84ecda0bf5 100644 --- a/UI/GameSettingsScreen.h +++ b/UI/GameSettingsScreen.h @@ -109,6 +109,7 @@ private: // Temporaries to convert bools to int settings bool cap60FPS_; int iAlternateSpeedPercent_; + int iAlternateSpeedPercent2_; bool enableReports_; //edit the game-specific settings and restore the global settings after exiting