mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-16 09:48:05 -05:00
input_common: Eliminate most global state
Abstracts most of the input mechanisms under an InputSubsystem class that is managed by the frontends, eliminating any static constructors and destructors. This gets rid of global accessor functions and also allows the frontends to have a more fine-grained control over the lifecycle of the input subsystem. This also makes it explicit which interfaces rely on the input subsystem instead of making it opaque in the interface functions. All that remains to migrate over is the factories, which can be done in a separate change.
This commit is contained in:
@ -8,6 +8,10 @@
|
||||
|
||||
struct SDL_Window;
|
||||
|
||||
namespace InputCommon {
|
||||
class InputSubsystem;
|
||||
}
|
||||
|
||||
class EmuWindow_SDL2_Hide : public Core::Frontend::EmuWindow {
|
||||
public:
|
||||
explicit EmuWindow_SDL2_Hide();
|
||||
@ -25,6 +29,8 @@ private:
|
||||
/// Whether the GPU and driver supports the OpenGL extension required
|
||||
bool SupportsRequiredGLExtensions();
|
||||
|
||||
std::unique_ptr<InputCommon::InputSubsystem> input_subsystem;
|
||||
|
||||
/// Internal SDL2 render window
|
||||
SDL_Window* render_window;
|
||||
|
||||
|
Reference in New Issue
Block a user