From 18a9827b7435a8139aa966b516c05b507145e168 Mon Sep 17 00:00:00 2001 From: Yamagi Date: Wed, 10 Mar 2021 10:45:36 +0100 Subject: [PATCH] When drawing the renderer list, move vk before soft. The software renderer should be the last option offered to the user, because it is the weakest renderer. --- src/client/menu/videomenu.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/client/menu/videomenu.c b/src/client/menu/videomenu.c index 0045494e..8e8fc98d 100644 --- a/src/client/menu/videomenu.c +++ b/src/client/menu/videomenu.c @@ -75,12 +75,12 @@ GetRenderer(void) { return 1; } - else if (Q_stricmp(vid_renderer->string, "soft") == 0) +#ifdef USE_REFVK + else if (Q_stricmp(vid_renderer->string, "vk") == 0) { return 2; } -#ifdef USE_REFVK - else if (Q_stricmp(vid_renderer->string, "vk") == 0) + else if (Q_stricmp(vid_renderer->string, "soft") == 0) { return 3; } @@ -89,6 +89,10 @@ GetRenderer(void) return 4; } #else + else if (Q_stricmp(vid_renderer->string, "soft") == 0) + { + return 2; + } else { return 3; @@ -177,15 +181,21 @@ ApplyChanges(void *unused) Cvar_Set("vid_renderer", "gl3"); restart = true; } +#ifdef USE_REFVK else if (s_renderer_list.curvalue == 2) + { + Cvar_Set("vid_renderer", "vk"); + restart = true; + } + else if (s_renderer_list.curvalue == 3) { Cvar_Set("vid_renderer", "soft"); restart = true; } -#ifdef USE_REFVK - else if (s_renderer_list.curvalue == 3) +#else + else if (s_renderer_list.curvalue == 2) { - Cvar_Set("vid_renderer", "vk"); + Cvar_Set("vid_renderer", "soft"); restart = true; } #endif @@ -282,10 +292,10 @@ VID_MenuInit(void) static const char *renderers[] = { "[OpenGL 1.4]", "[OpenGL 3.2]", - "[Software ]", #ifdef USE_REFVK "[Vulkan ]", #endif + "[Software ]", CUSTOM_MODE_NAME, 0 };