summaryrefslogtreecommitdiffstats
path: root/src/yuzu_cmd/emu_window
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.cpp2
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp27
2 files changed, 14 insertions, 15 deletions
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
index 4ac72c2f6..37dd1747c 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
@@ -7,6 +7,7 @@
#include "common/scm_rev.h"
#include "common/settings.h"
#include "core/core.h"
+#include "core/hid/hid_core.h"
#include "core/perf_stats.h"
#include "input_common/drivers/keyboard.h"
#include "input_common/drivers/mouse.h"
@@ -26,6 +27,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(InputCommon::InputSubsystem* input_subsystem_, Co
}
EmuWindow_SDL2::~EmuWindow_SDL2() {
+ system.HIDCore().UnloadInputDevices();
input_subsystem->Shutdown();
SDL_Quit();
}
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp
index 25948328c..0d580fe4f 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp
@@ -51,11 +51,6 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste
window_info.type = Core::Frontend::WindowSystemType::Windows;
window_info.render_surface = reinterpret_cast<void*>(wm.info.win.window);
break;
-#else
- case SDL_SYSWM_TYPE::SDL_SYSWM_WINDOWS:
- LOG_CRITICAL(Frontend, "Window manager subsystem Windows not compiled");
- std::exit(EXIT_FAILURE);
- break;
#endif
#ifdef SDL_VIDEO_DRIVER_X11
case SDL_SYSWM_TYPE::SDL_SYSWM_X11:
@@ -63,11 +58,6 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste
window_info.display_connection = wm.info.x11.display;
window_info.render_surface = reinterpret_cast<void*>(wm.info.x11.window);
break;
-#else
- case SDL_SYSWM_TYPE::SDL_SYSWM_X11:
- LOG_CRITICAL(Frontend, "Window manager subsystem X11 not compiled");
- std::exit(EXIT_FAILURE);
- break;
#endif
#ifdef SDL_VIDEO_DRIVER_WAYLAND
case SDL_SYSWM_TYPE::SDL_SYSWM_WAYLAND:
@@ -75,14 +65,21 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste
window_info.display_connection = wm.info.wl.display;
window_info.render_surface = wm.info.wl.surface;
break;
-#else
- case SDL_SYSWM_TYPE::SDL_SYSWM_WAYLAND:
- LOG_CRITICAL(Frontend, "Window manager subsystem Wayland not compiled");
- std::exit(EXIT_FAILURE);
+#endif
+#ifdef SDL_VIDEO_DRIVER_COCOA
+ case SDL_SYSWM_TYPE::SDL_SYSWM_COCOA:
+ window_info.type = Core::Frontend::WindowSystemType::Cocoa;
+ window_info.render_surface = SDL_Metal_CreateView(render_window);
+ break;
+#endif
+#ifdef SDL_VIDEO_DRIVER_ANDROID
+ case SDL_SYSWM_TYPE::SDL_SYSWM_ANDROID:
+ window_info.type = Core::Frontend::WindowSystemType::Android;
+ window_info.render_surface = reinterpret_cast<void*>(wm.info.android.window);
break;
#endif
default:
- LOG_CRITICAL(Frontend, "Window manager subsystem not implemented");
+ LOG_CRITICAL(Frontend, "Window manager subsystem {} not implemented", wm.subsystem);
std::exit(EXIT_FAILURE);
break;
}