Fix gamepad hotkey and game profile setting #510

Merged
goeiecool9999 merged 4 commits from fixpadoptionandbutton into main 2022-11-24 08:29:30 -03:00
goeiecool9999 commented 2022-11-18 20:49:16 -03:00 (Migrated from github.com)

This requires GTK headers so I added GTK as a dependency (no actual new dependency, wxwidgets already linked libgtk). Which also allows replacing all explicitly dynamically loaded calls with normal calls.
This also changes the way KeyboardController stops sending input after loss of focus. I changed the keyboard code that was already in gui_wrapper/CemuApp so it works as intended. Using the KILL_FOCUS event didn't work because pressing tab would immediately trigger that event and unpress all keys. The ACTIVATE_APP event doesn't have that issue. Now that the keyboard state tracking code updates to make all keys unpresed when focus is lost KeyboardController doesn't need to check if the windows is active anymore.

This requires GTK headers so I added GTK as a dependency (no actual new dependency, wxwidgets already linked libgtk). Which also allows replacing all explicitly dynamically loaded calls with normal calls. This also changes the way KeyboardController stops sending input after loss of focus. I changed the keyboard code that was already in gui_wrapper/CemuApp so it works as intended. Using the KILL_FOCUS event didn't work because pressing tab would immediately trigger that event and unpress all keys. The ACTIVATE_APP event doesn't have that issue. Now that the keyboard state tracking code updates to make all keys unpresed when focus is lost KeyboardController doesn't need to check if the windows is active anymore.
goeiecool9999 (Migrated from github.com) reviewed 2022-11-18 21:53:09 -03:00
goeiecool9999 (Migrated from github.com) commented 2022-11-18 21:53:09 -03:00

On linux pressing tab triggers this event, immediately resetting the tab key state. Makes the button unpressable. Perhaps some workaround could work where ignores the kill focus events when tab is held.

On linux pressing tab triggers this event, immediately resetting the tab key state. Makes the button unpressable. Perhaps some workaround could work where ignores the kill focus events when tab is held.
goeiecool9999 (Migrated from github.com) reviewed 2022-11-20 19:08:45 -03:00
goeiecool9999 (Migrated from github.com) commented 2022-11-20 19:08:45 -03:00

Fixed by checking if window is active in LatterRenderTarget. Perhaps it would be nicer to just set all keys to up when app is marked inactive in CemuApp. That way the Keyboard input manager also doesn't need to look that up.

Fixed by checking if window is active in LatterRenderTarget. Perhaps it would be nicer to just set all keys to up when app is marked inactive in CemuApp. That way the Keyboard input manager also doesn't need to look that up.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: cemu-project_Mirror/Cemu-2024-03-05#510
No description provided.