mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-16 20:45:45 -04:00
Build: Make OpenGL/Vulkan renderers optional
And disabled on Windows/arm64.
This commit is contained in:
@ -8,11 +8,13 @@
|
||||
#include <QtWidgets/QMessageBox>
|
||||
|
||||
// For enumerating adapters.
|
||||
#include "frontend-common/vulkan_host_display.h"
|
||||
#ifdef _WIN32
|
||||
#include "frontend-common/d3d11_host_display.h"
|
||||
#include "frontend-common/d3d12_host_display.h"
|
||||
#endif
|
||||
#ifdef WITH_VULKAN
|
||||
#include "frontend-common/vulkan_host_display.h"
|
||||
#endif
|
||||
|
||||
DisplaySettingsWidget::DisplaySettingsWidget(SettingsDialog* dialog, QWidget* parent)
|
||||
: QWidget(parent), m_dialog(dialog)
|
||||
@ -206,11 +208,12 @@ void DisplaySettingsWidget::populateGPUAdaptersAndResolutions()
|
||||
aml = FrontendCommon::D3D12HostDisplay::StaticGetAdapterAndModeList();
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef WITH_VULKAN
|
||||
case GPURenderer::HardwareVulkan:
|
||||
aml = FrontendCommon::VulkanHostDisplay::StaticGetAdapterAndModeList(nullptr);
|
||||
threaded_presentation_supported = true;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case GPURenderer::Software:
|
||||
thread_supported = true;
|
||||
|
@ -21,9 +21,7 @@
|
||||
#include "frontend-common/imgui_manager.h"
|
||||
#include "frontend-common/imgui_overlays.h"
|
||||
#include "frontend-common/input_manager.h"
|
||||
#include "frontend-common/opengl_host_display.h"
|
||||
#include "frontend-common/sdl_audio_stream.h"
|
||||
#include "frontend-common/vulkan_host_display.h"
|
||||
#include "imgui.h"
|
||||
#include "mainwindow.h"
|
||||
#include "qtprogresscallback.h"
|
||||
@ -58,6 +56,14 @@ Log_SetChannel(EmuThread);
|
||||
#include <ShlObj.h>
|
||||
#endif
|
||||
|
||||
#ifdef WITH_OPENGL
|
||||
#include "frontend-common/opengl_host_display.h"
|
||||
#endif
|
||||
|
||||
#ifdef WITH_VULKAN
|
||||
#include "frontend-common/vulkan_host_display.h"
|
||||
#endif
|
||||
|
||||
#ifdef WITH_CHEEVOS
|
||||
#include "frontend-common/achievements.h"
|
||||
#endif
|
||||
@ -824,17 +830,18 @@ bool EmuThread::acquireHostDisplay(HostDisplay::RenderAPI api)
|
||||
|
||||
switch (api)
|
||||
{
|
||||
#ifdef WITH_VULKAN
|
||||
case HostDisplay::RenderAPI::Vulkan:
|
||||
g_host_display = std::make_unique<FrontendCommon::VulkanHostDisplay>();
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef WITH_OPENGL
|
||||
case HostDisplay::RenderAPI::OpenGL:
|
||||
case HostDisplay::RenderAPI::OpenGLES:
|
||||
#ifndef _WIN32
|
||||
default:
|
||||
#endif
|
||||
g_host_display = std::make_unique<FrontendCommon::OpenGLHostDisplay>();
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
case HostDisplay::RenderAPI::D3D12:
|
||||
@ -842,10 +849,21 @@ bool EmuThread::acquireHostDisplay(HostDisplay::RenderAPI api)
|
||||
break;
|
||||
|
||||
case HostDisplay::RenderAPI::D3D11:
|
||||
default:
|
||||
g_host_display = std::make_unique<FrontendCommon::D3D11HostDisplay>();
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
#if defined(_WIN32) && defined(_M_ARM64)
|
||||
g_host_display = std::make_unique<FrontendCommon::D3D12HostDisplay>();
|
||||
#elif defined(_WIN32)
|
||||
g_host_display = std::make_unique<FrontendCommon::D3D11HostDisplay>();
|
||||
#elif defined(WITH_OPENGL)
|
||||
g_host_display = std::make_unique<FrontendCommon::OpenGLHostDisplay>();
|
||||
#elif defined(WITH_VULKAN)
|
||||
g_host_display = std::make_unique<FrontendCommon::VulkanHostDisplay>();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
if (!createDisplayRequested(m_is_fullscreen, m_is_rendering_to_main))
|
||||
|
Reference in New Issue
Block a user