mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(UWP) Fix win32 nbio
This commit is contained in:
parent
0129f7e4ad
commit
dcdcc938bf
@ -38,7 +38,7 @@ extern nbio_intf_t nbio_stdio;
|
||||
static nbio_intf_t *internal_nbio = &nbio_linux;
|
||||
#elif defined(HAVE_MMAP) && defined(BSD)
|
||||
static nbio_intf_t *internal_nbio = &nbio_mmap_unix;
|
||||
#elif defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
static nbio_intf_t *internal_nbio = &nbio_mmap_win32;
|
||||
#else
|
||||
static nbio_intf_t *internal_nbio = &nbio_stdio;
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include <file/nbio.h>
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -69,7 +69,11 @@ static void *nbio_mmap_win32_open(const char * filename, unsigned mode)
|
||||
HANDLE file = CreateFile(filename, access, FILE_SHARE_ALL, NULL, dispositions[mode], FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#else
|
||||
wchar_t *filename_wide = utf8_to_utf16_string_alloc(filename);
|
||||
#ifdef __WINRT__
|
||||
HANDLE file = CreateFile2(filename_wide, access, FILE_SHARE_ALL, dispositions[mode], NULL);
|
||||
#else
|
||||
HANDLE file = CreateFileW(filename_wide, access, FILE_SHARE_ALL, NULL, dispositions[mode], FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#endif
|
||||
|
||||
if (filename_wide)
|
||||
free(filename_wide);
|
||||
|
Loading…
x
Reference in New Issue
Block a user