mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-04 07:09:03 +00:00
Disable Vsync while holding tab to disable the frame limit.
Fixes issue 6111.
This commit is contained in:
parent
106d7c37e8
commit
341eb87806
1 changed files with 21 additions and 1 deletions
|
@ -71,6 +71,8 @@
|
||||||
#include "State.h"
|
#include "State.h"
|
||||||
#include "Movie.h"
|
#include "Movie.h"
|
||||||
|
|
||||||
|
#include "VideoConfig.h"
|
||||||
|
|
||||||
// TODO: ugly, remove
|
// TODO: ugly, remove
|
||||||
bool g_aspect_wide;
|
bool g_aspect_wide;
|
||||||
|
|
||||||
|
@ -603,6 +605,25 @@ void VideoThrottle()
|
||||||
u32 TargetVPS = (SConfig::GetInstance().m_Framelimit > 2) ?
|
u32 TargetVPS = (SConfig::GetInstance().m_Framelimit > 2) ?
|
||||||
(SConfig::GetInstance().m_Framelimit - 1) * 5 : VideoInterface::TargetRefreshRate;
|
(SConfig::GetInstance().m_Framelimit - 1) * 5 : VideoInterface::TargetRefreshRate;
|
||||||
|
|
||||||
|
static bool isUnthrottling = false;
|
||||||
|
static bool wasVSync = g_ActiveConfig.bVSync;
|
||||||
|
|
||||||
|
// Disable vsync while holding tab to disable the frame limit.
|
||||||
|
if (Host_GetKeyState('\t'))
|
||||||
|
{
|
||||||
|
if (!isUnthrottling)
|
||||||
|
wasVSync = g_ActiveConfig.bVSync;
|
||||||
|
if (g_ActiveConfig.bVSync)
|
||||||
|
g_Config.bVSync = false;
|
||||||
|
isUnthrottling = true;
|
||||||
|
}
|
||||||
|
else if (isUnthrottling)
|
||||||
|
{
|
||||||
|
isUnthrottling = false;
|
||||||
|
if (wasVSync)
|
||||||
|
g_Config.bVSync = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Disable the frame-limiter when the throttle (Tab) key is held down. Audio throttle: m_Framelimit = 2
|
// 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'))
|
if (SConfig::GetInstance().m_Framelimit && SConfig::GetInstance().m_Framelimit != 2 && !Host_GetKeyState('\t'))
|
||||||
{
|
{
|
||||||
|
@ -654,7 +675,6 @@ void Callback_VideoCopiedToXFB(bool video_update)
|
||||||
{
|
{
|
||||||
if(video_update)
|
if(video_update)
|
||||||
Common::AtomicIncrement(DrawnFrame);
|
Common::AtomicIncrement(DrawnFrame);
|
||||||
Movie::FrameUpdate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Callback_ISOName: Let the DSP emulator get the game name
|
// Callback_ISOName: Let the DSP emulator get the game name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue