Revision 95219897 cocoa.m
b/cocoa.m | ||
---|---|---|
365 | 365 |
pool = [ [ NSAutoreleasePool alloc ] init ]; |
366 | 366 |
distantPast = [ NSDate distantPast ]; |
367 | 367 |
|
368 |
if (is_active_console(vga_console))
|
|
369 |
vga_update_display(); |
|
368 |
vga_hw_update();
|
|
369 |
|
|
370 | 370 |
do { |
371 | 371 |
event = [ NSApp nextEventMatchingMask:NSAnyEventMask untilDate:distantPast |
372 | 372 |
inMode: NSDefaultRunLoopMode dequeue:YES ]; |
... | ... | |
382 | 382 |
/* emulate caps lock and num lock keydown and keyup */ |
383 | 383 |
kbd_put_keycode(keycode); |
384 | 384 |
kbd_put_keycode(keycode | 0x80); |
385 |
} else if (is_active_console(vga_console)) {
|
|
385 |
} else if (is_graphic_console()) {
|
|
386 | 386 |
if (keycode & 0x80) |
387 | 387 |
kbd_put_keycode(0xe0); |
388 | 388 |
if (modifiers_state[keycode] == 0) { |
... | ... | |
429 | 429 |
/* toggle Monitor */ |
430 | 430 |
case 0x02 ... 0x0a: /* '1' to '9' keys */ |
431 | 431 |
console_select(keycode - 0x02); |
432 |
if (is_active_console(vga_console)) { |
|
433 |
/* tell the vga console to redisplay itself */ |
|
434 |
vga_invalidate_display(); |
|
435 | 432 |
break; |
436 | 433 |
} |
437 | 434 |
} |
438 | 435 |
} else { |
439 | 436 |
/* handle standard key events */ |
440 |
if (is_active_console(vga_console)) {
|
|
437 |
if (is_graphic_console()) {
|
|
441 | 438 |
if (keycode & 0x80) //check bit for e0 in front |
442 | 439 |
kbd_put_keycode(0xe0); |
443 | 440 |
kbd_put_keycode(keycode & 0x7f); //remove e0 bit in front |
... | ... | |
468 | 465 |
case NSKeyUp: |
469 | 466 |
{ |
470 | 467 |
int keycode = cocoa_keycode_to_qemu([event keyCode]); |
471 |
if (is_active_console(vga_console)) {
|
|
468 |
if (is_graphic_console()) {
|
|
472 | 469 |
if (keycode & 0x80) |
473 | 470 |
kbd_put_keycode(0xe0); |
474 | 471 |
kbd_put_keycode(keycode | 0x80); //add 128 to signal release of key |
Also available in: Unified diff