Skip to content

Commit

Permalink
Replaced stricmp with Q_strcasecmp to fix the Linux build.
Browse files Browse the repository at this point in the history
  • Loading branch information
apanteleev committed Mar 25, 2021
1 parent 73f1f81 commit c4d9f22
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/refresh/vkpt/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,19 +1000,19 @@ init_vulkan()

int picked_device = -1;

if (!stricmp(cvar_ray_tracing_api->string, "query") && picked_device_with_ray_query >= 0)
if (!Q_strcasecmp(cvar_ray_tracing_api->string, "query") && picked_device_with_ray_query >= 0)
{
qvk.use_khr_ray_tracing = qtrue;
qvk.use_ray_query = qtrue;
picked_device = picked_device_with_ray_query;
}
else if (!stricmp(cvar_ray_tracing_api->string, "pipeline") && picked_device_with_khr >= 0)
else if (!Q_strcasecmp(cvar_ray_tracing_api->string, "pipeline") && picked_device_with_khr >= 0)
{
qvk.use_khr_ray_tracing = qtrue;
qvk.use_ray_query = qfalse;
picked_device = picked_device_with_khr;
}
else if (!stricmp(cvar_ray_tracing_api->string, "nv") && picked_device_with_nv >= 0)
else if (!Q_strcasecmp(cvar_ray_tracing_api->string, "nv") && picked_device_with_nv >= 0)
{
qvk.use_khr_ray_tracing = qfalse;
qvk.use_ray_query = qfalse;
Expand All @@ -1021,7 +1021,7 @@ init_vulkan()

if (picked_device < 0)
{
if (stricmp(cvar_ray_tracing_api->string, "auto"))
if (Q_strcasecmp(cvar_ray_tracing_api->string, "auto"))
{
Com_WPrintf("Requested Ray Tracing API (%s) is not available, switching to automatic selection.\n", cvar_ray_tracing_api->string);
}
Expand Down

0 comments on commit c4d9f22

Please sign in to comment.