diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 3ae21802e0..acaf8fe785 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -380,6 +380,13 @@ else() endif() endif() +if (NOT APPLE AND ENABLE_OPENGL) + target_compile_definitions(qt_common PUBLIC HAS_OPENGL) +endif() +if (ENABLE_VULKAN) + target_compile_definitions(qt_common PUBLIC HAS_VULKAN) +endif() + if (ARCHITECTURE_x86_64) target_link_libraries(video_core PUBLIC xbyak::xbyak) endif() diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index cdede1ea3d..947909bfa4 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp @@ -25,11 +25,8 @@ namespace { -std::unique_ptr CreateRenderer( - Core::System& system, Core::Frontend::EmuWindow& emu_window, Tegra::GPU& gpu, - std::unique_ptr context) { - auto& device_memory = system.Host1x().MemoryManager(); - +std::unique_ptr CreateRenderer(Core::System& system, Core::Frontend::EmuWindow& emu_window, Tegra::GPU& gpu, std::unique_ptr context) { + [[maybe_unused]] auto& device_memory = system.Host1x().MemoryManager(); switch (Settings::values.renderer_backend.GetValue()) { #ifdef HAS_OPENGL case Settings::RendererBackend::OpenGL_GLSL: