Rewind: Fixed rewind no longer processing inputs after a power cycle
This commit is contained in:
parent
8fd28e2e8f
commit
32f5ece894
3 changed files with 11 additions and 2 deletions
|
@ -406,6 +406,8 @@ bool Console::Initialize(VirtualFile &romFile, VirtualFile &patchFile, bool forP
|
|||
if(!forPowerCycle) {
|
||||
_rewindManager.reset(new RewindManager(shared_from_this()));
|
||||
_notificationManager->RegisterNotificationListener(_rewindManager);
|
||||
} else {
|
||||
_rewindManager->Initialize();
|
||||
}
|
||||
|
||||
//Poll controller input after creating rewind manager, to make sure it catches the first frame's input
|
||||
|
|
|
@ -16,8 +16,7 @@ RewindManager::RewindManager(shared_ptr<Console> console)
|
|||
_hasHistory = false;
|
||||
AddHistoryBlock();
|
||||
|
||||
_console->GetControlManager()->RegisterInputProvider(this);
|
||||
_console->GetControlManager()->RegisterInputRecorder(this);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
RewindManager::~RewindManager()
|
||||
|
@ -26,6 +25,12 @@ RewindManager::~RewindManager()
|
|||
_console->GetControlManager()->UnregisterInputRecorder(this);
|
||||
}
|
||||
|
||||
void RewindManager::Initialize()
|
||||
{
|
||||
_console->GetControlManager()->RegisterInputProvider(this);
|
||||
_console->GetControlManager()->RegisterInputRecorder(this);
|
||||
}
|
||||
|
||||
void RewindManager::ClearBuffer()
|
||||
{
|
||||
_hasHistory = false;
|
||||
|
|
|
@ -56,6 +56,8 @@ public:
|
|||
RewindManager(shared_ptr<Console> console);
|
||||
virtual ~RewindManager();
|
||||
|
||||
void Initialize();
|
||||
|
||||
void ProcessNotification(ConsoleNotificationType type, void* parameter) override;
|
||||
void ProcessEndOfFrame();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue