Settings: Don't include D3D11 renderer on non-WIN32 platforms

This commit is contained in:
Connor McLaughlin 2020-01-07 18:54:39 +10:00
parent 686df4a203
commit d32383bd95
2 changed files with 12 additions and 3 deletions

View File

@ -181,9 +181,16 @@ const char* Settings::GetCPUExecutionModeDisplayName(CPUExecutionMode mode)
return s_cpu_execution_mode_display_names[static_cast<u8>(mode)]; return s_cpu_execution_mode_display_names[static_cast<u8>(mode)];
} }
static std::array<const char*, 3> s_gpu_renderer_names = {{"D3D11", "OpenGL", "Software"}}; static std::array<const char*, 3> s_gpu_renderer_names = {{
static std::array<const char*, 3> s_gpu_renderer_display_names = { #ifdef WIN32
{"Hardware (D3D11)", "Hardware (OpenGL)", "Software"}}; "D3D11",
#endif
"OpenGL", "Software"}};
static std::array<const char*, 3> s_gpu_renderer_display_names = {{
#ifdef WIN32
"Hardware (D3D11)",
#endif
"Hardware (OpenGL)", "Software"}};
std::optional<GPURenderer> Settings::ParseRendererName(const char* str) std::optional<GPURenderer> Settings::ParseRendererName(const char* str)
{ {

View File

@ -41,7 +41,9 @@ enum class CPUExecutionMode : u8
enum class GPURenderer : u8 enum class GPURenderer : u8
{ {
#ifdef WIN32
HardwareD3D11, HardwareD3D11,
#endif
HardwareOpenGL, HardwareOpenGL,
Software, Software,
Count Count