diff --git a/softmmu/vl.c b/softmmu/vl.c index 9f33e526df..64b0330d57 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2719,10 +2719,6 @@ static void qemu_machine_creation_done(void) qdev_machine_creation_done(); -#ifdef XBOX - xemu_input_init(); -#endif - if (machine->cgs) { /* * Verify that Confidential Guest Support has actually been initialized diff --git a/ui/xemu.c b/ui/xemu.c index 401b8f2a92..d3fd6c7249 100644 --- a/ui/xemu.c +++ b/ui/xemu.c @@ -1561,6 +1561,12 @@ int main(int argc, char **argv) DPRINTF("Main thread: initializing app\n"); + qemu_mutex_lock_main_loop(); + qemu_mutex_lock_iothread(); + xemu_input_init(); + qemu_mutex_unlock_iothread(); + qemu_mutex_unlock_main_loop(); + while (1) { sdl2_gl_refresh(&sdl2_console[0].dcl); }