ui/cocoa.m: Fix recent compile breakage
Fix failures to compile introduced by recent console commits 1dbfa00503, 81c0d5a6) which removed is_graphic_console() and vga_hw_update() without updating the cocoa UI backend to match. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
		
							parent
							
								
									089305ac0a
								
							
						
					
					
						commit
						68c0aa6e02
					
				@ -495,7 +495,7 @@ QemuCocoaView *cocoaView;
 | 
				
			|||||||
                if (keycode == 58 || keycode == 69) { // emulate caps lock and num lock keydown and keyup
 | 
					                if (keycode == 58 || keycode == 69) { // emulate caps lock and num lock keydown and keyup
 | 
				
			||||||
                    kbd_put_keycode(keycode);
 | 
					                    kbd_put_keycode(keycode);
 | 
				
			||||||
                    kbd_put_keycode(keycode | 0x80);
 | 
					                    kbd_put_keycode(keycode | 0x80);
 | 
				
			||||||
                } else if (is_graphic_console()) {
 | 
					                } else if (qemu_console_is_graphic(NULL)) {
 | 
				
			||||||
                    if (keycode & 0x80)
 | 
					                    if (keycode & 0x80)
 | 
				
			||||||
                        kbd_put_keycode(0xe0);
 | 
					                        kbd_put_keycode(0xe0);
 | 
				
			||||||
                    if (modifiers_state[keycode] == 0) { // keydown
 | 
					                    if (modifiers_state[keycode] == 0) { // keydown
 | 
				
			||||||
@ -535,7 +535,7 @@ QemuCocoaView *cocoaView;
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // handle keys for graphic console
 | 
					            // handle keys for graphic console
 | 
				
			||||||
            } else if (is_graphic_console()) {
 | 
					            } else if (qemu_console_is_graphic(NULL)) {
 | 
				
			||||||
                if (keycode & 0x80) //check bit for e0 in front
 | 
					                if (keycode & 0x80) //check bit for e0 in front
 | 
				
			||||||
                    kbd_put_keycode(0xe0);
 | 
					                    kbd_put_keycode(0xe0);
 | 
				
			||||||
                kbd_put_keycode(keycode & 0x7f); //remove e0 bit in front
 | 
					                kbd_put_keycode(keycode & 0x7f); //remove e0 bit in front
 | 
				
			||||||
@ -578,7 +578,7 @@ QemuCocoaView *cocoaView;
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
        case NSKeyUp:
 | 
					        case NSKeyUp:
 | 
				
			||||||
            keycode = cocoa_keycode_to_qemu([event keyCode]);
 | 
					            keycode = cocoa_keycode_to_qemu([event keyCode]);
 | 
				
			||||||
            if (is_graphic_console()) {
 | 
					            if (qemu_console_is_graphic(NULL)) {
 | 
				
			||||||
                if (keycode & 0x80)
 | 
					                if (keycode & 0x80)
 | 
				
			||||||
                    kbd_put_keycode(0xe0);
 | 
					                    kbd_put_keycode(0xe0);
 | 
				
			||||||
                kbd_put_keycode(keycode | 0x80); //add 128 to signal release of key
 | 
					                kbd_put_keycode(keycode | 0x80); //add 128 to signal release of key
 | 
				
			||||||
@ -1006,7 +1006,7 @@ static void cocoa_refresh(DisplayChangeListener *dcl)
 | 
				
			|||||||
            [cocoaView handleEvent:event];
 | 
					            [cocoaView handleEvent:event];
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    } while(event != nil);
 | 
					    } while(event != nil);
 | 
				
			||||||
    vga_hw_update();
 | 
					    graphic_hw_update(NULL);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void cocoa_cleanup(void)
 | 
					static void cocoa_cleanup(void)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user