sdl: improve error message on fatal error
commitb6034a399e37b6e6ff71b1def7c69d72a0e892b6
authorBjørn Mork <bjorn@mork.no>
Mon, 8 Mar 2010 12:07:14 +0000 (8 13:07 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 17 Mar 2010 15:41:38 +0000 (17 10:41 -0500)
tree6ad6d0d78645abde53a9690866be9fc19c7dc288
parentfd04a2aedae37dc9f481225f445d04bddd1590b0
sdl: improve error message on fatal error

The SDL_SetVideoMode() error condition is easily triggered by a user by
simply configure a guest with a host unsupported display resolution
and attempting to enable fullscreen.  Since the error is fatal, adding
a bit of debugging help can't harm.

Sample output with this change:

 (qemu) Could not open SDL display (1280x1024x32): No video mode large enough for 1280x1024

The width x height might seem redundant as SDL also provides it in
SDL_GetError(), but I believe there are situations where it is
useful.  I.e. if there is some other SDL error.  Anyway, redundant
information in fatal error messages has never harmed a single gerbil.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sdl.c