mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 19:20:38 +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_
|
#define osxbits_h_
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
void osx_preopen(void);
|
||||||
|
void osx_postopen(void);
|
||||||
|
|
||||||
int osx_msgbox(const char *name, const char *msg);
|
int osx_msgbox(const char *name, const char *msg);
|
||||||
int osx_ynbox(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
|
# define MAC_OS_VERSION_10_3 1030
|
||||||
#endif
|
#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)
|
int osx_msgbox(const char *name, const char *msg)
|
||||||
{
|
{
|
||||||
NSString *mmsg = [[NSString alloc] initWithUTF8String:msg];
|
NSString *mmsg = [[NSString alloc] initWithUTF8String:msg];
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
#include "baselayer.h"
|
||||||
#include "grpscan.h"
|
#include "grpscan.h"
|
||||||
|
#include "osxbits.h"
|
||||||
|
|
||||||
#import "GrpFile.game.h"
|
#import "GrpFile.game.h"
|
||||||
#import "GameListSource.game.h"
|
#import "GameListSource.game.h"
|
||||||
|
@ -105,8 +106,6 @@ static NSPopUpButton * makeComboBox(void)
|
||||||
return comboBox;
|
return comboBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
static id nsapp;
|
|
||||||
|
|
||||||
/* setAppleMenu disappeared from the headers in 10.4 */
|
/* setAppleMenu disappeared from the headers in 10.4 */
|
||||||
@interface NSApplication(NSAppleMenu)
|
@interface NSApplication(NSAppleMenu)
|
||||||
- (void)setAppleMenu:(NSMenu *)menu;
|
- (void)setAppleMenu:(NSMenu *)menu;
|
||||||
|
@ -599,10 +598,6 @@ static StartupWindow *startwin = nil;
|
||||||
|
|
||||||
int startwin_open(void)
|
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;
|
if (startwin != nil) return 1;
|
||||||
|
|
||||||
startwin = [[StartupWindow alloc] init];
|
startwin = [[StartupWindow alloc] init];
|
||||||
|
@ -610,8 +605,6 @@ int startwin_open(void)
|
||||||
|
|
||||||
[startwin setupMessagesMode];
|
[startwin setupMessagesMode];
|
||||||
|
|
||||||
[nsapp finishLaunching];
|
|
||||||
|
|
||||||
[startwin center];
|
[startwin center];
|
||||||
[startwin makeKeyAndOrderFront:nil];
|
[startwin makeKeyAndOrderFront:nil];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue