wined3d: Avoid calling _strnicmp() with limit -1.

It's considered invalid by native ucrtbase (installed with winetricks).

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2022-03-29 16:02:20 +03:00 committed by Alexandre Julliard
parent 1c65c94879
commit 0e4f31ac93
3 changed files with 5 additions and 5 deletions

View File

@ -3736,7 +3736,7 @@ static struct wined3d_shader_signature_element *shader_find_signature_element(co
for (i = 0; i < s->element_count; ++i)
{
if (e[i].stream_idx == stream_idx
&& !_strnicmp(e[i].semantic_name, semantic_name, -1)
&& !stricmp(e[i].semantic_name, semantic_name)
&& e[i].semantic_idx == semantic_idx)
return &e[i];
}

View File

@ -1319,7 +1319,7 @@ static void *shader_sm4_init(const DWORD *byte_code, size_t byte_code_size,
struct wined3d_shader_signature_element *e = &output_signature->elements[i];
if (priv->shader_version.type == WINED3D_SHADER_TYPE_PIXEL
&& _strnicmp(e->semantic_name, "SV_TARGET", -1))
&& stricmp(e->semantic_name, "SV_TARGET"))
continue;
if (e->register_idx >= ARRAY_SIZE(priv->output_map))
{

View File

@ -329,17 +329,17 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
}
if (!get_config_key(hkey, appkey, env, "shader_backend", buffer, size))
{
if (!_strnicmp(buffer, "glsl", -1))
if (!stricmp(buffer, "glsl"))
{
ERR_(winediag)("Using the GLSL shader backend.\n");
wined3d_settings.shader_backend = WINED3D_SHADER_BACKEND_GLSL;
}
else if (!_strnicmp(buffer, "arb", -1))
else if (!stricmp(buffer, "arb"))
{
ERR_(winediag)("Using the ARB shader backend.\n");
wined3d_settings.shader_backend = WINED3D_SHADER_BACKEND_ARB;
}
else if (!_strnicmp(buffer, "none", -1))
else if (!stricmp(buffer, "none"))
{
ERR_(winediag)("Disabling shader backends.\n");
wined3d_settings.shader_backend = WINED3D_SHADER_BACKEND_NONE;