Overlays: fix input loop when no controllers are detected

This commit is contained in:
Megamouse
2018-12-28 14:05:57 +01:00
parent a4f67ccb87
commit 8ad14c4ada
+2 -6
View File
@@ -98,20 +98,16 @@ namespace rsx
if (Emu.IsStopped()) if (Emu.IsStopped())
return selection_code::canceled; return selection_code::canceled;
std::this_thread::sleep_for(1ms);
std::lock_guard lock(pad::g_pad_mutex); std::lock_guard lock(pad::g_pad_mutex);
const auto handler = pad::get_current_handler(); const auto handler = pad::get_current_handler();
if (!handler)
{
LOG_ERROR(RSX, "Pad handler expected but none initialized!");
return selection_code::error;
}
const PadInfo& rinfo = handler->GetInfo(); const PadInfo& rinfo = handler->GetInfo();
if (Emu.IsPaused() || !rinfo.now_connect) if (Emu.IsPaused() || !rinfo.now_connect)
{ {
std::this_thread::sleep_for(10ms);
continue; continue;
} }