diff options
Diffstat (limited to 'src/citra/emu_window/emu_window_sdl2.cpp')
-rw-r--r-- | src/citra/emu_window/emu_window_sdl2.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp index 47aadd60c..25643715a 100644 --- a/src/citra/emu_window/emu_window_sdl2.cpp +++ b/src/citra/emu_window/emu_window_sdl2.cpp @@ -16,10 +16,12 @@ #include "core/settings.h" #include "input_common/keyboard.h" #include "input_common/main.h" +#include "input_common/motion_emu.h" +#include "network/network.h" void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) { TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0)); - motion_emu->Tilt(x, y); + InputCommon::GetMotionEmu()->Tilt(x, y); } void EmuWindow_SDL2::OnMouseButton(u32 button, u8 state, s32 x, s32 y) { @@ -31,9 +33,9 @@ void EmuWindow_SDL2::OnMouseButton(u32 button, u8 state, s32 x, s32 y) { } } else if (button == SDL_BUTTON_RIGHT) { if (state == SDL_PRESSED) { - motion_emu->BeginTilt(x, y); + InputCommon::GetMotionEmu()->BeginTilt(x, y); } else { - motion_emu->EndTilt(); + InputCommon::GetMotionEmu()->EndTilt(); } } } @@ -58,8 +60,7 @@ void EmuWindow_SDL2::OnResize() { EmuWindow_SDL2::EmuWindow_SDL2() { InputCommon::Init(); - - motion_emu = std::make_unique<Motion::MotionEmu>(*this); + Network::Init(); SDL_SetMainReady(); @@ -115,7 +116,8 @@ EmuWindow_SDL2::EmuWindow_SDL2() { EmuWindow_SDL2::~EmuWindow_SDL2() { SDL_GL_DeleteContext(gl_context); SDL_Quit(); - motion_emu = nullptr; + + Network::Shutdown(); InputCommon::Shutdown(); } |