aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu_cmd/yuzu.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-02-03 16:56:25 -0500
committerGitHub <noreply@github.com>2020-02-03 16:56:25 -0500
commitc31ec00d676f6dda0bebee70d7a0b230e5babee9 (patch)
tree52c674cace5652f5d359dedd02ee01f911559192 /src/yuzu_cmd/yuzu.cpp
parent2cd51fc9fd11cce6aeea44dc0158f6bfde5456ec (diff)
parentd027850f333611f8195a69431f34798c85ba264c (diff)
Merge pull request #3337 from ReinUsesLisp/vulkan-staged
yuzu: Implement Vulkan frontend
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r--src/yuzu_cmd/yuzu.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 3ee088a91..325795321 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -32,6 +32,9 @@
#include "yuzu_cmd/config.h"
#include "yuzu_cmd/emu_window/emu_window_sdl2.h"
#include "yuzu_cmd/emu_window/emu_window_sdl2_gl.h"
+#ifdef HAS_VULKAN
+#include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h"
+#endif
#include "core/file_sys/registered_cache.h"
@@ -174,7 +177,20 @@ int main(int argc, char** argv) {
Settings::values.use_gdbstub = use_gdbstub;
Settings::Apply();
- std::unique_ptr<EmuWindow_SDL2> emu_window{std::make_unique<EmuWindow_SDL2_GL>(fullscreen)};
+ std::unique_ptr<EmuWindow_SDL2> emu_window;
+ switch (Settings::values.renderer_backend) {
+ case Settings::RendererBackend::OpenGL:
+ emu_window = std::make_unique<EmuWindow_SDL2_GL>(fullscreen);
+ break;
+ case Settings::RendererBackend::Vulkan:
+#ifdef HAS_VULKAN
+ emu_window = std::make_unique<EmuWindow_SDL2_VK>(fullscreen);
+ break;
+#else
+ LOG_CRITICAL(Frontend, "Vulkan backend has not been compiled!");
+ return 1;
+#endif
+ }
if (!Settings::values.use_multi_core) {
// Single core mode must acquire OpenGL context for entire emulation session