mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 17:49:29 +01:00
Windows input optimizations
Fixes a bug where the thread wouldn't sleep when it should in some configurations. Also increases the time between polls for new controllers.
This commit is contained in:
1 parent
593e0fd8d9
commit
82069c3503
5 files changed
+7
-8
No files matched your search
@@ -42,12 +42,12 @@ void InputManager::InputThread() {
|
||||
|
||||
// NOTE: The keyboard and mouse buttons are handled via raw input, not here.
|
||||
// This is mainly for controllers which need to be polled, instead of generating events.
|
||||
bool noSleep = false;
|
||||
while (runThread_.load(std::memory_order_relaxed)) {
|
||||
bool noSleep = false;
|
||||
if (focused_.load(std::memory_order_relaxed) || !g_Config.bGamepadOnlyFocused) {
|
||||
System_Notify(SystemNotification::POLL_CONTROLLERS);
|
||||
for (const auto &device : devices_) {
|
||||
int state = device->UpdateState();
|
||||
const int state = device->UpdateState();
|
||||
if (state == InputDevice::UPDATESTATE_SKIP_PAD)
|
||||
break;
|
||||
if (state == InputDevice::UPDATESTATE_NO_SLEEP) {
|
||||
|
||||
Reference in new issue
Block a user