mirror of
https://github.com/libretro/bsnes-libretro.git
synced 2024-11-23 08:59:40 +00:00
ec18efcb04
git-subtree-dir: bsnes/gb git-subtree-mainline:844e23d0f4
git-subtree-split:919a88ec23
25 lines
693 B
C
Executable File
25 lines
693 B
C
Executable File
#include <windows.h>
|
|
#include <stdio.h>
|
|
#include <winnls.h>
|
|
#include <io.h>
|
|
|
|
FILE *fopen(const char *filename, const char *mode)
|
|
{
|
|
wchar_t w_filename[MAX_PATH] = {0,};
|
|
MultiByteToWideChar(CP_UTF8, 0, filename, -1, w_filename, sizeof(w_filename) / sizeof(w_filename[0]));
|
|
|
|
wchar_t w_mode[8] = {0,};
|
|
MultiByteToWideChar(CP_UTF8, 0, mode, -1, w_mode, sizeof(w_mode) / sizeof(w_mode[0]));
|
|
|
|
return _wfopen(w_filename, w_mode);
|
|
}
|
|
|
|
int access(const char *filename, int mode)
|
|
{
|
|
wchar_t w_filename[MAX_PATH] = {0,};
|
|
MultiByteToWideChar(CP_UTF8, 0, filename, -1, w_filename, sizeof(w_filename) / sizeof(w_filename[0]));
|
|
|
|
return _waccess(w_filename, mode);
|
|
}
|
|
|