mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-10 03:44:26 +00:00
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())
|
if (*PowerPC::GetStatePtr() != PowerPC::CPU_RUNNING || soundStream->IsMuted())
|
||||||
break;
|
break;
|
||||||
// Shortcut key for Throttle Skipping
|
// Shortcut key for Throttle Skipping
|
||||||
if (Core::IsFramelimiterTempDisabled)
|
if (Core::GetIsFramelimiterTempDisabled())
|
||||||
break;
|
break;
|
||||||
SLEEP(1);
|
SLEEP(1);
|
||||||
soundStream->Update();
|
soundStream->Update();
|
||||||
|
@ -90,7 +90,17 @@ static bool g_requestRefreshInfo = false;
|
|||||||
static int g_pauseAndLockDepth = 0;
|
static int g_pauseAndLockDepth = 0;
|
||||||
|
|
||||||
SCoreStartupParameter g_CoreStartupParameter;
|
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; }
|
std::string GetStateFileName() { return g_stateFileName; }
|
||||||
void SetStateFileName(std::string val) { g_stateFileName = val; }
|
void SetStateFileName(std::string val) { g_stateFileName = val; }
|
||||||
|
@ -24,7 +24,8 @@ namespace Core
|
|||||||
// TODO: kill, use SConfig instead
|
// TODO: kill, use SConfig instead
|
||||||
extern SCoreStartupParameter g_CoreStartupParameter;
|
extern SCoreStartupParameter g_CoreStartupParameter;
|
||||||
|
|
||||||
extern bool IsFramelimiterTempDisabled;
|
bool GetIsFramelimiterTempDisabled();
|
||||||
|
void SetIsFramelimiterTempDisabled(bool disable);
|
||||||
|
|
||||||
void Callback_VideoCopiedToXFB(bool video_update);
|
void Callback_VideoCopiedToXFB(bool video_update);
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ void ThrottleCallback(u64 last_time, int cyclesLate)
|
|||||||
|
|
||||||
int diff = (u32)last_time - time;
|
int diff = (u32)last_time - time;
|
||||||
const SConfig& config = SConfig::GetInstance();
|
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;
|
u32 next_event = GetTicksPerSecond()/1000;
|
||||||
if (SConfig::GetInstance().m_Framelimit > 2)
|
if (SConfig::GetInstance().m_Framelimit > 2)
|
||||||
{
|
{
|
||||||
|
@ -942,7 +942,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
|||||||
}
|
}
|
||||||
else if (IsHotkey(event, HK_TOGGLE_THROTTLE))
|
else if (IsHotkey(event, HK_TOGGLE_THROTTLE))
|
||||||
{
|
{
|
||||||
Core::IsFramelimiterTempDisabled = true;
|
Core::SetIsFramelimiterTempDisabled(true);
|
||||||
}
|
}
|
||||||
else if (IsHotkey(event, HK_INCREASE_FRAME_LIMIT))
|
else if (IsHotkey(event, HK_INCREASE_FRAME_LIMIT))
|
||||||
{
|
{
|
||||||
@ -1049,7 +1049,7 @@ void CFrame::OnKeyUp(wxKeyEvent& event)
|
|||||||
{
|
{
|
||||||
if (IsHotkey(event, HK_TOGGLE_THROTTLE))
|
if (IsHotkey(event, HK_TOGGLE_THROTTLE))
|
||||||
{
|
{
|
||||||
Core::IsFramelimiterTempDisabled = false;
|
Core::SetIsFramelimiterTempDisabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -276,5 +276,5 @@ void VideoConfig::Save(const std::string& ini_file)
|
|||||||
|
|
||||||
bool VideoConfig::IsVSync()
|
bool VideoConfig::IsVSync()
|
||||||
{
|
{
|
||||||
return Core::IsFramelimiterTempDisabled ? false : bVSync;
|
return bVSync && !Core::GetIsFramelimiterTempDisabled();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user