From ac1c5d63dd50f7e32587275e749215a6b1cf3934 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 23 May 2016 04:46:37 +0000 Subject: [PATCH] KenBuild: Fix OS X build. git-svn-id: https://svn.eduke32.com/eduke32@5740 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Makefile | 10 ++++++++-- .../testgame/src/StartupWinController.game.m | 16 ++++++++++++---- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index 80a7ebce7..712a03121 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -210,6 +210,12 @@ ifeq ($(PLATFORM),WINDOWS) TESTEDITOR_OBJS+= buildres endif +ifeq ($(PLATFORM),DARWIN) + ifneq (0,$(OSX_STARTUPWINDOW)) + TESTGAME_OBJS += StartupWinController.game + endif +endif + TESTGAME_OBJS_EXP:=$(addprefix $(TESTGAME_OBJ)/,$(addsuffix .$o,$(TESTGAME_OBJS))) TESTEDITOR_OBJS_EXP:=$(addprefix $(TESTGAME_OBJ)/,$(addsuffix .$o,$(TESTEDITOR_OBJS))) @@ -673,7 +679,7 @@ $(TESTGAME_OBJ)/%.$o: $(TESTGAME_SRC)/%.c | $(TESTGAME_OBJ) $(TESTGAME_OBJ)/%.$o: $(TESTGAME_SRC)/%.m | $(TESTGAME_OBJ) $(COMPILE_STATUS) - $(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(TESTGAME_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE) + $(RECIPE_IF) $(COMPILER_OBJC) $(COMMONFLAGS) $(COMPILERFLAGS) $(TESTGAME_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE) $(TESTGAME_OBJ)/%.$o: $(TESTGAME_RSRC)/%.rc | $(TESTGAME_OBJ) $(COMPILE_STATUS) @@ -725,7 +731,7 @@ $(SW_OBJ)/%.$o: $(SW_SRC)/%.c | $(SW_OBJ) $(SW_OBJ)/%.$o: $(SW_SRC)/%.m | $(SW_OBJ) $(COMPILE_STATUS) - $(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(SW_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE) + $(RECIPE_IF) $(COMPILER_OBJC) $(COMMONFLAGS) $(COMPILERFLAGS) $(SW_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE) $(SW_OBJ)/%.$o: $(SW_RSRC)/%.rc | $(SW_OBJ) $(COMPILE_STATUS) diff --git a/polymer/eduke32/source/testgame/src/StartupWinController.game.m b/polymer/eduke32/source/testgame/src/StartupWinController.game.m index dc6615eaa..aac6583b8 100644 --- a/polymer/eduke32/source/testgame/src/StartupWinController.game.m +++ b/polymer/eduke32/source/testgame/src/StartupWinController.game.m @@ -52,7 +52,7 @@ static struct { int i, mode3d, fullscreen = ([fullscreenButton state] == NSOnState); int idx3d = -1; - int xdim, ydim, bpp; + int xdim = 0, ydim = 0, bpp = 0; if (firstTime) { @@ -69,8 +69,8 @@ static struct ydim = validmode[mode3d].ydim; bpp = validmode[mode3d].bpp; } - } + mode3d = checkvideomode(&xdim, &ydim, bpp, fullscreen, 1); if (mode3d < 0) { @@ -105,16 +105,21 @@ static struct - (IBAction)alwaysShowClicked:(id)sender { + UNREFERENCED_PARAMETER(sender); } - (IBAction)fullscreenClicked:(id)sender { [self populateVideoModes:NO]; + + UNREFERENCED_PARAMETER(sender); } - (IBAction)cancel:(id)sender { [NSApp abortModal]; + + UNREFERENCED_PARAMETER(sender); } - (IBAction)start:(id)sender @@ -131,6 +136,8 @@ static struct settings.forcesetup = [alwaysShowButton state] == NSOnState; [NSApp stopModal]; + + UNREFERENCED_PARAMETER(sender); } - (void)setupRunMode @@ -234,7 +241,7 @@ int startwin_puts(const char *s) if (!s) return -1; if (startwin == nil) return 1; - ns = [[NSString alloc] initWithCString:s]; + ns = [[NSString alloc] initWithUTF8String:s]; [startwin putsMessage:ns]; [ns release]; @@ -248,7 +255,7 @@ int startwin_settitle(const char *s) if (!s) return -1; if (startwin == nil) return 1; - ns = [[NSString alloc] initWithCString:s]; + ns = [[NSString alloc] initWithUTF8String:s]; [startwin setTitle:ns]; [ns release]; @@ -258,6 +265,7 @@ int startwin_settitle(const char *s) int startwin_idle(void *v) { if (startwin) [[startwin window] displayIfNeeded]; + UNREFERENCED_PARAMETER(v); return 0; }