From f2bd861cd7168effeda59aceaaa61b82bc43a87a Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 4 Jan 2021 08:50:00 +0300 Subject: [PATCH] move SDL_tcsstr definition to core/windows/SDL_windows.h --- src/core/windows/SDL_windows.h | 6 ++++++ src/joystick/windows/SDL_dinputjoystick.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/windows/SDL_windows.h b/src/core/windows/SDL_windows.h index 6230fd696..8d2668e51 100644 --- a/src/core/windows/SDL_windows.h +++ b/src/core/windows/SDL_windows.h @@ -47,6 +47,12 @@ #define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)(S), SDL_strlen(S)+1) #endif +#ifdef UNICODE +#define SDL_tcsstr SDL_wcsstr +#else +#define SDL_tcsstr SDL_strstr +#endif + /* Sets an error message based on a given HRESULT */ extern int WIN_SetErrorFromHRESULT(const char *prefix, HRESULT hr); diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c index 0c4ffe161..a31b79a77 100644 --- a/src/joystick/windows/SDL_dinputjoystick.c +++ b/src/joystick/windows/SDL_dinputjoystick.c @@ -232,12 +232,6 @@ SetDIerror(const char *function, HRESULT code) return SDL_SetError("%s() DirectX error 0x%8.8lx", function, code); } -#ifdef UNICODE -#define SDL_tcsstr SDL_wcsstr -#else -#define SDL_tcsstr SDL_strstr -#endif - #if 0 /* Microsoft recommended implementation, but slower than checking raw devices */ #define COBJMACROS #include