summaryrefslogtreecommitdiffstats
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
authorJames Rowe <jroweboy@gmail.com>2018-09-20 08:28:05 +0200
committerfearlessTobi <thm.frey@gmail.com>2019-03-02 19:09:34 +0100
commit09ac66388c01187ed6a402efcad76984c8af9a2e (patch)
treebeed8a86e7b7e02e0c5526723bbf812920341d12 /src/yuzu_cmd
parentInput: Copy current SDL.h/cpp files to impl (diff)
downloadyuzu-09ac66388c01187ed6a402efcad76984c8af9a2e.tar
yuzu-09ac66388c01187ed6a402efcad76984c8af9a2e.tar.gz
yuzu-09ac66388c01187ed6a402efcad76984c8af9a2e.tar.bz2
yuzu-09ac66388c01187ed6a402efcad76984c8af9a2e.tar.lz
yuzu-09ac66388c01187ed6a402efcad76984c8af9a2e.tar.xz
yuzu-09ac66388c01187ed6a402efcad76984c8af9a2e.tar.zst
yuzu-09ac66388c01187ed6a402efcad76984c8af9a2e.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;
}
}