mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Remove Frameskip
This commit is contained in:
@ -56,7 +56,6 @@ public:
|
||||
// alone on restore (false)
|
||||
bool bSetEmulationSpeed;
|
||||
bool bSetVolume;
|
||||
bool bSetFrameSkip;
|
||||
std::array<bool, MAX_BBMOTES> bSetWiimoteSource;
|
||||
std::array<bool, MAX_SI_CHANNELS> bSetPads;
|
||||
std::array<bool, MAX_EXI_CHANNELS> bSetEXIDevice;
|
||||
@ -80,7 +79,6 @@ private:
|
||||
int iSelectedLanguage;
|
||||
int iCPUCore;
|
||||
int Volume;
|
||||
unsigned int frameSkip;
|
||||
float m_EmulationSpeed;
|
||||
std::string strBackend;
|
||||
std::string sBackend;
|
||||
@ -112,7 +110,6 @@ void ConfigCache::SaveConfig(const SConfig& config)
|
||||
iCPUCore = config.iCPUCore;
|
||||
Volume = config.m_Volume;
|
||||
m_EmulationSpeed = config.m_EmulationSpeed;
|
||||
frameSkip = config.m_FrameSkip;
|
||||
strBackend = config.m_strVideoBackend;
|
||||
sBackend = config.sBackend;
|
||||
m_strGPUDeterminismMode = config.m_strGPUDeterminismMode;
|
||||
@ -123,7 +120,6 @@ void ConfigCache::SaveConfig(const SConfig& config)
|
||||
|
||||
bSetEmulationSpeed = false;
|
||||
bSetVolume = false;
|
||||
bSetFrameSkip = false;
|
||||
bSetWiimoteSource.fill(false);
|
||||
bSetPads.fill(false);
|
||||
bSetEXIDevice.fill(false);
|
||||
@ -182,12 +178,6 @@ void ConfigCache::RestoreConfig(SConfig* config)
|
||||
if (bSetEmulationSpeed)
|
||||
config->m_EmulationSpeed = m_EmulationSpeed;
|
||||
|
||||
if (bSetFrameSkip)
|
||||
{
|
||||
config->m_FrameSkip = frameSkip;
|
||||
Movie::SetFrameSkipping(frameSkip);
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < MAX_EXI_CHANNELS; ++i)
|
||||
{
|
||||
if (bSetEXIDevice[i])
|
||||
@ -264,11 +254,6 @@ bool BootCore(const std::string& _rFilename)
|
||||
if (core_section->Get("EmulationSpeed", &SConfig::GetInstance().m_EmulationSpeed,
|
||||
SConfig::GetInstance().m_EmulationSpeed))
|
||||
config_cache.bSetEmulationSpeed = true;
|
||||
if (core_section->Get("FrameSkip", &SConfig::GetInstance().m_FrameSkip))
|
||||
{
|
||||
config_cache.bSetFrameSkip = true;
|
||||
Movie::SetFrameSkipping(SConfig::GetInstance().m_FrameSkip);
|
||||
}
|
||||
|
||||
if (dsp_section->Get("Volume", &SConfig::GetInstance().m_Volume,
|
||||
SConfig::GetInstance().m_Volume))
|
||||
|
@ -44,8 +44,6 @@
|
||||
// The chunk to allocate movie data in multiples of.
|
||||
#define DTM_BASE_LENGTH (1024)
|
||||
|
||||
static std::mutex cs_frameSkip;
|
||||
|
||||
namespace Movie
|
||||
{
|
||||
static bool s_bFrameStep = false;
|
||||
@ -53,8 +51,6 @@ static bool s_bReadOnly = true;
|
||||
static u32 s_rerecords = 0;
|
||||
static PlayMode s_playMode = MODE_NONE;
|
||||
|
||||
static u32 s_framesToSkip = 0, s_frameSkipCounter = 0;
|
||||
|
||||
static u8 s_numPads = 0;
|
||||
static ControllerState s_padState;
|
||||
static DTMHeader tmpHeader;
|
||||
@ -211,9 +207,6 @@ void FrameUpdate()
|
||||
CPU::Break();
|
||||
}
|
||||
|
||||
if (s_framesToSkip)
|
||||
FrameSkipping();
|
||||
|
||||
s_bPolled = false;
|
||||
}
|
||||
|
||||
@ -247,7 +240,6 @@ void Init()
|
||||
s_tickCountAtLastInput = 0;
|
||||
}
|
||||
|
||||
s_frameSkipCounter = s_framesToSkip;
|
||||
memset(&s_padState, 0, sizeof(s_padState));
|
||||
if (!tmpHeader.bFromSaveState || !IsPlayingInput())
|
||||
Core::SetStateFileName("");
|
||||
@ -278,20 +270,6 @@ void InputUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: Host Thread
|
||||
void SetFrameSkipping(unsigned int framesToSkip)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(cs_frameSkip);
|
||||
|
||||
s_framesToSkip = framesToSkip;
|
||||
s_frameSkipCounter = 0;
|
||||
|
||||
// Don't forget to re-enable rendering in case it wasn't...
|
||||
// as this won't be changed anymore when frameskip is turned off
|
||||
if (framesToSkip == 0)
|
||||
Fifo::SetRendering(true);
|
||||
}
|
||||
|
||||
// NOTE: CPU Thread
|
||||
void SetPolledDevice()
|
||||
{
|
||||
@ -324,22 +302,6 @@ void SetReadOnly(bool bEnabled)
|
||||
s_bReadOnly = bEnabled;
|
||||
}
|
||||
|
||||
// NOTE: GPU Thread
|
||||
void FrameSkipping()
|
||||
{
|
||||
// Frameskipping will desync movie playback
|
||||
if (!Core::g_want_determinism)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(cs_frameSkip);
|
||||
|
||||
s_frameSkipCounter++;
|
||||
if (s_frameSkipCounter > s_framesToSkip || Core::ShouldSkipFrame(s_frameSkipCounter) == false)
|
||||
s_frameSkipCounter = 0;
|
||||
|
||||
Fifo::SetRendering(!s_frameSkipCounter);
|
||||
}
|
||||
}
|
||||
|
||||
bool IsRecordingInput()
|
||||
{
|
||||
return (s_playMode == MODE_RECORDING);
|
||||
|
@ -158,9 +158,6 @@ void ChangeWiiPads(bool instantly = false);
|
||||
void DoFrameStep();
|
||||
void SetReadOnly(bool bEnabled);
|
||||
|
||||
void SetFrameSkipping(unsigned int framesToSkip);
|
||||
void FrameSkipping();
|
||||
|
||||
bool BeginRecordingInput(int controllers);
|
||||
void RecordInput(GCPadStatus* PadStatus, int controllerID);
|
||||
void RecordWiimote(int wiimote, u8* data, u8 size);
|
||||
|
@ -71,7 +71,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
|
||||
static std::thread g_save_thread;
|
||||
|
||||
// Don't forget to increase this after doing changes on the savestate system
|
||||
static const u32 STATE_VERSION = 62; // Last changed in PR 4195
|
||||
static const u32 STATE_VERSION = 63; // Last changed in PR 4322
|
||||
|
||||
// Maps savestate versions to Dolphin versions.
|
||||
// Versions after 42 don't need to be added to this list,
|
||||
|
Reference in New Issue
Block a user