Add basic controller input using the SDL2 GameController API

This commit is contained in:
Nadia Holmquist Pedersen 2023-06-27 22:40:38 +02:00
parent bf85b405af
commit 71dddc0020
4 changed files with 102 additions and 6 deletions

View file

@ -87,6 +87,14 @@ public:
void pressKey(u32 mask) { newButtons |= mask; }
void releaseKey(u32 mask) { newButtons &= ~mask; }
s16 getCirclepadX() {
return circlePadX;
}
s16 getCirclepadY() {
return circlePadY;
}
void setCirclepadX(s16 x) {
circlePadX = x;
@ -129,4 +137,4 @@ public:
void releaseTouchScreen() {
touchScreenPressed = false;
}
};
};