mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 23:32:04 +00:00
Added ability to run without application bundle
You just need executable, zdoom.pk3 and IWAD
This commit is contained in:
parent
398b36064b
commit
65ce06f274
1 changed files with 22 additions and 0 deletions
|
@ -119,6 +119,21 @@ enum
|
||||||
|
|
||||||
#endif // prior to 10.5
|
#endif // prior to 10.5
|
||||||
|
|
||||||
|
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
NSApplicationActivationPolicyRegular
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef NSInteger NSApplicationActivationPolicy;
|
||||||
|
|
||||||
|
@interface NSApplication(ActivationPolicy)
|
||||||
|
- (BOOL)setActivationPolicy:(NSApplicationActivationPolicy)activationPolicy;
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif // prior to 10.6
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
// Avoid collision between DObject class and Objective-C
|
// Avoid collision between DObject class and Objective-C
|
||||||
|
@ -2109,6 +2124,13 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
[NSApplication sharedApplication];
|
[NSApplication sharedApplication];
|
||||||
|
|
||||||
|
// The following code isn't mandatory,
|
||||||
|
// but it enables to run the application without a bundle
|
||||||
|
if ([NSApp respondsToSelector:@selector(setActivationPolicy:)])
|
||||||
|
{
|
||||||
|
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
|
||||||
|
}
|
||||||
|
|
||||||
CreateMenu();
|
CreateMenu();
|
||||||
|
|
||||||
appCtrl = [ApplicationController new];
|
appCtrl = [ApplicationController new];
|
||||||
|
|
Loading…
Reference in a new issue