Add set/get functions for IsFramelimiterTempDisabled
This commit is contained in:
parent
8483811b39
commit
30586f4d29
|
@ -124,7 +124,7 @@ void CMixer::PushSamples(const short *samples, unsigned int num_samples)
|
|||
if (*PowerPC::GetStatePtr() != PowerPC::CPU_RUNNING || soundStream->IsMuted())
|
||||
break;
|
||||
// Shortcut key for Throttle Skipping
|
||||
if (Core::IsFramelimiterTempDisabled)
|
||||
if (Core::GetIsFramelimiterTempDisabled())
|
||||
break;
|
||||
SLEEP(1);
|
||||
soundStream->Update();
|
||||
|
|
|
@ -90,7 +90,17 @@ static bool g_requestRefreshInfo = false;
|
|||
static int g_pauseAndLockDepth = 0;
|
||||
|
||||
SCoreStartupParameter g_CoreStartupParameter;
|
||||
bool IsFramelimiterTempDisabled = false;
|
||||
static bool IsFramelimiterTempDisabled = false;
|
||||
|
||||
bool GetIsFramelimiterTempDisabled()
|
||||
{
|
||||
return IsFramelimiterTempDisabled;
|
||||
}
|
||||
|
||||
void SetIsFramelimiterTempDisabled(bool disable)
|
||||
{
|
||||
IsFramelimiterTempDisabled = disable;
|
||||
}
|
||||
|
||||
std::string GetStateFileName() { return g_stateFileName; }
|
||||
void SetStateFileName(std::string val) { g_stateFileName = val; }
|
||||
|
|
|
@ -24,7 +24,8 @@ namespace Core
|
|||
// TODO: kill, use SConfig instead
|
||||
extern SCoreStartupParameter g_CoreStartupParameter;
|
||||
|
||||
extern bool IsFramelimiterTempDisabled;
|
||||
bool GetIsFramelimiterTempDisabled();
|
||||
void SetIsFramelimiterTempDisabled(bool disable);
|
||||
|
||||
void Callback_VideoCopiedToXFB(bool video_update);
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ void ThrottleCallback(u64 last_time, int cyclesLate)
|
|||
|
||||
int diff = (u32)last_time - time;
|
||||
const SConfig& config = SConfig::GetInstance();
|
||||
bool frame_limiter = config.m_Framelimit && config.m_Framelimit != 2 && !Core::IsFramelimiterTempDisabled;
|
||||
bool frame_limiter = config.m_Framelimit && config.m_Framelimit != 2 && !Core::GetIsFramelimiterTempDisabled();
|
||||
u32 next_event = GetTicksPerSecond()/1000;
|
||||
if (SConfig::GetInstance().m_Framelimit > 2)
|
||||
{
|
||||
|
|
|
@ -942,7 +942,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
|||
}
|
||||
else if (IsHotkey(event, HK_TOGGLE_THROTTLE))
|
||||
{
|
||||
Core::IsFramelimiterTempDisabled = true;
|
||||
Core::SetIsFramelimiterTempDisabled(true);
|
||||
}
|
||||
else if (IsHotkey(event, HK_INCREASE_FRAME_LIMIT))
|
||||
{
|
||||
|
@ -1049,7 +1049,7 @@ void CFrame::OnKeyUp(wxKeyEvent& event)
|
|||
{
|
||||
if (IsHotkey(event, HK_TOGGLE_THROTTLE))
|
||||
{
|
||||
Core::IsFramelimiterTempDisabled = false;
|
||||
Core::SetIsFramelimiterTempDisabled(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -276,5 +276,5 @@ void VideoConfig::Save(const std::string& ini_file)
|
|||
|
||||
bool VideoConfig::IsVSync()
|
||||
{
|
||||
return Core::IsFramelimiterTempDisabled ? false : bVSync;
|
||||
return bVSync && !Core::GetIsFramelimiterTempDisabled();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue