summaryrefslogtreecommitdiffstats
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-03-13 16:46:57 +0100
committerGitHub <noreply@github.com>2019-03-13 16:46:57 +0100
commit0a923b4ab3838e3560bcebf31e5bf6578a24dbcb (patch)
tree35c472ea24733da9e12dc4aaa83db5b7ba7bc28a /src/yuzu_cmd
parentMerge pull request #2166 from lioncash/vi-init-service (diff)
parentfixup! Joystick: Allow for background events; Add deadzone to SDLAnalog (diff)
downloadyuzu-0a923b4ab3838e3560bcebf31e5bf6578a24dbcb.tar
yuzu-0a923b4ab3838e3560bcebf31e5bf6578a24dbcb.tar.gz
yuzu-0a923b4ab3838e3560bcebf31e5bf6578a24dbcb.tar.bz2
yuzu-0a923b4ab3838e3560bcebf31e5bf6578a24dbcb.tar.lz
yuzu-0a923b4ab3838e3560bcebf31e5bf6578a24dbcb.tar.xz
yuzu-0a923b4ab3838e3560bcebf31e5bf6578a24dbcb.tar.zst
yuzu-0a923b4ab3838e3560bcebf31e5bf6578a24dbcb.zip
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
index 7df8eff53..de7a26e14 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
@@ -135,16 +135,16 @@ bool EmuWindow_SDL2::SupportsRequiredGLExtensions() {
}
EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
- InputCommon::Init();
-
- SDL_SetMainReady();
-
// Initialize the window
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {
LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting...");
exit(1);
}
+ InputCommon::Init();
+
+ SDL_SetMainReady();
+
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
@@ -201,11 +201,9 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
}
EmuWindow_SDL2::~EmuWindow_SDL2() {
- InputCommon::SDL::CloseSDLJoysticks();
+ InputCommon::Shutdown();
SDL_GL_DeleteContext(gl_context);
SDL_Quit();
-
- InputCommon::Shutdown();
}
void EmuWindow_SDL2::SwapBuffers() {
@@ -262,7 +260,6 @@ void EmuWindow_SDL2::PollEvents() {
is_open = false;
break;
default:
- InputCommon::SDL::HandleGameControllerEvent(event);
break;
}
}