Skip to content

Commit

Permalink
Switch the Windows build to x86-64
Browse files Browse the repository at this point in the history
  • Loading branch information
LIJI32 committed Dec 11, 2023
1 parent 977d941 commit 9f56f5f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:=
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion OpenDialog/windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 4 additions & 0 deletions SDL/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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))) {
Expand Down
4 changes: 4 additions & 0 deletions Windows/stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f56f5f

Please sign in to comment.