qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [RFC][PATCH] Add HPET emulation to qemu (v2)


From: Jamie Lokier
Subject: Re: [Qemu-devel] Re: [RFC][PATCH] Add HPET emulation to qemu (v2)
Date: Sun, 10 Aug 2008 17:52:14 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Samuel Thibault wrote:
> Jamie Lokier, le Sun 10 Aug 2008 02:19:01 +0100, a écrit :
> > Samuel Thibault wrote:
> > > Beth Kon wrote some time ago:
> > > > But for an idle guest in both cases (with and without HPET), the
> > > > number of wakeups per second was relatively low (28).
> > > 
> > > Oh, btw, did you try to reduce the qemu window? (or disconnect the VNC
> > > client if you are using VNC)  28 might be just because of the gui refresh
> > > rate.  Reducing the window will lower the gui refresh rate to 2Hz.
> > 
> > If the guest isn't drawing anything to video memory, and there are no
> > GUI events (e.g. redraw requests), why does the gui keep refreshing?
> 
> It needs to poll the keyboard activity at least, IIRC SDL doesn't
> provide the X FD to poll.

Apparently it does.

See http://listas.apesol.org/pipermail/sdl-libsdl.org/2008-May/065133.html
which says:

    > 2. add a new API call to SDL to access the low-level descriptor to
    >   talk directly with the graphic server (X11 or other).  This is
    >   powerful in that it opens the way to all sort of manipulations
    >   of the graphic server, however it requires backend-specific
    >   code in the SDL application to do what one needs;

    SDL_GetWMInfo() can get you the Xlib Display* (have a look at what
    else is there). Make sure to read the documentation about the
    SDL_VERSION() bit, it's quite important!

    You'll probably then have to enable SDL_SysWMEvent and handle them to
    get at the X11 events, if I understand this correctly (I haven't done
    the specific thing you want, I get the Display* and hack other
    things).

The followup message says "thanks, that worked".

It should work in Windows, too, except you'll get a Windows HANDLE
which you wait on in a different way than unix.

-- Jamie




reply via email to

[Prev in Thread] Current Thread [Next in Thread]