diff options
| author | wwylele <wwylele@gmail.com> | 2017-01-28 12:33:35 +0200 |
|---|---|---|
| committer | wwylele <wwylele@gmail.com> | 2017-03-01 23:30:57 +0200 |
| commit | e02c4b71955021ecca294015aaf331add8d5c554 (patch) | |
| tree | 9c3361df17c147453ba1e13c5a4f080b5e05c235 /src/core/frontend/emu_window.cpp | |
| parent | e7a602fe1690f6cafc4a40987340bc852effd2d3 (diff) | |
Input: remove unused stuff & clean up
1. removed zl, zr and c-stick from HID::PadState. They are handled by IR, not HID
2. removed button handling in EmuWindow
3. removed key_map
4. cleanup #include
Diffstat (limited to 'src/core/frontend/emu_window.cpp')
| -rw-r--r-- | src/core/frontend/emu_window.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/core/frontend/emu_window.cpp b/src/core/frontend/emu_window.cpp index a155b657d..73a44bfe7 100644 --- a/src/core/frontend/emu_window.cpp +++ b/src/core/frontend/emu_window.cpp @@ -7,33 +7,9 @@ #include "common/assert.h" #include "core/core.h" #include "core/frontend/emu_window.h" -#include "core/frontend/key_map.h" +#include "core/settings.h" #include "video_core/video_core.h" -void EmuWindow::ButtonPressed(Service::HID::PadState pad) { - pad_state.hex |= pad.hex; -} - -void EmuWindow::ButtonReleased(Service::HID::PadState pad) { - pad_state.hex &= ~pad.hex; -} - -void EmuWindow::CirclePadUpdated(float x, float y) { - constexpr int MAX_CIRCLEPAD_POS = 0x9C; // Max value for a circle pad position - - // Make sure the coordinates are in the unit circle, - // otherwise normalize it. - float r = x * x + y * y; - if (r > 1) { - r = std::sqrt(r); - x /= r; - y /= r; - } - - circle_pad_x = static_cast<s16>(x * MAX_CIRCLEPAD_POS); - circle_pad_y = static_cast<s16>(y * MAX_CIRCLEPAD_POS); -} - /** * Check if the given x/y coordinates are within the touchpad specified by the framebuffer layout * @param layout FramebufferLayout object describing the framebuffer size and screen positions |
