|
|
@ -15,16 +15,13 @@
|
|
|
|
#include "video_core/renderer_vulkan/renderer_vulkan.h"
|
|
|
|
#include "video_core/renderer_vulkan/renderer_vulkan.h"
|
|
|
|
#include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h"
|
|
|
|
#include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h"
|
|
|
|
|
|
|
|
|
|
|
|
// Include these late to avoid polluting everything with Xlib macros
|
|
|
|
#ifdef YUZU_USE_EXTERNAL_SDL2
|
|
|
|
// Ignore -Wimplicit-fallthrough due to https://github.com/libsdl-org/SDL/issues/4307
|
|
|
|
// Include this before SDL.h to prevent the external from including a dummy
|
|
|
|
#ifdef __clang__
|
|
|
|
#define USING_GENERATED_CONFIG_H
|
|
|
|
#pragma clang diagnostic push
|
|
|
|
#include <SDL_config.h>
|
|
|
|
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
#include <SDL.h>
|
|
|
|
#ifdef __clang__
|
|
|
|
|
|
|
|
#pragma clang diagnostic pop
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <SDL_syswm.h>
|
|
|
|
#include <SDL_syswm.h>
|
|
|
|
|
|
|
|
|
|
|
|
EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsystem)
|
|
|
|
EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsystem)
|
|
|
@ -51,6 +48,11 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste
|
|
|
|
window_info.type = Core::Frontend::WindowSystemType::Windows;
|
|
|
|
window_info.type = Core::Frontend::WindowSystemType::Windows;
|
|
|
|
window_info.render_surface = reinterpret_cast<void*>(wm.info.win.window);
|
|
|
|
window_info.render_surface = reinterpret_cast<void*>(wm.info.win.window);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
case SDL_SYSWM_TYPE::SDL_SYSWM_WINDOWS:
|
|
|
|
|
|
|
|
LOG_CRITICAL(Frontend, "Window manager subsystem Windows not compiled");
|
|
|
|
|
|
|
|
std::exit(EXIT_FAILURE);
|
|
|
|
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifdef SDL_VIDEO_DRIVER_X11
|
|
|
|
#ifdef SDL_VIDEO_DRIVER_X11
|
|
|
|
case SDL_SYSWM_TYPE::SDL_SYSWM_X11:
|
|
|
|
case SDL_SYSWM_TYPE::SDL_SYSWM_X11:
|
|
|
@ -58,6 +60,11 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste
|
|
|
|
window_info.display_connection = wm.info.x11.display;
|
|
|
|
window_info.display_connection = wm.info.x11.display;
|
|
|
|
window_info.render_surface = reinterpret_cast<void*>(wm.info.x11.window);
|
|
|
|
window_info.render_surface = reinterpret_cast<void*>(wm.info.x11.window);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
case SDL_SYSWM_TYPE::SDL_SYSWM_X11:
|
|
|
|
|
|
|
|
LOG_CRITICAL(Frontend, "Window manager subsystem X11 not compiled");
|
|
|
|
|
|
|
|
std::exit(EXIT_FAILURE);
|
|
|
|
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifdef SDL_VIDEO_DRIVER_WAYLAND
|
|
|
|
#ifdef SDL_VIDEO_DRIVER_WAYLAND
|
|
|
|
case SDL_SYSWM_TYPE::SDL_SYSWM_WAYLAND:
|
|
|
|
case SDL_SYSWM_TYPE::SDL_SYSWM_WAYLAND:
|
|
|
@ -65,6 +72,11 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste
|
|
|
|
window_info.display_connection = wm.info.wl.display;
|
|
|
|
window_info.display_connection = wm.info.wl.display;
|
|
|
|
window_info.render_surface = wm.info.wl.surface;
|
|
|
|
window_info.render_surface = wm.info.wl.surface;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
case SDL_SYSWM_TYPE::SDL_SYSWM_WAYLAND:
|
|
|
|
|
|
|
|
LOG_CRITICAL(Frontend, "Window manager subsystem Wayland not compiled");
|
|
|
|
|
|
|
|
std::exit(EXIT_FAILURE);
|
|
|
|
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
LOG_CRITICAL(Frontend, "Window manager subsystem not implemented");
|
|
|
|
LOG_CRITICAL(Frontend, "Window manager subsystem not implemented");
|
|
|
|