diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-09 01:06:34 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-09 01:06:34 +0000 |
commit | 95219897ff4e6d0502b920c521fccc612ad913dd (patch) | |
tree | 424549557f9c83364ac83feddf0120fee9d2abe9 /cocoa.m | |
parent | 07435f7462e789a8df4718c9b2fc849b54446319 (diff) | |
download | qemu-95219897ff4e6d0502b920c521fccc612ad913dd.tar.gz qemu-95219897ff4e6d0502b920c521fccc612ad913dd.tar.bz2 qemu-95219897ff4e6d0502b920c521fccc612ad913dd.zip |
Allow multiple graphics devices.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1803 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cocoa.m')
-rw-r--r-- | cocoa.m | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -365,8 +365,8 @@ static void cocoa_refresh(DisplayState *ds) pool = [ [ NSAutoreleasePool alloc ] init ]; distantPast = [ NSDate distantPast ]; - if (is_active_console(vga_console)) - vga_update_display(); + vga_hw_update(); + do { event = [ NSApp nextEventMatchingMask:NSAnyEventMask untilDate:distantPast inMode: NSDefaultRunLoopMode dequeue:YES ]; @@ -382,7 +382,7 @@ static void cocoa_refresh(DisplayState *ds) /* emulate caps lock and num lock keydown and keyup */ kbd_put_keycode(keycode); kbd_put_keycode(keycode | 0x80); - } else if (is_active_console(vga_console)) { + } else if (is_graphic_console()) { if (keycode & 0x80) kbd_put_keycode(0xe0); if (modifiers_state[keycode] == 0) { @@ -429,15 +429,12 @@ static void cocoa_refresh(DisplayState *ds) /* toggle Monitor */ case 0x02 ... 0x0a: /* '1' to '9' keys */ console_select(keycode - 0x02); - if (is_active_console(vga_console)) { - /* tell the vga console to redisplay itself */ - vga_invalidate_display(); break; } } } else { /* handle standard key events */ - if (is_active_console(vga_console)) { + if (is_graphic_console()) { if (keycode & 0x80) //check bit for e0 in front kbd_put_keycode(0xe0); kbd_put_keycode(keycode & 0x7f); //remove e0 bit in front @@ -468,7 +465,7 @@ static void cocoa_refresh(DisplayState *ds) case NSKeyUp: { int keycode = cocoa_keycode_to_qemu([event keyCode]); - if (is_active_console(vga_console)) { + if (is_graphic_console()) { if (keycode & 0x80) kbd_put_keycode(0xe0); kbd_put_keycode(keycode | 0x80); //add 128 to signal release of key |