diff --git a/kenbuild/src/StartupWinController.m b/kenbuild/src/StartupWinController.m index e8dcd533..f605a6b0 100644 --- a/kenbuild/src/StartupWinController.m +++ b/kenbuild/src/StartupWinController.m @@ -110,7 +110,7 @@ - (void)populateVideoModes:(BOOL)firstTime bpp = settings->bpp3d; fullscreen = settings->fullscreen; } else { - fullscreen = ([fullscreenButton state] == NSOnState); + fullscreen = ([fullscreenButton state] == NSControlStateValueOn); mode3d = (int)[[videoMode3DPUButton selectedItem] tag]; if (mode3d >= 0) { xdim = validmode[mode3d].xdim; @@ -155,12 +155,12 @@ - (IBAction)fullscreenClicked:(id)sender - (IBAction)multiPlayerModeClicked:(id)sender { - [singlePlayerButton setState:(sender == singlePlayerButton ? NSOnState : NSOffState)]; + [singlePlayerButton setState:(sender == singlePlayerButton ? NSControlStateValueOn : NSControlStateValueOff)]; - [joinMultiButton setState:(sender == joinMultiButton ? NSOnState : NSOffState)]; + [joinMultiButton setState:(sender == joinMultiButton ? NSControlStateValueOn : NSControlStateValueOff)]; [hostField setEnabled:(sender == joinMultiButton)]; - [hostMultiButton setState:(sender == hostMultiButton ? NSOnState : NSOffState)]; + [hostMultiButton setState:(sender == hostMultiButton ? NSControlStateValueOn : NSControlStateValueOff)]; [numPlayersField setEnabled:(sender == hostMultiButton)]; [numPlayersStepper setEnabled:(sender == hostMultiButton)]; } @@ -187,17 +187,17 @@ - (IBAction)start:(id)sender settings->numplayers = 0; settings->joinhost = NULL; - if ([singlePlayerButton state] == NSOnState) { + if ([singlePlayerButton state] == NSControlStateValueOn) { settings->numplayers = 1; - } else if ([joinMultiButton state] == NSOnState) { + } else if ([joinMultiButton state] == NSControlStateValueOn) { NSString *host = [hostField stringValue]; settings->numplayers = 2; settings->joinhost = strdup([host cStringUsingEncoding:NSUTF8StringEncoding]); - } else if ([hostMultiButton state] == NSOnState) { + } else if ([hostMultiButton state] == NSControlStateValueOn) { settings->numplayers = [numPlayersField intValue]; } - settings->forcesetup = [alwaysShowButton state] == NSOnState; + settings->forcesetup = [alwaysShowButton state] == NSControlStateValueOn; if (inmodal) { [NSApp stopModalWithCode:STARTWIN_RUN]; @@ -206,27 +206,27 @@ - (IBAction)start:(id)sender - (void)setupConfigMode { - [alwaysShowButton setState: (settings->forcesetup ? NSOnState : NSOffState)]; + [alwaysShowButton setState: (settings->forcesetup ? NSControlStateValueOn : NSControlStateValueOff)]; [alwaysShowButton setEnabled:YES]; [videoMode3DPUButton setEnabled:YES]; [self populateVideoModes:YES]; [fullscreenButton setEnabled:YES]; - [fullscreenButton setState: (settings->fullscreen ? NSOnState : NSOffState)]; + [fullscreenButton setState: (settings->fullscreen ? NSControlStateValueOn : NSControlStateValueOff)]; if (!settings->netoverride) { [singlePlayerButton setEnabled:YES]; - [singlePlayerButton setState:NSOnState]; + [singlePlayerButton setState:NSControlStateValueOn]; [hostMultiButton setEnabled:YES]; - [hostMultiButton setState:NSOffState]; + [hostMultiButton setState:NSControlStateValueOff]; [numPlayersField setEnabled:NO]; [numPlayersField setIntValue:2]; [numPlayersStepper setEnabled:NO]; [numPlayersStepper setMaxValue:MAXPLAYERS]; [joinMultiButton setEnabled:YES]; - [joinMultiButton setState:NSOffState]; + [joinMultiButton setState:NSControlStateValueOff]; [hostField setEnabled:NO]; } else { [singlePlayerButton setEnabled:NO]; diff --git a/src/osxbits.m b/src/osxbits.m index 0fa0d920..8998e302 100644 --- a/src/osxbits.m +++ b/src/osxbits.m @@ -58,7 +58,7 @@ int wmosx_filechooser(const char *initialdir, const char *initialfile, const cha [panel setDirectoryURL:initialdirurl]; resp = [panel runModal]; - if (resp == NSFileHandlingPanelOKButton) { + if (resp == NSModalResponseOK) { NSURL *file = [panel URL]; if ([file isFileURL]) { *choice = strdup([[file path] UTF8String]); @@ -69,5 +69,5 @@ int wmosx_filechooser(const char *initialdir, const char *initialfile, const cha [filetypes release]; [initialdirurl release]; - return resp == NSFileHandlingPanelOKButton ? 1 : 0; + return resp == NSModalResponseOK ? 1 : 0; } diff --git a/xcode/engine.xcodeproj/project.pbxproj b/xcode/engine.xcodeproj/project.pbxproj index 9a21723a..08c55277 100644 --- a/xcode/engine.xcodeproj/project.pbxproj +++ b/xcode/engine.xcodeproj/project.pbxproj @@ -989,7 +989,7 @@ ); GCC_WARN_PEDANTIC = YES; HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../src"; - MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = YES; SKIP_INSTALL = YES; WARNING_CFLAGS = ( @@ -1020,7 +1020,7 @@ ); GCC_WARN_PEDANTIC = YES; HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../src"; - MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET = 10.15; SKIP_INSTALL = YES; WARNING_CFLAGS = ( "-W",