diff options
| author | 2022-11-22 19:14:46 -0500 | |
|---|---|---|
| committer | 2022-11-27 14:58:28 -0500 | |
| commit | 2956a33463df8fe97819df2b08d31834eaeed442 (patch) | |
| tree | eed76f1f0a30830f673cab6aae36beb8127a0288 /src/yuzu_cmd | |
| parent | Merge pull request #9299 from lioncash/cast (diff) | |
| download | yuzu-2956a33463df8fe97819df2b08d31834eaeed442.tar.gz yuzu-2956a33463df8fe97819df2b08d31834eaeed442.tar.xz yuzu-2956a33463df8fe97819df2b08d31834eaeed442.zip | |
Vulkan: update initialization
Co-authored-by: bylaws <bylaws@users.noreply.github.com>
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
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 | |||
| 51 | window_info.type = Core::Frontend::WindowSystemType::Windows; | 51 | window_info.type = Core::Frontend::WindowSystemType::Windows; |
| 52 | window_info.render_surface = reinterpret_cast<void*>(wm.info.win.window); | 52 | window_info.render_surface = reinterpret_cast<void*>(wm.info.win.window); |
| 53 | break; | 53 | break; |
| 54 | #else | ||
| 55 | case SDL_SYSWM_TYPE::SDL_SYSWM_WINDOWS: | ||
| 56 | LOG_CRITICAL(Frontend, "Window manager subsystem Windows not compiled"); | ||
| 57 | std::exit(EXIT_FAILURE); | ||
| 58 | break; | ||
| 59 | #endif | 54 | #endif |
| 60 | #ifdef SDL_VIDEO_DRIVER_X11 | 55 | #ifdef SDL_VIDEO_DRIVER_X11 |
| 61 | case SDL_SYSWM_TYPE::SDL_SYSWM_X11: | 56 | case SDL_SYSWM_TYPE::SDL_SYSWM_X11: |
| @@ -63,11 +58,6 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste | |||
| 63 | window_info.display_connection = wm.info.x11.display; | 58 | window_info.display_connection = wm.info.x11.display; |
| 64 | window_info.render_surface = reinterpret_cast<void*>(wm.info.x11.window); | 59 | window_info.render_surface = reinterpret_cast<void*>(wm.info.x11.window); |
| 65 | break; | 60 | break; |
| 66 | #else | ||
| 67 | case SDL_SYSWM_TYPE::SDL_SYSWM_X11: | ||
| 68 | LOG_CRITICAL(Frontend, "Window manager subsystem X11 not compiled"); | ||
| 69 | std::exit(EXIT_FAILURE); | ||
| 70 | break; | ||
| 71 | #endif | 61 | #endif |
| 72 | #ifdef SDL_VIDEO_DRIVER_WAYLAND | 62 | #ifdef SDL_VIDEO_DRIVER_WAYLAND |
| 73 | case SDL_SYSWM_TYPE::SDL_SYSWM_WAYLAND: | 63 | case SDL_SYSWM_TYPE::SDL_SYSWM_WAYLAND: |
| @@ -75,14 +65,21 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste | |||
| 75 | window_info.display_connection = wm.info.wl.display; | 65 | window_info.display_connection = wm.info.wl.display; |
| 76 | window_info.render_surface = wm.info.wl.surface; | 66 | window_info.render_surface = wm.info.wl.surface; |
| 77 | break; | 67 | break; |
| 78 | #else | 68 | #endif |
| 79 | case SDL_SYSWM_TYPE::SDL_SYSWM_WAYLAND: | 69 | #ifdef SDL_VIDEO_DRIVER_COCOA |
| 80 | LOG_CRITICAL(Frontend, "Window manager subsystem Wayland not compiled"); | 70 | case SDL_SYSWM_TYPE::SDL_SYSWM_COCOA: |
| 81 | std::exit(EXIT_FAILURE); | 71 | window_info.type = Core::Frontend::WindowSystemType::Cocoa; |
| 72 | window_info.render_surface = SDL_Metal_CreateView(render_window); | ||
| 73 | break; | ||
| 74 | #endif | ||
| 75 | #ifdef SDL_VIDEO_DRIVER_ANDROID | ||
| 76 | case SDL_SYSWM_TYPE::SDL_SYSWM_ANDROID: | ||
| 77 | window_info.type = Core::Frontend::WindowSystemType::Android; | ||
| 78 | window_info.render_surface = reinterpret_cast<void*>(wm.info.android.window); | ||
| 82 | break; | 79 | break; |
| 83 | #endif | 80 | #endif |
| 84 | default: | 81 | default: |
| 85 | LOG_CRITICAL(Frontend, "Window manager subsystem not implemented"); | 82 | LOG_CRITICAL(Frontend, "Window manager subsystem {} not implemented", wm.subsystem); |
| 86 | std::exit(EXIT_FAILURE); | 83 | std::exit(EXIT_FAILURE); |
| 87 | break; | 84 | break; |
| 88 | } | 85 | } |