From 72ef919a26cdd738d03a07bfc61f64ab84b9a192 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 29 May 2008 15:45:21 +0100 Subject: [PATCH] Add ds->idle in console.h and sdl.c A few lost fragments of xen-unstable changeset 17607:3b20e543b52d40f76525a7e918fa347af2de00fe pvfb/ioemu: transmit refresh interval advice from backend to frontend which permits the frontend to avoid useless polls. Signed-off-by: Samuel Thibault --- console.h | 1 + sdl.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/console.h b/console.h index 9e6ddfcf8..55b0d5ed9 100644 --- a/console.h +++ b/console.h @@ -71,6 +71,7 @@ struct DisplayState { int height; void *opaque; uint64_t gui_timer_interval; + int idle; int shared_buf; diff --git a/sdl.c b/sdl.c index 45596fa65..7eb56afb6 100644 --- a/sdl.c +++ b/sdl.c @@ -693,9 +693,11 @@ static void sdl_refresh(DisplayState *ds) if (ev->active.gain) { /* Back to default interval */ ds->gui_timer_interval = 0; + ds->idle = 0; } else { /* Sleeping interval */ ds->gui_timer_interval = 500; + ds->idle = 1; } } break; -- 2.39.5