rsx/input: fix rsx replay

This commit is contained in:
Megamouse 2019-01-08 22:10:07 +01:00
parent eb4d612bb9
commit d9d5f45e9e
2 changed files with 5 additions and 11 deletions

View file

@ -22,11 +22,7 @@ namespace rsx
input_timer.Start(); input_timer.Start();
{ pad::SetIntercepted(true);
std::lock_guard lock(pad::g_pad_mutex);
const auto handler = pad::get_current_handler();
handler->SetIntercepted(true);
}
while (!exit) while (!exit)
{ {
@ -152,11 +148,7 @@ namespace rsx
manager->remove(uid); manager->remove(uid);
} }
{ pad::SetIntercepted(false);
std::lock_guard lock(pad::g_pad_mutex);
const auto handler = pad::get_current_handler();
handler->SetIntercepted(false);
}
if (on_close) if (on_close)
on_close(return_code); on_close(return_code);

View file

@ -483,7 +483,9 @@ bool Emulator::BootRsxCapture(const std::string& path)
GetCallbacks().on_ready(); GetCallbacks().on_ready();
auto gsrender = fxm::import<GSRender>(Emu.GetCallbacks().get_gs_render); auto gsrender = fxm::import<GSRender>(Emu.GetCallbacks().get_gs_render);
if (gsrender.get() == nullptr) auto padhandler = fxm::import<pad_thread>(Emu.GetCallbacks().get_pad_handler);
if (gsrender.get() == nullptr || padhandler.get() == nullptr)
return false; return false;
GetCallbacks().on_run(); GetCallbacks().on_run();