mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
Add basic controller input using the SDL2 GameController API
This commit is contained in:
parent
bf85b405af
commit
71dddc0020
4 changed files with 102 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -90,9 +90,11 @@ class ServiceManager {
|
|||
// Input function wrappers
|
||||
void pressKey(u32 key) { hid.pressKey(key); }
|
||||
void releaseKey(u32 key) { hid.releaseKey(key); }
|
||||
void setCirclepadX(u16 x) { hid.setCirclepadX(x); }
|
||||
void setCirclepadY(u16 y) { hid.setCirclepadY(y); }
|
||||
s16 getCirclepadX() { return hid.getCirclepadX(); }
|
||||
s16 getCirclepadY() { return hid.getCirclepadY(); }
|
||||
void setCirclepadX(s16 x) { hid.setCirclepadX(x); }
|
||||
void setCirclepadY(s16 y) { hid.setCirclepadY(y); }
|
||||
void updateInputs(u64 currentTimestamp) { hid.updateInputs(currentTimestamp); }
|
||||
void setTouchScreenPress(u16 x, u16 y) { hid.setTouchScreenPress(x, y); }
|
||||
void releaseTouchScreen() { hid.releaseTouchScreen(); }
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue