Disable Vsync while holding tab to disable the frame limit, and allow toggling vsync while emulation is running in OGL.
D3D9 still doesn't support changing vsync while emulation is running. Fixes issue 6111.
This commit is contained in:
1 parent
c5033e8594
commit
7c2c4662a7
7 files changed
+19
-3
No files matched your search
@@ -104,6 +104,7 @@ static bool g_requestRefreshInfo = false;
|
||||
static int g_pauseAndLockDepth = 0;
|
||||
|
||||
SCoreStartupParameter g_CoreStartupParameter;
|
||||
bool isTabPressed = false;
|
||||
|
||||
std::string GetStateFileName() { return g_stateFileName; }
|
||||
void SetStateFileName(std::string val) { g_stateFileName = val; }
|
||||
@@ -603,9 +604,13 @@ void VideoThrottle()
|
||||
u32 TargetVPS = (SConfig::GetInstance().m_Framelimit > 2) ?
|
||||
(SConfig::GetInstance().m_Framelimit - 1) * 5 : VideoInterface::TargetRefreshRate;
|
||||
|
||||
if (Host_GetKeyState('\t'))
|
||||
isTabPressed = true;
|
||||
|
||||
// Disable the frame-limiter when the throttle (Tab) key is held down. Audio throttle: m_Framelimit = 2
|
||||
if (SConfig::GetInstance().m_Framelimit && SConfig::GetInstance().m_Framelimit != 2 && !Host_GetKeyState('\t'))
|
||||
{
|
||||
isTabPressed = false;
|
||||
u32 frametime = ((SConfig::GetInstance().b_UseFPS)? Common::AtomicLoad(DrawnFrame) : DrawnVideo) * 1000 / TargetVPS;
|
||||
|
||||
u32 timeDifference = (u32)Timer.GetTimeDifference();
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace Core
|
||||
// TODO: kill, use SConfig instead
|
||||
extern SCoreStartupParameter g_CoreStartupParameter;
|
||||
|
||||
extern bool isTabPressed;
|
||||
|
||||
void Callback_VideoCopiedToXFB(bool video_update);
|
||||
|
||||
enum EState
|
||||
|
||||
Reference in new issue
Block a user