mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-23 09:09:45 +00:00
Remove built-in runahead stuff - we already have this in retroarch
This commit is contained in:
parent
9561ead950
commit
8ddedbb5b8
@ -628,16 +628,6 @@ void Console::RunSlaveCpu()
|
||||
}
|
||||
}
|
||||
|
||||
void Console::RunFrame()
|
||||
{
|
||||
uint32_t frameCount = _ppu->GetFrameCount();
|
||||
while(_ppu->GetFrameCount() == frameCount) {
|
||||
_cpu->Exec();
|
||||
if(_slave)
|
||||
RunSlaveCpu();
|
||||
}
|
||||
}
|
||||
|
||||
void Console::Run()
|
||||
{
|
||||
Timer clockTimer;
|
||||
@ -656,12 +646,12 @@ void Console::Run()
|
||||
|
||||
try {
|
||||
while(true) {
|
||||
stringstream runAheadState;
|
||||
bool useRunAhead = _settings->GetRunAheadFrames() > 0 && !IsNsf() && !_rewindManager->IsRewinding() && _settings->GetEmulationSpeed() > 0 && _settings->GetEmulationSpeed() <= 100;
|
||||
if(useRunAhead) {
|
||||
RunFrameWithRunAhead(runAheadState);
|
||||
} else {
|
||||
RunFrame();
|
||||
uint32_t frameCount = _ppu->GetFrameCount();
|
||||
while(_ppu->GetFrameCount() == frameCount)
|
||||
{
|
||||
_cpu->Exec();
|
||||
if(_slave)
|
||||
RunSlaveCpu();
|
||||
}
|
||||
|
||||
if(_historyViewer) {
|
||||
@ -702,12 +692,6 @@ void Console::Run()
|
||||
//Sleep until we're ready to start the next frame
|
||||
clockTimer.WaitUntil(targetTime);
|
||||
|
||||
if(useRunAhead) {
|
||||
_settings->SetRunAheadFrameFlag(true);
|
||||
LoadState(runAheadState);
|
||||
_settings->SetRunAheadFrameFlag(false);
|
||||
}
|
||||
|
||||
if(_pauseCounter > 0) {
|
||||
//Need to temporarely pause the emu (to save/load a state, etc.)
|
||||
_runLock.Release();
|
||||
@ -788,26 +772,6 @@ void Console::Run()
|
||||
_notificationManager->SendNotification(ConsoleNotificationType::EmulationStopped);
|
||||
}
|
||||
|
||||
void Console::RunFrameWithRunAhead(std::stringstream& runAheadState)
|
||||
{
|
||||
uint32_t runAheadFrames = _settings->GetRunAheadFrames();
|
||||
_settings->SetRunAheadFrameFlag(true);
|
||||
//Run a single frame and save the state (no audio/video)
|
||||
RunFrame();
|
||||
SaveState(runAheadState);
|
||||
while(runAheadFrames > 1) {
|
||||
//Run extra frames if the requested run ahead frame count is higher than 1
|
||||
runAheadFrames--;
|
||||
RunFrame();
|
||||
}
|
||||
_apu->EndFrame();
|
||||
_settings->SetRunAheadFrameFlag(false);
|
||||
|
||||
//Run one frame normally (with audio/video output)
|
||||
RunFrame();
|
||||
_apu->EndFrame();
|
||||
}
|
||||
|
||||
void Console::ResetRunTimers()
|
||||
{
|
||||
_resetRunTimers = true;
|
||||
|
@ -94,8 +94,6 @@ private:
|
||||
|
||||
bool _initialized = false;
|
||||
|
||||
void RunFrameWithRunAhead(std::stringstream& runAheadState);
|
||||
|
||||
void LoadHdPack(VirtualFile &romFile, VirtualFile &patchFile);
|
||||
|
||||
void UpdateNesModel(bool sendNotification);
|
||||
@ -151,7 +149,6 @@ public:
|
||||
|
||||
void RunSingleFrame();
|
||||
void RunSlaveCpu();
|
||||
void RunFrame();
|
||||
bool UpdateHdPackMode();
|
||||
|
||||
shared_ptr<SystemActionManager> GetSystemActionManager();
|
||||
|
Loading…
Reference in New Issue
Block a user