Revision 3bbbee18
b/qemu-common.h | ||
---|---|---|
132 | 132 |
|
133 | 133 |
#endif /* !defined(NEED_CPU_H) */ |
134 | 134 |
|
135 |
/* main function, renamed */ |
|
136 |
#if defined(CONFIG_COCOA) |
|
137 |
int qemu_main(int argc, char **argv, char **envp); |
|
138 |
#endif |
|
139 |
|
|
135 | 140 |
/* bottom halves */ |
136 | 141 |
typedef void QEMUBHFunc(void *opaque); |
137 | 142 |
|
b/ui/cocoa.m | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
|
25 | 25 |
#import <Cocoa/Cocoa.h> |
26 |
#include <crt_externs.h> |
|
26 | 27 |
|
27 | 28 |
#include "qemu-common.h" |
28 | 29 |
#include "console.h" |
... | ... | |
61 | 62 |
int bitsPerPixel; |
62 | 63 |
} QEMUScreen; |
63 | 64 |
|
64 |
int qemu_main(int argc, char **argv); // main defined in qemu/vl.c |
|
65 | 65 |
NSWindow *normalWindow; |
66 | 66 |
id cocoaView; |
67 | 67 |
static DisplayChangeListener *dcl; |
... | ... | |
794 | 794 |
COCOA_DEBUG("QemuCocoaAppController: startEmulationWithArgc\n"); |
795 | 795 |
|
796 | 796 |
int status; |
797 |
status = qemu_main(argc, argv); |
|
797 |
status = qemu_main(argc, argv, *_NSGetEnviron());
|
|
798 | 798 |
exit(status); |
799 | 799 |
} |
800 | 800 |
|
... | ... | |
877 | 877 |
!strcmp(opt, "-nographic") || |
878 | 878 |
!strcmp(opt, "-version") || |
879 | 879 |
!strcmp(opt, "-curses")) { |
880 |
return qemu_main(gArgc, gArgv); |
|
880 |
return qemu_main(gArgc, gArgv, *_NSGetEnviron());
|
|
881 | 881 |
} |
882 | 882 |
} |
883 | 883 |
} |
Also available in: Unified diff