diff options
Diffstat (limited to 'src/frontend/qt_sdl/main.cpp')
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index a68f933..962fdaf 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -135,6 +135,7 @@ void EmuThread::run() GPU3D::InitRenderer(false); } + Input::Init(); /*Touching = false; LidStatus = false;*/ @@ -184,7 +185,7 @@ void EmuThread::run() EmuStatus = 1; // process input and hotkeys - NDS::SetKeyMask(0xFFF); + NDS::SetKeyMask(Input::InputMask); /*NDS::SetKeyMask(KeyInputMask & JoyInputMask); if (HotkeyPressed(HK_Lid)) @@ -565,7 +566,16 @@ MainWindow::~MainWindow() void MainWindow::keyPressEvent(QKeyEvent* event) { - printf("key press. %d %d %08X %08X\n", event->key(), event->nativeScanCode(), event->modifiers(), event->nativeModifiers()); + if (event->isAutoRepeat()) return; + + Input::KeyPress(event); +} + +void MainWindow::keyReleaseEvent(QKeyEvent* event) +{ + if (event->isAutoRepeat()) return; + + Input::KeyRelease(event); } |