Switch the Windows build to x86-64

This commit is contained in:
Lior Halphon 2023-12-12 00:26:13 +02:00
parent 977d941f48
commit 9f56f5fee0
4 changed files with 12 additions and 4 deletions

View File

@ -16,7 +16,7 @@ endif
ifeq ($(PLATFORM),windows32)
_ := $(shell chcp 65001)
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
else
EXESUFFIX:=
@ -220,8 +220,8 @@ GL_LDFLAGS := $(shell $(PKG_CONFIG) --libs gl || echo -lGL)
endif
ifeq ($(PLATFORM),windows32)
CFLAGS += -IWindows -Drandom=rand --target=i386-pc-windows
LDFLAGS += -lmsvcrt -lcomdlg32 -luser32 -lshell32 -lole32 -lSDL2main -Wl,/MANIFESTFILE:NUL --target=i386-pc-windows
CFLAGS += -IWindows -Drandom=rand --target=x86_64-pc-windows
LDFLAGS += -lmsvcrt -lcomdlg32 -luser32 -lshell32 -lole32 -lSDL2main -Wl,/MANIFESTFILE:NUL --target=x86_64-pc-windows
SDL_LDFLAGS := -lSDL2
GL_LDFLAGS := -lopengl32
else

View File

@ -56,7 +56,7 @@ char *do_open_folder_dialog(void)
if (SHGetPathFromIDListW(list, filename)) {
ret = wc_to_utf8_alloc(filename);
}
CoTaskMemFree(list);
CoTaskMemFree((void *)list);
}
if (SUCCEEDED(hrOleInit)) OleUninitialize();

View File

@ -555,10 +555,12 @@ static void debugger_interrupt(int ignore)
GB_debugger_break(&gb);
}
#ifndef _WIN32
static void debugger_reset(int ignore)
{
pending_command = GB_SDL_RESET_COMMAND;
}
#endif
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);
#ifndef _WIN32
signal(SIGUSR1, debugger_reset);
#endif
SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_AUDIO);
if ((console_supported = CON_start(completer))) {

View File

@ -11,6 +11,10 @@
#include <stdlib.h>
#include <stdarg.h>
#if _WIN64
#define fseek(...) _fseeki64(__VA_ARGS__)
#endif
int access(const char *filename, int mode);
#define R_OK 4
#define W_OK 2