mirror of
https://github.com/libretro/beetle-pce-fast-libretro.git
synced 2024-11-26 17:40:40 +00:00
Enable CHD on UWP
This commit is contained in:
parent
6f0ec71c1a
commit
e0a1f82bdb
2
Makefile
2
Makefile
@ -240,8 +240,6 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
|
||||
MSVC2017CompileFlags = -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DWINDLL -D_UNICODE -DUNICODE -DWRL_NO_DEFAULT_LIB -FS
|
||||
LDFLAGS += -APPCONTAINER -NXCOMPAT -DYNAMICBASE -MANIFEST:NO -LTCG -OPT:REF -SUBSYSTEM:CONSOLE -MANIFESTUAC:NO -OPT:ICF -ERRORREPORT:PROMPT -NOLOGO -TLBID:1 -DEBUG:FULL -WINMD:NO
|
||||
LIBS += WindowsApp.lib
|
||||
|
||||
HAVE_CHD = 0
|
||||
endif
|
||||
|
||||
CFLAGS += $(MSVC2017CompileFlags)
|
||||
|
@ -185,6 +185,16 @@ int flac_internal_rename_utf8(const char *oldname, const char *newname)
|
||||
|
||||
HANDLE WINAPI flac_internal_CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
|
||||
{
|
||||
#if _MSC_VER > 1900 && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
wchar_t *wname;
|
||||
HANDLE handle = INVALID_HANDLE_VALUE;
|
||||
|
||||
if ((wname = wchar_from_utf8(lpFileName)) != NULL) {
|
||||
|
||||
handle = CreateFile2(wname, dwDesiredAccess, dwShareMode, CREATE_ALWAYS, NULL);
|
||||
free(wname);
|
||||
}
|
||||
#else
|
||||
if (!utf8_filenames) {
|
||||
return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
|
||||
} else {
|
||||
@ -198,4 +208,5 @@ HANDLE WINAPI flac_internal_CreateFile_utf8(const char *lpFileName, DWORD dwDesi
|
||||
|
||||
return handle;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
4
deps/libchdr/coretypes.h
vendored
4
deps/libchdr/coretypes.h
vendored
@ -4,6 +4,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __LIBRETRO__
|
||||
#include <streams/file_stream_transforms.h>
|
||||
#endif
|
||||
|
||||
#define ARRAY_LENGTH(x) (sizeof(x)/sizeof(x[0]))
|
||||
|
||||
typedef uint64_t UINT64;
|
||||
|
4
deps/lzma-16.04/C/CpuArch.c
vendored
4
deps/lzma-16.04/C/CpuArch.c
vendored
@ -177,11 +177,15 @@ Bool CPU_Is_InOrder()
|
||||
#include <windows.h>
|
||||
static Bool CPU_Sys_Is_SSE_Supported()
|
||||
{
|
||||
#if _MSC_VER >= 1900 && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
return True;
|
||||
#else
|
||||
OSVERSIONINFO vi;
|
||||
vi.dwOSVersionInfoSize = sizeof(vi);
|
||||
if (!GetVersionEx(&vi))
|
||||
return False;
|
||||
return (vi.dwMajorVersion >= 5);
|
||||
#endif
|
||||
}
|
||||
#define CHECK_SYS_SSE_SUPPORT if (!CPU_Sys_Is_SSE_Supported()) return False;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user