add/fix wincrossbuild 64

This commit is contained in:
Not6 2017-04-21 15:52:44 +02:00
parent e4092363f0
commit b6190c7a43
5 changed files with 31 additions and 3 deletions

View File

@ -12,7 +12,7 @@
#include "scsicmd.h"
#include "fdd/sxsi.h"
#if defined(_WIN32) && defined(TRACE)
#if defined(_WIN32) && defined(TRACE) &&!defined(__LIBRETRO__)
extern void iptrace_out(void);
#define SCSICMD_ERR MessageBox(NULL, "SCSI error", "?", MB_OK); \
exit(1);

View File

@ -171,6 +171,21 @@ else ifeq ($(platform), emscripten)
STATIC_LINKING = 1
COMMONFLAGS += -DEMSCRIPTEN
else ifeq ($(platform), wincross64)
AR = x86_64-w64-mingw32-ar
CC = x86_64-w64-mingw32-gcc
CXX = x86_64-w64-mingw32-g++
CFLAGS += -D__WIN32__ -DHAVE_SNPRINTF -DHAVE_VSNPRINTF -D__USE_MINGW_ANSI_STDIO=1 -DDEBUG_MAIN=1 -DDEBUG_CMDLINE=1 -DHAVE_NETWORK
# CFLAGS += -mno-ms-bitfields
# -DX64_WINDOWS_ABI
TARGET := $(TARGET_NAME)_libretro.dll
LDFLAGS += --shared -static-libgcc -static-libstdc++ -Wl,--version-script=link.T -L/usr/x86_64-w64-mingw32/lib
LDFLAGS += -lws2_32 -luser32 -lwinmm -ladvapi32 -lshlwapi -lwsock32 -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv -lmingw32 -shared -lgcc -lm -lmingw32
else
CXXFLAGS += -mno-ms-bitfields
TARGET := $(TARGET_NAME)_libretro.dll

View File

@ -25,6 +25,11 @@
#define OSLANG_UTF8
#define OSLINEBREAK_CRLF
#define RESOURCE_US
#ifdef __WIN32__
#define sigjmp_buf jmp_buf
#define sigsetjmp(env, mask) setjmp(env)
#define siglongjmp(env, val) longjmp(env, val)
#endif
typedef int32_t SINT;
typedef uint32_t UINT;

View File

@ -155,8 +155,11 @@ file_delete(const OEMCHAR *path)
short
file_dircreate(const OEMCHAR *path)
{
#if defined(WIN32)
return((short)mkdir(path));
#else
return (short)mkdir(path, 0777);
#endif
}

View File

@ -6,8 +6,9 @@
#include "menubase.h"
#include "sysmenu.h"
#ifndef _WIN32
#include "retro_miscellaneous.h"
#endif
BOOL task_avail;
@ -108,7 +109,11 @@ BOOL taskmng_sleep(UINT32 tick) {
while((task_avail) && ((GETTICK() - base) < tick)) {
taskmng_rol();
//SDL_Delay(1);
#if defined(_WIN32)
Sleep(1);
#else
retro_sleep(1);
#endif
}
return(task_avail);
}