[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] cocoa.m issues fixed
From: |
G 3 |
Subject: |
[Qemu-devel] [PATCH] cocoa.m issues fixed |
Date: |
Sat, 20 Jun 2009 21:19:32 -0400 |
This patch allows the file cocoa.m to compile under Mac OS 10.3.
MAC_OS_X_VERSION_10_4 isn't defined under Mac OS 10.3. The #define will
define it. The method cStringUsingEncoding isn't defined under Mac OS
10.3, so I used a similar function that does work.
Signed-off-by: programmingkid <address@hidden>
--- cocoa.m Wed May 20 16:46:58 2009
+++ cocoa (edited).m Sat Jun 20 20:57:41 2009
@@ -28,6 +28,13 @@
#include "console.h"
#include "sysemu.h"
+#ifndef MAC_OS_X_VERSION_10_4
+#define MAC_OS_X_VERSION_10_4 1040
+#endif
+
+#ifndef __LITTLE_ENDIAN__
+#define __LITTLE_ENDIAN__ 0 /* assume PowerPC*/
+#endif
//#define DEBUG
@@ -55,6 +62,8 @@
} QEMUScreen;
int qemu_main(int argc, char **argv); // main defined in qemu/vl.c
+int cocoa_keycode_to_qemu(int keycode);
+
NSWindow *normalWindow;
id cocoaView;
static DisplayChangeListener *dcl;
@@ -783,8 +792,8 @@
if(returnCode == NSCancelButton) {
exit(0);
} else if(returnCode == NSOKButton) {
- char *bin = "qemu";
- char *img = (char*)[ [ sheet filename ]
cStringUsingEncoding:NSASCIIStringEncoding];
+ char bin[5] = "qemu";
+ char *img = (char*)[ [ sheet filename ] cString];
char **argv = (char**)malloc( sizeof(char*)*3 );
- [Qemu-devel] [PATCH] cocoa.m issues fixed,
G 3 <=
- Re: [Qemu-devel] [PATCH] cocoa.m issues fixed, Andreas Färber, 2009/06/21
- Re: [Qemu-devel] [PATCH] cocoa.m issues fixed, G 3, 2009/06/21
- Re: [Qemu-devel] [PATCH] cocoa.m issues fixed, Avi Kivity, 2009/06/21
- Re: [Qemu-devel] [PATCH] cocoa.m issues fixed, Blue Swirl, 2009/06/21
- Re: [Qemu-devel] [PATCH] cocoa.m issues fixed, Avi Kivity, 2009/06/21
- Re: [Qemu-devel] [PATCH] cocoa.m issues fixed, Stuart Brady, 2009/06/22
- Re: [Qemu-devel] [PATCH] cocoa.m issues fixed, Blue Swirl, 2009/06/22
- Re: [Qemu-devel] [PATCH] cocoa.m issues fixed, Stuart Brady, 2009/06/22