qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] cocoa.m issues fixed
@ 2009-06-21  1:19 G 3
  2009-06-21 10:10 ` Andreas Färber
  0 siblings, 1 reply; 9+ messages in thread
From: G 3 @ 2009-06-21  1:19 UTC (permalink / raw)
  To: qemu-devel

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  <programmingkidx@gmail.com>
--- 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 );

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-06-22 18:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-21  1:19 [Qemu-devel] [PATCH] cocoa.m issues fixed G 3
2009-06-21 10:10 ` Andreas Färber
2009-06-21 14:06   ` G 3
2009-06-21 15:23     ` Avi Kivity
2009-06-21 18:07       ` Blue Swirl
2009-06-21 18:16         ` Avi Kivity
2009-06-22 17:05         ` Stuart Brady
2009-06-22 17:35           ` Blue Swirl
2009-06-22 18:47             ` Stuart Brady

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).