mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-03 12:34:41 +00:00
Fix UWP build in non-UNICODE mode
This commit is contained in:
committed by
Anonymous Maarten
parent
c59771d7fc
commit
ccebbb6c6e
@@ -30,23 +30,23 @@
|
||||
void *SDL_LoadObject(const char *sofile)
|
||||
{
|
||||
void *handle;
|
||||
LPTSTR tstr;
|
||||
LPWSTR wstr;
|
||||
|
||||
if (!sofile) {
|
||||
SDL_InvalidParamError("sofile");
|
||||
return NULL;
|
||||
}
|
||||
tstr = WIN_UTF8ToString(sofile);
|
||||
wstr = WIN_UTF8ToStringW(sofile);
|
||||
#ifdef SDL_PLATFORM_WINRT
|
||||
/* WinRT only publicly supports LoadPackagedLibrary() for loading .dll
|
||||
files. LoadLibrary() is a private API, and not available for apps
|
||||
(that can be published to MS' Windows Store.)
|
||||
*/
|
||||
handle = (void *)LoadPackagedLibrary(tstr, 0);
|
||||
handle = (void *)LoadPackagedLibrary(wstr, 0);
|
||||
#else
|
||||
handle = (void *)LoadLibrary(tstr);
|
||||
handle = (void *)LoadLibrary(wstr);
|
||||
#endif
|
||||
SDL_free(tstr);
|
||||
SDL_free(wstr);
|
||||
|
||||
/* Generate an error message if all loads failed */
|
||||
if (!handle) {
|
||||
|
||||
Reference in New Issue
Block a user