diff --git a/base/PCMain.cpp b/base/PCMain.cpp index 808c3fcb2f..35a25d1e0b 100644 --- a/base/PCMain.cpp +++ b/base/PCMain.cpp @@ -91,14 +91,14 @@ void LaunchEmail(const char *email_address) const int buttonMappings[14] = { - SDLK_x, //A - SDLK_s, //B - SDLK_z, //X - SDLK_a, //Y + SDLK_z, //A + SDLK_x, //B + SDLK_a, //X + SDLK_s, //Y SDLK_w, //LBUMPER SDLK_q, //RBUMPER - SDLK_1, //START - SDLK_2, //SELECT + SDLK_SPACE, //START + SDLK_v, //SELECT SDLK_UP, //UP SDLK_DOWN, //DOWN SDLK_LEFT, //LEFT diff --git a/ui/virtual_input.cpp b/ui/virtual_input.cpp index f47386400c..7e6d756789 100644 --- a/ui/virtual_input.cpp +++ b/ui/virtual_input.cpp @@ -16,6 +16,7 @@ TouchButton::TouchButton(const Atlas *atlas, int imageIndex, int overlayImageInd void TouchButton::update(InputState &input_state) { + bool oldIsDown = isDown_; isDown_ = false; for (int i = 0; i < MAX_POINTERS; i++) { if (input_state.pointer_down[i] && isInside(input_state.pointer_x[i], input_state.pointer_y[i])) @@ -24,7 +25,7 @@ void TouchButton::update(InputState &input_state) if (isDown_) { input_state.pad_buttons |= button_; - } else { + } else if (oldIsDown && !isDown_) { input_state.pad_buttons &= ~button_; } }