mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fix STARTUP_WINDOW=0 on modern macOS
git-svn-id: https://svn.eduke32.com/eduke32@8351 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/src/sdlayer.cpp # source/build/src/startosx.editor.mm # source/platform/macos/osxbits.h # source/platform/macos/startosx.game.mm
This commit is contained in:
parent
c27616508e
commit
53e2a8297d
3 changed files with 18 additions and 8 deletions
|
@ -2,6 +2,9 @@
|
|||
#define osxbits_h_
|
||||
#include <sys/types.h>
|
||||
|
||||
void osx_preopen(void);
|
||||
void osx_postopen(void);
|
||||
|
||||
int osx_msgbox(const char *name, const char *msg);
|
||||
int osx_ynbox(const char *name, const char *msg);
|
||||
|
||||
|
|
|
@ -23,6 +23,20 @@
|
|||
# define MAC_OS_VERSION_10_3 1030
|
||||
#endif
|
||||
|
||||
id nsapp;
|
||||
|
||||
void osx_preopen(void)
|
||||
{
|
||||
// fix for "ld: absolute address to symbol _NSApp in a different linkage unit not supported"
|
||||
// (OS X 10.6) when building for PPC
|
||||
nsapp = [NSApplication sharedApplication];
|
||||
}
|
||||
|
||||
void osx_postopen(void)
|
||||
{
|
||||
[nsapp finishLaunching];
|
||||
}
|
||||
|
||||
int osx_msgbox(const char *name, const char *msg)
|
||||
{
|
||||
NSString *mmsg = [[NSString alloc] initWithUTF8String:msg];
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "compat.h"
|
||||
#include "baselayer.h"
|
||||
#include "grpscan.h"
|
||||
#include "osxbits.h"
|
||||
|
||||
#import "GrpFile.game.h"
|
||||
#import "GameListSource.game.h"
|
||||
|
@ -105,8 +106,6 @@ static NSPopUpButton * makeComboBox(void)
|
|||
return comboBox;
|
||||
}
|
||||
|
||||
static id nsapp;
|
||||
|
||||
/* setAppleMenu disappeared from the headers in 10.4 */
|
||||
@interface NSApplication(NSAppleMenu)
|
||||
- (void)setAppleMenu:(NSMenu *)menu;
|
||||
|
@ -599,10 +598,6 @@ static StartupWindow *startwin = nil;
|
|||
|
||||
int startwin_open(void)
|
||||
{
|
||||
// fix for "ld: absolute address to symbol _NSApp in a different linkage unit not supported"
|
||||
// (OS X 10.6) when building for PPC
|
||||
nsapp = [NSApplication sharedApplication];
|
||||
|
||||
if (startwin != nil) return 1;
|
||||
|
||||
startwin = [[StartupWindow alloc] init];
|
||||
|
@ -610,8 +605,6 @@ int startwin_open(void)
|
|||
|
||||
[startwin setupMessagesMode];
|
||||
|
||||
[nsapp finishLaunching];
|
||||
|
||||
[startwin center];
|
||||
[startwin makeKeyAndOrderFront:nil];
|
||||
|
||||
|
|
Loading…
Reference in a new issue