aboutsummaryrefslogtreecommitdiffstats
path: root/main.m
diff options
context:
space:
mode:
Diffstat (limited to 'main.m')
-rw-r--r--main.m12
1 files changed, 10 insertions, 2 deletions
diff --git a/main.m b/main.m
index 7b54de8..87e64c0 100644
--- a/main.m
+++ b/main.m
@@ -3,11 +3,21 @@
#import "Invert.h"
#import "DDHotKeyCenter.h"
+int register_hotkeys();
+
int main(int argc, const char * argv[]) {
[NSAutoreleasePool new];
[NSApplication sharedApplication];
+ int error_code = register_hotkeys();
+
+ [NSApp run];
+
+ return 0;
+}
+
+int register_hotkeys() {
Invert *invert = [[[Invert alloc] init] autorelease];
DDHotKeyCenter *c = [DDHotKeyCenter sharedHotKeyCenter];
@@ -32,7 +42,5 @@ int main(int argc, const char * argv[]) {
NSLog(@"Error registering hotkey");
}
- [NSApp run];
-
return 0;
}