mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
ioemu: Slown down refresh interval when SDL is minimized
as that saves us the VGA refresh scanning. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
This commit is contained in:
1 parent
35f1da7fb0
commit
635dc946fe
3 files changed
+15
-1
No files matched your search
@@ -518,6 +518,15 @@ static void sdl_refresh(DisplayState *ds)
|
||||
!ev->active.gain && !gui_fullscreen_initial_grab) {
|
||||
sdl_grab_end();
|
||||
}
|
||||
if (ev->active.state & SDL_APPACTIVE) {
|
||||
if (ev->active.gain) {
|
||||
/* Back to default interval */
|
||||
ds->gui_timer_interval = 0;
|
||||
} else {
|
||||
/* Sleeping interval */
|
||||
ds->gui_timer_interval = 500;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
+5
-1
@@ -6125,7 +6125,11 @@ QEMUMachine *find_machine(const char *name)
|
||||
void gui_update(void *opaque)
|
||||
{
|
||||
display_state.dpy_refresh(&display_state);
|
||||
qemu_mod_timer(gui_timer, GUI_REFRESH_INTERVAL + qemu_get_clock(rt_clock));
|
||||
qemu_mod_timer(gui_timer,
|
||||
(display_state.gui_timer_interval ?
|
||||
display_state.gui_timer_interval :
|
||||
GUI_REFRESH_INTERVAL)
|
||||
+ qemu_get_clock(rt_clock));
|
||||
}
|
||||
|
||||
struct vm_change_state_entry {
|
||||
|
||||
@@ -935,6 +935,7 @@ struct DisplayState {
|
||||
int width;
|
||||
int height;
|
||||
void *opaque;
|
||||
uint64_t gui_timer_interval;
|
||||
|
||||
int switchbpp;
|
||||
int shared_buf;
|
||||
|
||||