mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-12-01 05:44:38 +01:00
3f4a7f8f58
Changes the interface as well to remove any unique methods that frontends needed to call such as StartJoystickEventHandler by conditionally starting the polling thread only if the frontend hasn't started it already. Additionally, moves all global state into a single SDLState class in order to guarantee that the destructors are called in the proper order
20 lines
437 B
C++
20 lines
437 B
C++
// Copyright 2018 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#include "input_common/sdl/sdl.h"
|
|
#ifdef HAVE_SDL2
|
|
#include "input_common/sdl/sdl_impl.h"
|
|
#endif
|
|
|
|
namespace InputCommon::SDL {
|
|
|
|
std::unique_ptr<State> Init() {
|
|
#ifdef HAVE_SDL2
|
|
return std::make_unique<SDLState>();
|
|
#else
|
|
return std::make_unique<NullState>();
|
|
#endif
|
|
}
|
|
} // namespace InputCommon::SDL
|