mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
Poll controllers on a separate thread on Windows.
This means controllers will sample more than the game fps, and will work whenever keyboards do.
This commit is contained in:
1 parent
b589d3b170
commit
b641ced7e0
5 files changed
+112
-20
No files matched your search
+4
-13
@@ -129,22 +129,13 @@ void UpdateScreenScale(int width, int height) {
|
||||
}
|
||||
|
||||
static inline void UpdateRunLoop() {
|
||||
NativeUpdate(input_state);
|
||||
|
||||
{
|
||||
{
|
||||
#ifdef _WIN32
|
||||
lock_guard guard(input_state.lock);
|
||||
input_state.pad_buttons = 0;
|
||||
input_state.pad_lstick_x = 0;
|
||||
input_state.pad_lstick_y = 0;
|
||||
input_state.pad_rstick_x = 0;
|
||||
input_state.pad_rstick_y = 0;
|
||||
host->PollControllers(input_state);
|
||||
UpdateInputState(&input_state);
|
||||
#endif
|
||||
}
|
||||
NativeUpdate(input_state);
|
||||
lock_guard guard(input_state.lock);
|
||||
EndInputState(&input_state);
|
||||
}
|
||||
|
||||
if (globalUIState != UISTATE_EXIT) {
|
||||
NativeRender();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user