qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: "Bjørn Mork" <bjorn@mork.no>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] sdl: improve error message on fatal error
Date: Wed, 17 Mar 2010 10:59:25 -0500	[thread overview]
Message-ID: <4BA0FC5D.9040806@codemonkey.ws> (raw)
In-Reply-To: <1268050034-7376-1-git-send-email-bjorn@mork.no>

On 03/08/2010 06:07 AM, Bjørn Mork wrote:
> 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>
>    
Applied.  Thanks.

Regards,

Anthony Liguori
> ---
>   sdl.c |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/sdl.c b/sdl.c
> index f26035c..34061c0 100644
> --- a/sdl.c
> +++ b/sdl.c
> @@ -112,7 +112,8 @@ static void do_sdl_resize(int new_width, int new_height, int bpp)
>       height = new_height;
>       real_screen = SDL_SetVideoMode(width, height, bpp, flags);
>       if (!real_screen) {
> -        fprintf(stderr, "Could not open SDL display\n");
> +	fprintf(stderr, "Could not open SDL display (%dx%dx%d): %s\n", width,
> +		height, bpp, SDL_GetError());
>           exit(1);
>       }
>   }
>    

      parent reply	other threads:[~2010-03-17 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08 12:07 [Qemu-devel] [PATCH] sdl: improve error message on fatal error Bjørn Mork
2010-03-08 19:50 ` Stefan Weil
2010-03-17 15:59 ` Anthony Liguori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BA0FC5D.9040806@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=bjorn@mork.no \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).