diff options
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 512b060a7..4f00c804d 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -23,12 +23,14 @@ | |||
| 23 | #include "common/telemetry.h" | 23 | #include "common/telemetry.h" |
| 24 | #include "core/core.h" | 24 | #include "core/core.h" |
| 25 | #include "core/crypto/key_manager.h" | 25 | #include "core/crypto/key_manager.h" |
| 26 | #include "core/file_sys/registered_cache.h" | ||
| 26 | #include "core/file_sys/vfs_real.h" | 27 | #include "core/file_sys/vfs_real.h" |
| 27 | #include "core/gdbstub/gdbstub.h" | 28 | #include "core/gdbstub/gdbstub.h" |
| 28 | #include "core/hle/service/filesystem/filesystem.h" | 29 | #include "core/hle/service/filesystem/filesystem.h" |
| 29 | #include "core/loader/loader.h" | 30 | #include "core/loader/loader.h" |
| 30 | #include "core/settings.h" | 31 | #include "core/settings.h" |
| 31 | #include "core/telemetry_session.h" | 32 | #include "core/telemetry_session.h" |
| 33 | #include "input_common/main.h" | ||
| 32 | #include "video_core/renderer_base.h" | 34 | #include "video_core/renderer_base.h" |
| 33 | #include "yuzu_cmd/config.h" | 35 | #include "yuzu_cmd/config.h" |
| 34 | #include "yuzu_cmd/emu_window/emu_window_sdl2.h" | 36 | #include "yuzu_cmd/emu_window/emu_window_sdl2.h" |
| @@ -37,8 +39,6 @@ | |||
| 37 | #include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h" | 39 | #include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h" |
| 38 | #endif | 40 | #endif |
| 39 | 41 | ||
| 40 | #include "core/file_sys/registered_cache.h" | ||
| 41 | |||
| 42 | #ifdef _WIN32 | 42 | #ifdef _WIN32 |
| 43 | // windows.h needs to be included before shellapi.h | 43 | // windows.h needs to be included before shellapi.h |
| 44 | #include <windows.h> | 44 | #include <windows.h> |
| @@ -82,8 +82,8 @@ static void InitializeLogging() { | |||
| 82 | 82 | ||
| 83 | Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>()); | 83 | Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>()); |
| 84 | 84 | ||
| 85 | const std::string& log_dir = FileUtil::GetUserPath(FileUtil::UserPath::LogDir); | 85 | const std::string& log_dir = Common::FS::GetUserPath(Common::FS::UserPath::LogDir); |
| 86 | FileUtil::CreateFullPath(log_dir); | 86 | Common::FS::CreateFullPath(log_dir); |
| 87 | Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + LOG_FILE)); | 87 | Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + LOG_FILE)); |
| 88 | #ifdef _WIN32 | 88 | #ifdef _WIN32 |
| 89 | Log::AddBackend(std::make_unique<Log::DebuggerBackend>()); | 89 | Log::AddBackend(std::make_unique<Log::DebuggerBackend>()); |
| @@ -179,15 +179,16 @@ int main(int argc, char** argv) { | |||
| 179 | Settings::Apply(); | 179 | Settings::Apply(); |
| 180 | 180 | ||
| 181 | Core::System& system{Core::System::GetInstance()}; | 181 | Core::System& system{Core::System::GetInstance()}; |
| 182 | InputCommon::InputSubsystem input_subsystem; | ||
| 182 | 183 | ||
| 183 | std::unique_ptr<EmuWindow_SDL2> emu_window; | 184 | std::unique_ptr<EmuWindow_SDL2> emu_window; |
| 184 | switch (Settings::values.renderer_backend.GetValue()) { | 185 | switch (Settings::values.renderer_backend.GetValue()) { |
| 185 | case Settings::RendererBackend::OpenGL: | 186 | case Settings::RendererBackend::OpenGL: |
| 186 | emu_window = std::make_unique<EmuWindow_SDL2_GL>(system, fullscreen); | 187 | emu_window = std::make_unique<EmuWindow_SDL2_GL>(system, fullscreen, &input_subsystem); |
| 187 | break; | 188 | break; |
| 188 | case Settings::RendererBackend::Vulkan: | 189 | case Settings::RendererBackend::Vulkan: |
| 189 | #ifdef HAS_VULKAN | 190 | #ifdef HAS_VULKAN |
| 190 | emu_window = std::make_unique<EmuWindow_SDL2_VK>(system, fullscreen); | 191 | emu_window = std::make_unique<EmuWindow_SDL2_VK>(system, fullscreen, &input_subsystem); |
| 191 | break; | 192 | break; |
| 192 | #else | 193 | #else |
| 193 | LOG_CRITICAL(Frontend, "Vulkan backend has not been compiled!"); | 194 | LOG_CRITICAL(Frontend, "Vulkan backend has not been compiled!"); |
| @@ -229,7 +230,7 @@ int main(int argc, char** argv) { | |||
| 229 | } | 230 | } |
| 230 | } | 231 | } |
| 231 | 232 | ||
| 232 | system.TelemetrySession().AddField(Telemetry::FieldType::App, "Frontend", "SDL"); | 233 | system.TelemetrySession().AddField(Common::Telemetry::FieldType::App, "Frontend", "SDL"); |
| 233 | 234 | ||
| 234 | // Core is loaded, start the GPU (makes the GPU contexts current to this thread) | 235 | // Core is loaded, start the GPU (makes the GPU contexts current to this thread) |
| 235 | system.GPU().Start(); | 236 | system.GPU().Start(); |