diff options
| author | Matthew Parlane <parlane@gmail.com> | 2015-06-08 12:09:52 +1000 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2015-06-08 12:09:52 +1000 |
| commit | bfeb79620d43b7785c98f84f5d86615887ca90a2 (patch) | |
| tree | 48fba2b89f16dc36bf44de08281862a6fa635ba8 /Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp | |
| parent | 7b3932e5b5dadb0055cac2d4a62be8e9032cbf0d (diff) | |
| parent | 9e1aab663f2afdd61bda773764cc3c8f652659aa (diff) | |
Merge pull request #2565 from dolphin-emu/revert-2530-sdl_quit
Revert "SDL: handle SDL_QUIT event"
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp index 6e60cf0f7a..6cdfa470cd 100644 --- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp +++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp @@ -7,7 +7,6 @@ #include <sstream> #include "Common/StringUtil.h" -#include "Core/Host.h" #include "InputCommon/ControllerInterface/SDL/SDL.h" #ifdef _WIN32 @@ -68,19 +67,6 @@ void Init( std::vector<Core::Device*>& devices ) } } -void UpdateInput() -{ - // Using SDL_INIT_JOYSTICK implies SDL_INIT_EVENT which installs a signal handler for SIGINT and SIGTERM. - // In the future, we will be able to prevent this from happening: - // SDL_SetHint(SDL_HINT_NO_SIGNAL_HANDLERS, "1"); - // but this was added after SDL 2.0.3 and is scheduled to be included in 2.0.4. - // Until then, handle SDL_QUIT events here and tell Dolphin to exit. - if (SDL_QuitRequested()) - Host_Message(WM_USER_QUIT); - - SDL_JoystickUpdate(); -} - Joystick::Joystick(SDL_Joystick* const joystick, const int sdl_index, const unsigned int index) : m_joystick(joystick) , m_sdl_index(sdl_index) @@ -297,6 +283,12 @@ void Joystick::LeftRightEffect::SetSDLHapticEffect(ControlState state) } #endif +void Joystick::UpdateInput() +{ + // each joystick is doin this, o well + SDL_JoystickUpdate(); +} + std::string Joystick::GetName() const { return StripSpaces(GetJoystickName(m_sdl_index)); |
