Maybe fix the mac build without breakpad
This commit is contained in:
parent
1338ae7c7d
commit
f2ddc92a0d
@ -1,9 +1,12 @@
|
|||||||
#import <AppKit/NSApplication.h>
|
#import <AppKit/NSApplication.h>
|
||||||
|
|
||||||
#import <Breakpad/Breakpad.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_BREAKPAD
|
||||||
|
#import <Breakpad/Breakpad.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
class PlatformInterface;
|
class PlatformInterface;
|
||||||
|
|
||||||
#ifdef SNOW_LEOPARD
|
#ifdef SNOW_LEOPARD
|
||||||
@ -14,7 +17,9 @@ class PlatformInterface;
|
|||||||
PlatformInterface* application_handler_;
|
PlatformInterface* application_handler_;
|
||||||
NSMenu* dock_menu_;
|
NSMenu* dock_menu_;
|
||||||
|
|
||||||
|
#ifdef HAVE_BREAKPAD
|
||||||
BreakpadRef breakpad_;
|
BreakpadRef breakpad_;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithHandler: (PlatformInterface*)handler;
|
- (id) initWithHandler: (PlatformInterface*)handler;
|
||||||
|
@ -68,6 +68,7 @@
|
|||||||
- (void) mediaKeyEvent: (int)key state: (BOOL)state repeat: (BOOL)repeat;
|
- (void) mediaKeyEvent: (int)key state: (BOOL)state repeat: (BOOL)repeat;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#ifdef HAVE_BREAKPAD
|
||||||
static bool BreakpadCallback(int, int, mach_port_t, void*) {
|
static bool BreakpadCallback(int, int, mach_port_t, void*) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -83,6 +84,7 @@ static BreakpadRef InitBreakpad() {
|
|||||||
[pool release];
|
[pool release];
|
||||||
return breakpad;
|
return breakpad;
|
||||||
}
|
}
|
||||||
|
#endif // HAVE_BREAKPAD
|
||||||
|
|
||||||
@implementation AppDelegate
|
@implementation AppDelegate
|
||||||
|
|
||||||
@ -96,7 +98,11 @@ static BreakpadRef InitBreakpad() {
|
|||||||
|
|
||||||
- (id) initWithHandler: (PlatformInterface*)handler {
|
- (id) initWithHandler: (PlatformInterface*)handler {
|
||||||
application_handler_ = handler;
|
application_handler_ = handler;
|
||||||
|
|
||||||
|
#ifdef HAVE_BREAKPAD
|
||||||
breakpad_ = InitBreakpad();
|
breakpad_ = InitBreakpad();
|
||||||
|
#endif
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +132,9 @@ static BreakpadRef InitBreakpad() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication*) sender {
|
- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication*) sender {
|
||||||
|
#ifdef HAVE_BREAKPAD
|
||||||
BreakpadRelease(breakpad_);
|
BreakpadRelease(breakpad_);
|
||||||
|
#endif
|
||||||
return NSTerminateNow;
|
return NSTerminateNow;
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user