From ca9505992288636908169d0389087b3ca5277d07 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Wed, 27 Apr 2011 12:26:15 +0200 Subject: Fix -qemu -vnc startup. Starting the emulator with something like "-qemu -vnc :1" didn't result in a valid boot sequence, due to the way our "hw-control" service is initialized. This patch fixes the issue. Note however that since a VNC client cannot send proper touch events, it can only be used as a viewer at the moment. Change-Id: Ib9b60ff7028892368547bff89b84f580344c2edd --- android/hw-control.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'android/hw-control.c') diff --git a/android/hw-control.c b/android/hw-control.c index 9180383..8164bc0 100644 --- a/android/hw-control.c +++ b/android/hw-control.c @@ -128,11 +128,23 @@ hw_control_init( HwControl* control, NULL, NULL); } +const AndroidHwControlFuncs defaultControls = { + NULL, +}; + +static HwControl hwstate[1]; + void -android_hw_control_init( void* opaque, const AndroidHwControlFuncs* funcs ) +android_hw_control_init( void ) { - static HwControl hwstate[1]; - - hw_control_init(hwstate, opaque, funcs); + hw_control_init(hwstate, NULL, &defaultControls); D("%s: hw-control qemud handler initialized", __FUNCTION__); } + +void +android_hw_control_set( void* opaque, const AndroidHwControlFuncs* funcs ) +{ + hwstate->client = opaque; + hwstate->client_funcs = funcs[0]; +} + -- cgit v1.1