diff options
author | bunnei <bunneidev@gmail.com> | 2020-08-28 09:57:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-28 09:57:50 -0400 |
commit | 45b73ba840411fa61c75e6fe954b9a46ca5d59b6 (patch) | |
tree | c99333f0b6b386bfb80712d8e6ffa94bef04a9ff /src/yuzu_cmd/yuzu.cpp | |
parent | 40320a1d8428f9079d43a363421083678c4a9042 (diff) | |
parent | 9e1b0af25907f7a8b960aa5c1e7d931691f40196 (diff) |
Merge pull request #4544 from lioncash/input-sub
input_common: Eliminate most global state
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 8efe49390..4f00c804d 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -23,12 +23,14 @@ #include "common/telemetry.h" #include "core/core.h" #include "core/crypto/key_manager.h" +#include "core/file_sys/registered_cache.h" #include "core/file_sys/vfs_real.h" #include "core/gdbstub/gdbstub.h" #include "core/hle/service/filesystem/filesystem.h" #include "core/loader/loader.h" #include "core/settings.h" #include "core/telemetry_session.h" +#include "input_common/main.h" #include "video_core/renderer_base.h" #include "yuzu_cmd/config.h" #include "yuzu_cmd/emu_window/emu_window_sdl2.h" @@ -37,8 +39,6 @@ #include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h" #endif -#include "core/file_sys/registered_cache.h" - #ifdef _WIN32 // windows.h needs to be included before shellapi.h #include <windows.h> @@ -179,15 +179,16 @@ int main(int argc, char** argv) { Settings::Apply(); Core::System& system{Core::System::GetInstance()}; + InputCommon::InputSubsystem input_subsystem; std::unique_ptr<EmuWindow_SDL2> emu_window; switch (Settings::values.renderer_backend.GetValue()) { case Settings::RendererBackend::OpenGL: - emu_window = std::make_unique<EmuWindow_SDL2_GL>(system, fullscreen); + emu_window = std::make_unique<EmuWindow_SDL2_GL>(system, fullscreen, &input_subsystem); break; case Settings::RendererBackend::Vulkan: #ifdef HAS_VULKAN - emu_window = std::make_unique<EmuWindow_SDL2_VK>(system, fullscreen); + emu_window = std::make_unique<EmuWindow_SDL2_VK>(system, fullscreen, &input_subsystem); break; #else LOG_CRITICAL(Frontend, "Vulkan backend has not been compiled!"); |