Commit 9467cd4602adfdacb457478d6aa074ea02652645

Authored by balrog
1 parent a90b7318

-show-cursor switch to inhibit SDL hiding cursor.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2763 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 3 changed files with 13 additions and 0 deletions
... ... @@ -236,6 +236,9 @@ static void sdl_update_caption(void)
236 236  
237 237 static void sdl_hide_cursor(void)
238 238 {
  239 + if (!cursor_hide)
  240 + return;
  241 +
239 242 if (kbd_mouse_is_absolute()) {
240 243 SDL_ShowCursor(1);
241 244 SDL_SetCursor(sdl_cursor_hidden);
... ... @@ -246,6 +249,9 @@ static void sdl_hide_cursor(void)
246 249  
247 250 static void sdl_show_cursor(void)
248 251 {
  252 + if (!cursor_hide)
  253 + return;
  254 +
249 255 if (!kbd_mouse_is_absolute()) {
250 256 SDL_ShowCursor(1);
251 257 if (guest_cursor &&
... ...
... ... @@ -189,6 +189,7 @@ const char *vnc_display;
189 189 int acpi_enabled = 1;
190 190 int fd_bootchk = 1;
191 191 int no_reboot = 0;
  192 +int cursor_hide = 1;
192 193 int graphic_rotate = 0;
193 194 int daemonize = 0;
194 195 const char *option_rom[MAX_OPTION_ROMS];
... ... @@ -6618,6 +6619,7 @@ enum {
6618 6619 QEMU_OPTION_vnc,
6619 6620 QEMU_OPTION_no_acpi,
6620 6621 QEMU_OPTION_no_reboot,
  6622 + QEMU_OPTION_show_cursor,
6621 6623 QEMU_OPTION_daemonize,
6622 6624 QEMU_OPTION_option_rom,
6623 6625 QEMU_OPTION_semihosting,
... ... @@ -6712,6 +6714,7 @@ const QEMUOption qemu_options[] = {
6712 6714 { "vmwarevga", 0, QEMU_OPTION_vmsvga },
6713 6715 { "no-acpi", 0, QEMU_OPTION_no_acpi },
6714 6716 { "no-reboot", 0, QEMU_OPTION_no_reboot },
  6717 + { "show-cursor", 0, QEMU_OPTION_show_cursor },
6715 6718 { "daemonize", 0, QEMU_OPTION_daemonize },
6716 6719 { "option-rom", HAS_ARG, QEMU_OPTION_option_rom },
6717 6720 #if defined(TARGET_ARM)
... ... @@ -7455,6 +7458,9 @@ int main(int argc, char **argv)
7455 7458 case QEMU_OPTION_no_reboot:
7456 7459 no_reboot = 1;
7457 7460 break;
  7461 + case QEMU_OPTION_show_cursor:
  7462 + cursor_hide = 0;
  7463 + break;
7458 7464 case QEMU_OPTION_daemonize:
7459 7465 daemonize = 1;
7460 7466 break;
... ...
... ... @@ -158,6 +158,7 @@ extern int kqemu_allowed;
158 158 extern int win2k_install_hack;
159 159 extern int usb_enabled;
160 160 extern int smp_cpus;
  161 +extern int cursor_hide;
161 162 extern int graphic_rotate;
162 163 extern int no_quit;
163 164 extern int semihosting_enabled;
... ...