mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
more unicode fixes
This commit is contained in:
parent
cc7bf6b4fa
commit
fcf09f10ef
@ -76,7 +76,9 @@ dylib_t dylib_load(const char *path)
|
|||||||
|
|
||||||
lib = LoadLibrary(path_wide);
|
lib = LoadLibrary(path_wide);
|
||||||
|
|
||||||
free(path_wide);
|
if (path_wide)
|
||||||
|
free(path_wide);
|
||||||
|
|
||||||
SetErrorMode(prevmode);
|
SetErrorMode(prevmode);
|
||||||
|
|
||||||
if (!lib)
|
if (!lib)
|
||||||
@ -84,6 +86,7 @@ dylib_t dylib_load(const char *path)
|
|||||||
set_dl_error();
|
set_dl_error();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
last_dyn_error[0] = 0;
|
last_dyn_error[0] = 0;
|
||||||
#else
|
#else
|
||||||
dylib_t lib = dlopen(path, RTLD_LAZY);
|
dylib_t lib = dlopen(path, RTLD_LAZY);
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <encodings/win32.h>
|
#include <encodings/win32.h>
|
||||||
|
#include <tchar.h>
|
||||||
#include <retro_miscellaneous.h>
|
#include <retro_miscellaneous.h>
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
@ -196,7 +197,16 @@ bool mkdir_norecurse(const char *dir)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
CHAR_TO_WCHAR_ALLOC(dir, dir_wide)
|
||||||
|
|
||||||
|
ret = _tmkdir(dir_wide);
|
||||||
|
|
||||||
|
if (dir_wide)
|
||||||
|
free(dir_wide);
|
||||||
|
#else
|
||||||
ret = _mkdir(dir);
|
ret = _mkdir(dir);
|
||||||
|
#endif
|
||||||
#elif defined(IOS)
|
#elif defined(IOS)
|
||||||
ret = mkdir(dir, 0755);
|
ret = mkdir(dir, 0755);
|
||||||
#elif defined(VITA) || defined(PSP)
|
#elif defined(VITA) || defined(PSP)
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <encodings/win32.h>
|
#include <encodings/win32.h>
|
||||||
|
#include <tchar.h>
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
# define setmode _setmode
|
# define setmode _setmode
|
||||||
# endif
|
# endif
|
||||||
@ -210,7 +211,7 @@ RFILE *filestream_open(const char *path, unsigned mode, ssize_t len)
|
|||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
CHAR_TO_WCHAR_ALLOC(path, path_wide)
|
CHAR_TO_WCHAR_ALLOC(path, path_wide)
|
||||||
stream->fp = _wfopen(path_wide, mode_str);
|
stream->fp = _tfopen(path_wide, mode_str);
|
||||||
|
|
||||||
if (path_wide)
|
if (path_wide)
|
||||||
free(path_wide);
|
free(path_wide);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user