mirror of https://github.com/LIJI32/SameBoy.git
Switch the Windows build to x86-64
This commit is contained in:
parent
977d941f48
commit
9f56f5fee0
6
Makefile
6
Makefile
|
@ -16,7 +16,7 @@ endif
|
||||||
ifeq ($(PLATFORM),windows32)
|
ifeq ($(PLATFORM),windows32)
|
||||||
_ := $(shell chcp 65001)
|
_ := $(shell chcp 65001)
|
||||||
EXESUFFIX:=.exe
|
EXESUFFIX:=.exe
|
||||||
NATIVE_CC = clang -IWindows -Wno-deprecated-declarations --target=i386-pc-windows
|
NATIVE_CC = clang -IWindows -Wno-deprecated-declarations --target=x86_64-pc-windows
|
||||||
SDL_AUDIO_DRIVERS ?= xaudio2 xaudio2_7 sdl
|
SDL_AUDIO_DRIVERS ?= xaudio2 xaudio2_7 sdl
|
||||||
else
|
else
|
||||||
EXESUFFIX:=
|
EXESUFFIX:=
|
||||||
|
@ -220,8 +220,8 @@ GL_LDFLAGS := $(shell $(PKG_CONFIG) --libs gl || echo -lGL)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM),windows32)
|
ifeq ($(PLATFORM),windows32)
|
||||||
CFLAGS += -IWindows -Drandom=rand --target=i386-pc-windows
|
CFLAGS += -IWindows -Drandom=rand --target=x86_64-pc-windows
|
||||||
LDFLAGS += -lmsvcrt -lcomdlg32 -luser32 -lshell32 -lole32 -lSDL2main -Wl,/MANIFESTFILE:NUL --target=i386-pc-windows
|
LDFLAGS += -lmsvcrt -lcomdlg32 -luser32 -lshell32 -lole32 -lSDL2main -Wl,/MANIFESTFILE:NUL --target=x86_64-pc-windows
|
||||||
SDL_LDFLAGS := -lSDL2
|
SDL_LDFLAGS := -lSDL2
|
||||||
GL_LDFLAGS := -lopengl32
|
GL_LDFLAGS := -lopengl32
|
||||||
else
|
else
|
||||||
|
|
|
@ -56,7 +56,7 @@ char *do_open_folder_dialog(void)
|
||||||
if (SHGetPathFromIDListW(list, filename)) {
|
if (SHGetPathFromIDListW(list, filename)) {
|
||||||
ret = wc_to_utf8_alloc(filename);
|
ret = wc_to_utf8_alloc(filename);
|
||||||
}
|
}
|
||||||
CoTaskMemFree(list);
|
CoTaskMemFree((void *)list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SUCCEEDED(hrOleInit)) OleUninitialize();
|
if (SUCCEEDED(hrOleInit)) OleUninitialize();
|
||||||
|
|
|
@ -555,10 +555,12 @@ static void debugger_interrupt(int ignore)
|
||||||
GB_debugger_break(&gb);
|
GB_debugger_break(&gb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
static void debugger_reset(int ignore)
|
static void debugger_reset(int ignore)
|
||||||
{
|
{
|
||||||
pending_command = GB_SDL_RESET_COMMAND;
|
pending_command = GB_SDL_RESET_COMMAND;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void gb_audio_callback(GB_gameboy_t *gb, GB_sample_t *sample)
|
static void gb_audio_callback(GB_gameboy_t *gb, GB_sample_t *sample)
|
||||||
{
|
{
|
||||||
|
@ -1024,7 +1026,9 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
signal(SIGINT, debugger_interrupt);
|
signal(SIGINT, debugger_interrupt);
|
||||||
|
#ifndef _WIN32
|
||||||
signal(SIGUSR1, debugger_reset);
|
signal(SIGUSR1, debugger_reset);
|
||||||
|
#endif
|
||||||
|
|
||||||
SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_AUDIO);
|
SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_AUDIO);
|
||||||
if ((console_supported = CON_start(completer))) {
|
if ((console_supported = CON_start(completer))) {
|
||||||
|
|
|
@ -11,6 +11,10 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#if _WIN64
|
||||||
|
#define fseek(...) _fseeki64(__VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
|
||||||
int access(const char *filename, int mode);
|
int access(const char *filename, int mode);
|
||||||
#define R_OK 4
|
#define R_OK 4
|
||||||
#define W_OK 2
|
#define W_OK 2
|
||||||
|
|
Loading…
Reference in New Issue