summaryrefslogtreecommitdiffstats
path: root/src/citra/emu_window/emu_window_sdl2.cpp
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2016-05-12 12:09:36 +0200
committerwwylele <wwylele@gmail.com>2016-05-15 12:24:22 +0200
commit03631f9b8fe75cf1c3a70a3094aeddcebffa4cf9 (patch)
tree95edc62b3b8520a533e534bf4991159875fef3e5 /src/citra/emu_window/emu_window_sdl2.cpp
parentAudioCore: Implement time stretcher (#1737) (diff)
downloadyuzu-03631f9b8fe75cf1c3a70a3094aeddcebffa4cf9.tar
yuzu-03631f9b8fe75cf1c3a70a3094aeddcebffa4cf9.tar.gz
yuzu-03631f9b8fe75cf1c3a70a3094aeddcebffa4cf9.tar.bz2
yuzu-03631f9b8fe75cf1c3a70a3094aeddcebffa4cf9.tar.lz
yuzu-03631f9b8fe75cf1c3a70a3094aeddcebffa4cf9.tar.xz
yuzu-03631f9b8fe75cf1c3a70a3094aeddcebffa4cf9.tar.zst
yuzu-03631f9b8fe75cf1c3a70a3094aeddcebffa4cf9.zip
Diffstat (limited to '')
-rw-r--r--src/citra/emu_window/emu_window_sdl2.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp
index 12cdd9d95..591f68aa4 100644
--- a/src/citra/emu_window/emu_window_sdl2.cpp
+++ b/src/citra/emu_window/emu_window_sdl2.cpp
@@ -40,9 +40,9 @@ void EmuWindow_SDL2::OnMouseButton(u32 button, u8 state, s32 x, s32 y) {
void EmuWindow_SDL2::OnKeyEvent(int key, u8 state) {
if (state == SDL_PRESSED) {
- KeyPressed({ key, keyboard_id });
+ KeyMap::PressKey(*this, { key, keyboard_id });
} else if (state == SDL_RELEASED) {
- KeyReleased({ key, keyboard_id });
+ KeyMap::ReleaseKey(*this, { key, keyboard_id });
}
}
@@ -168,8 +168,9 @@ void EmuWindow_SDL2::DoneCurrent() {
}
void EmuWindow_SDL2::ReloadSetKeymaps() {
+ KeyMap::ClearKeyMapping(keyboard_id);
for (int i = 0; i < Settings::NativeInput::NUM_INPUTS; ++i) {
- KeyMap::SetKeyMapping({ Settings::values.input_mappings[Settings::NativeInput::All[i]], keyboard_id }, Service::HID::pad_mapping[i]);
+ KeyMap::SetKeyMapping({ Settings::values.input_mappings[Settings::NativeInput::All[i]], keyboard_id }, KeyMap::mapping_targets[i]);
}
}