mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-12 05:41:10 +01:00
SDL_windows_main.c: use new WIN_StringToUTF8W macro
This commit is contained in:
parent
a594b85031
commit
8cb421b26d
@ -19,8 +19,6 @@
|
|||||||
# undef main
|
# undef main
|
||||||
#endif /* main */
|
#endif /* main */
|
||||||
|
|
||||||
#define WIN_WStringToUTF8(S) SDL_iconv_string("UTF-8", "UTF-16LE", (char *)(S), (SDL_wcslen(S)+1)*sizeof(WCHAR))
|
|
||||||
|
|
||||||
/* Pop up an out of memory message, returns to Windows */
|
/* Pop up an out of memory message, returns to Windows */
|
||||||
static BOOL
|
static BOOL
|
||||||
OutOfMemory(void)
|
OutOfMemory(void)
|
||||||
@ -57,7 +55,7 @@ main_getcmdline(void)
|
|||||||
return OutOfMemory();
|
return OutOfMemory();
|
||||||
}
|
}
|
||||||
for (i = 0; i < argc; ++i) {
|
for (i = 0; i < argc; ++i) {
|
||||||
argv[i] = WIN_WStringToUTF8(argvw[i]);
|
argv[i] = WIN_StringToUTF8W(argvw[i]);
|
||||||
if (!argv[i]) {
|
if (!argv[i]) {
|
||||||
return OutOfMemory();
|
return OutOfMemory();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user