forked from avibrazil/RDM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.m
More file actions
43 lines (31 loc) · 1.11 KB
/
Copy pathmain.m
File metadata and controls
43 lines (31 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import "SRApplicationDelegate.h"
#import "cmdline.h"
int main(int argc, char* argv[])
{
int ret = -1;
if(argc > 1)
{
ret = cmdline_main(argc, argv);
}
if(ret == -1)
{
fprintf(stderr, "Commandline options\n"
" --width (-w) Width\n"
" --height (-h) Height\n"
" --freq (-f) Frequency (in Hz, e.g. 30 or 60, default=not specified)\n"
" --scale (-s) Scale (2.0 = Retina, default=current)\n"
" --bits (-b) Color depth (default=current)\n"
" --display (-d) Select display # (default=main)\n"
" --displays (-l) List available displays\n"
" --modes (-m) List available modes\n"
"\nCurrently running GUI. Use ^C or close from menu\n");
NSAutoreleasePool* pool = [NSAutoreleasePool new];
NSApplication* app = [NSApplication sharedApplication];
[app setDelegate: [SRApplicationDelegate new]];
//NSApplication* app = [SRApplication sharedApplication];
[app performSelectorOnMainThread: @selector(run) withObject: nil waitUntilDone: YES];
[pool release];
}
}