summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2020-04-22 12:37:01 -0400
committerGravatar GitHub2020-04-22 12:37:01 -0400
commit5ed13304e17aa572f2d9605fe78dc61615dadec6 (patch)
tree93d0dfa077bde3b8f29f8fb31ce58661ad177b40
parentMerge pull request #3653 from ReinUsesLisp/nsight-aftermath (diff)
parentInit SDL info structure and add dummy context (diff)
downloadyuzu-5ed13304e17aa572f2d9605fe78dc61615dadec6.tar.gz
yuzu-5ed13304e17aa572f2d9605fe78dc61615dadec6.tar.xz
yuzu-5ed13304e17aa572f2d9605fe78dc61615dadec6.zip
Merge pull request #3758 from H27CK/vk-cmd
Introduce dummy context for yuzu-cmd VK support
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp3
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h2
2 files changed, 4 insertions, 1 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 f2990910e..5149fa867 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp
@@ -29,6 +29,7 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(Core::System& system, bool fullscreen)
29 SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); 29 SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
30 30
31 SDL_SysWMinfo wm; 31 SDL_SysWMinfo wm;
32 SDL_VERSION(&wm.version);
32 if (SDL_GetWindowWMInfo(render_window, &wm) == SDL_FALSE) { 33 if (SDL_GetWindowWMInfo(render_window, &wm) == SDL_FALSE) {
33 LOG_CRITICAL(Frontend, "Failed to get information from the window manager"); 34 LOG_CRITICAL(Frontend, "Failed to get information from the window manager");
34 std::exit(EXIT_FAILURE); 35 std::exit(EXIT_FAILURE);
@@ -70,7 +71,7 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(Core::System& system, bool fullscreen)
70EmuWindow_SDL2_VK::~EmuWindow_SDL2_VK() = default; 71EmuWindow_SDL2_VK::~EmuWindow_SDL2_VK() = default;
71 72
72std::unique_ptr<Core::Frontend::GraphicsContext> EmuWindow_SDL2_VK::CreateSharedContext() const { 73std::unique_ptr<Core::Frontend::GraphicsContext> EmuWindow_SDL2_VK::CreateSharedContext() const {
73 return nullptr; 74 return std::make_unique<DummyContext>()
74} 75}
75 76
76void EmuWindow_SDL2_VK::Present() { 77void EmuWindow_SDL2_VK::Present() {
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h
index b8021ebea..77a6ca72b 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h
@@ -22,3 +22,5 @@ public:
22 22
23 std::unique_ptr<Core::Frontend::GraphicsContext> CreateSharedContext() const override; 23 std::unique_ptr<Core::Frontend::GraphicsContext> CreateSharedContext() const override;
24}; 24};
25
26class DummyContext : public Core::Frontend::GraphicsContext {};