Input changes

This commit is contained in:
GaryOderNichts 2020-12-03 01:00:38 +01:00 committed by Maschell
parent 0c2be05b1b
commit 6f42e52d20
2 changed files with 8 additions and 2 deletions

View File

@ -11,6 +11,12 @@ public:
//!Destructor
virtual ~Input() = default;
void combine(const Input& b) {
data.buttons_d |= b.data.buttons_d;
data.buttons_h |= b.data.buttons_h;
data.buttons_r |= b.data.buttons_r;
}
enum eButtons {
BUTTON_NONE = 0x0000,
VPAD_TOUCH = 0x80000000,

View File

@ -47,11 +47,11 @@ int main_loop() {
DEBUG_FUNCTION_LINE("Entering main loop");
while (WHBProcIsRunning()) {
vpadInput.update(1280, 720);
state.update(&vpadInput);
for (int i = 0; i < 4; i++) {
wpadInputs[i].update(1280, 720);
state.update(&wpadInputs[i]);
vpadInput.combine(wpadInputs[i]);
}
state.update(&vpadInput);
state.render();
}