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.
This commit is contained in:
Yamagi 2021-03-10 10:45:36 +01:00
parent f1b6b82721
commit 18a9827b74

View file

@ -75,12 +75,12 @@ GetRenderer(void)
{ {
return 1; 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; return 2;
} }
#ifdef USE_REFVK else if (Q_stricmp(vid_renderer->string, "soft") == 0)
else if (Q_stricmp(vid_renderer->string, "vk") == 0)
{ {
return 3; return 3;
} }
@ -89,6 +89,10 @@ GetRenderer(void)
return 4; return 4;
} }
#else #else
else if (Q_stricmp(vid_renderer->string, "soft") == 0)
{
return 2;
}
else else
{ {
return 3; return 3;
@ -177,15 +181,21 @@ ApplyChanges(void *unused)
Cvar_Set("vid_renderer", "gl3"); Cvar_Set("vid_renderer", "gl3");
restart = true; restart = true;
} }
#ifdef USE_REFVK
else if (s_renderer_list.curvalue == 2) 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"); Cvar_Set("vid_renderer", "soft");
restart = true; restart = true;
} }
#ifdef USE_REFVK #else
else if (s_renderer_list.curvalue == 3) else if (s_renderer_list.curvalue == 2)
{ {
Cvar_Set("vid_renderer", "vk"); Cvar_Set("vid_renderer", "soft");
restart = true; restart = true;
} }
#endif #endif
@ -282,10 +292,10 @@ VID_MenuInit(void)
static const char *renderers[] = { static const char *renderers[] = {
"[OpenGL 1.4]", "[OpenGL 1.4]",
"[OpenGL 3.2]", "[OpenGL 3.2]",
"[Software ]",
#ifdef USE_REFVK #ifdef USE_REFVK
"[Vulkan ]", "[Vulkan ]",
#endif #endif
"[Software ]",
CUSTOM_MODE_NAME, CUSTOM_MODE_NAME,
0 0
}; };