aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/qt_sdl/main.cpp
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2020-05-19 20:48:52 +0200
committerArisotura <thetotalworm@gmail.com>2020-05-19 20:48:52 +0200
commit34506ff2bb1be880cf260e0c1b09efede14ac0d8 (patch)
treeeed432ef9eaf56dbb5368b54f1d71863368ea87c /src/frontend/qt_sdl/main.cpp
parent920ff9778d3fbdd18576ab473cca6212ee387cb1 (diff)
actually complete the input config dialog
Diffstat (limited to 'src/frontend/qt_sdl/main.cpp')
-rw-r--r--src/frontend/qt_sdl/main.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp
index 7b50af4..8fe776e 100644
--- a/src/frontend/qt_sdl/main.cpp
+++ b/src/frontend/qt_sdl/main.cpp
@@ -27,10 +27,12 @@
#include <QFileDialog>
#include <QPaintEvent>
#include <QPainter>
+#include <QKeyEvent>
#include <SDL2/SDL.h>
#include "main.h"
+#include "Input.h"
#include "EmuSettingsDialog.h"
#include "InputConfigDialog.h"
@@ -136,12 +138,6 @@ void EmuThread::run()
}
/*Touching = false;
- KeyInputMask = 0xFFF;
- JoyInputMask = 0xFFF;
- KeyHotkeyMask = 0;
- JoyHotkeyMask = 0;
- HotkeyMask = 0;
- LastHotkeyMask = 0;
LidStatus = false;*/
u32 nframes = 0;
@@ -154,6 +150,7 @@ void EmuThread::run()
while (EmuRunning != 0)
{
+ Input::Process();
/*ProcessInput();
if (HotkeyPressed(HK_FastForwardToggle))
@@ -999,6 +996,9 @@ int main(int argc, char** argv)
Frontend::Init_ROM();
Frontend::Init_Audio(audioFreq);
+ Input::JoystickID = Config::JoystickID;
+ Input::OpenJoystick();
+
mainWindow = new MainWindow();
mainWindow->show();
@@ -1047,7 +1047,8 @@ int main(int argc, char** argv)
emuThread->wait();
delete emuThread;
- //if (Joystick) SDL_JoystickClose(Joystick);
+ Input::CloseJoystick();
+
if (audioDevice) SDL_CloseAudioDevice(audioDevice);
//if (MicDevice) SDL_CloseAudioDevice(MicDevice);