From 121adcb08cbf59cc749955d4fdeac48b566a1f3d Mon Sep 17 00:00:00 2001
From: Simon Gellis <simongellis@gmail.com>
Date: Tue, 29 Oct 2024 23:37:23 -0400
Subject: [PATCH] File picker works on windows

---
 makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/makefile b/makefile
index ac8024a..07c9d8c 100644
--- a/makefile
+++ b/makefile
@@ -6,7 +6,7 @@ ifeq ($(msys_version), 0)
 PKGFLAGS=$(shell pkg-config sdl2 --cflags --libs)
 BINLINKFLAGS=-z noexecstack
 else
-PKGFLAGS=$(shell pkg-config sdl2 --cflags --libs) -mwindows -mconsole
+PKGFLAGS=$(shell pkg-config sdl2 --cflags --libs) -mwindows -mconsole -lcomdlg32 -lole32
 BINLINKFLAGS=
 endif
 
@@ -41,7 +41,7 @@ output/tinyfiledialogs.o: external/tinyfiledialogs.c
 	@mkdir -p output
 	@$(CC) -c -o $@ $< -I . \
 		-I external \
-		-O3 -flto=auto -fno-strict-aliasing \
+		-O3 -flto=auto -fno-strict-aliasing -Wno-cast-function-type \
 		-Werror -std=c90 -Wall -Wextra -Wpedantic
 
 output/%.o: assets/%.bin