HID/IR: Cleanup and minor fixes (#768)
Some checks are pending
Android Build / x64 (release) (push) Waiting to run
Android Build / arm64 (release) (push) Waiting to run
HTTP Server Build / build (push) Waiting to run
Hydra Core Build / Windows (push) Waiting to run
Hydra Core Build / MacOS (push) Waiting to run
Hydra Core Build / Linux (push) Waiting to run
Hydra Core Build / Android-x64 (push) Waiting to run
Hydra Core Build / ARM-Libretro (push) Waiting to run
Linux AppImage Build / build (push) Waiting to run
Linux Build / build (push) Waiting to run
MacOS Build / MacOS-arm64 (push) Waiting to run
MacOS Build / MacOS-x86_64 (push) Waiting to run
MacOS Build / MacOS-Universal (push) Blocked by required conditions
Qt Build / Windows (push) Waiting to run
Qt Build / MacOS-arm64 (push) Waiting to run
Qt Build / MacOS-x86_64 (push) Waiting to run
Qt Build / MacOS-Universal (push) Blocked by required conditions
Qt Build / Linux (push) Waiting to run
Windows Build / build (push) Waiting to run
iOS Simulator Build / build (push) Waiting to run

This commit is contained in:
wheremyfoodat 2025-07-03 03:47:06 +03:00 committed by GitHub
parent 2e148ae997
commit 620e3699ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 10 deletions

View file

@ -124,9 +124,9 @@ class HIDService {
// Then, set them according to the new value of x
newButtons &= ~(HID::Keys::CirclePadLeft | HID::Keys::CirclePadRight);
if (x >= 41) // Pressing right
newButtons |= 1 << 28;
newButtons |= HID::Keys::CirclePadRight;
else if (x <= -41) // Pressing left
newButtons |= 1 << 29;
newButtons |= HID::Keys::CirclePadLeft;
}
void setCirclepadY(s16 y) {
@ -136,9 +136,9 @@ class HIDService {
// Then, set them according to the new value of y
newButtons &= ~(HID::Keys::CirclePadUp | HID::Keys::CirclePadDown);
if (y >= 41) // Pressing up
newButtons |= 1 << 30;
newButtons |= HID::Keys::CirclePadUp;
else if (y <= -41) // Pressing down
newButtons |= 1 << 31;
newButtons |= HID::Keys::CirclePadDown;
}
void setCStickX(s16 x) { cStickX = x; }