From 3c2757ff89e756d9218f026f3d51daa0158b0a6f Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sun, 13 Dec 2020 18:25:02 +0300 Subject: [PATCH] windows SDL_LoadObject: fix warning after commit 2ff650230d96 --- src/loadso/windows/SDL_sysloadso.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/loadso/windows/SDL_sysloadso.c b/src/loadso/windows/SDL_sysloadso.c index a5e985201..3513718de 100644 --- a/src/loadso/windows/SDL_sysloadso.c +++ b/src/loadso/windows/SDL_sysloadso.c @@ -32,23 +32,22 @@ void * SDL_LoadObject(const char *sofile) { + void *handle; LPTSTR tstr; if (!sofile) { SDL_SetError("NULL sofile"); return NULL; } - tstr = WIN_UTF8ToString(sofile); - #ifdef __WINRT__ /* WinRT only publically supports LoadPackagedLibrary() for loading .dll files. LoadLibrary() is a private API, and not available for apps (that can be published to MS' Windows Store.) */ - void *handle = (void *) LoadPackagedLibrary(tstr, 0); + handle = (void *) LoadPackagedLibrary(tstr, 0); #else - void *handle = (void *) LoadLibrary(tstr); + handle = (void *) LoadLibrary(tstr); #endif SDL_free(tstr);