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