* [Qemu-devel] [PATCH] Work around stdio redirection by SDL on Windows
@ 2009-08-09 12:06 Sebastian Herbszt
2009-08-09 12:26 ` [Qemu-devel] " Filip Navara
0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Herbszt @ 2009-08-09 12:06 UTC (permalink / raw)
To: Filip Navara, qemu-devel
Work around no longer working console output with SDL on Windows.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
--- v0.11.0-rc0-201-gd9c3231/vl.c.orig Sun Aug 9 11:52:47 2009
+++ v0.11.0-rc0-201-gd9c3231/vl.c Sun Aug 9 11:58:59 2009
@@ -4873,6 +4873,12 @@
CPUState *env;
int show_vnc_port = 0;
+/* Work around stdio redirection by SDL on Windows */
+#if defined (CONFIG_SDL) && defined (_WIN32)
+ freopen("CON", "wb", stdout);
+ freopen("CON", "wb", stderr);
+#endif
+
qemu_cache_utils_init(envp);
LIST_INIT (&vm_change_state_head);
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH] Work around stdio redirection by SDL on Windows
2009-08-09 12:06 [Qemu-devel] [PATCH] Work around stdio redirection by SDL on Windows Sebastian Herbszt
@ 2009-08-09 12:26 ` Filip Navara
2009-08-09 22:00 ` Sebastian Herbszt
0 siblings, 1 reply; 3+ messages in thread
From: Filip Navara @ 2009-08-09 12:26 UTC (permalink / raw)
To: Sebastian Herbszt; +Cc: qemu-devel
On Sun, Aug 9, 2009 at 2:06 PM, Sebastian Herbszt<herbszt@gmx.de> wrote:
> Work around no longer working console output with SDL on Windows.
>
> Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
>
> --- v0.11.0-rc0-201-gd9c3231/vl.c.orig Sun Aug 9 11:52:47 2009
> +++ v0.11.0-rc0-201-gd9c3231/vl.c Sun Aug 9 11:58:59 2009
> @@ -4873,6 +4873,12 @@
> CPUState *env;
> int show_vnc_port = 0;
>
> +/* Work around stdio redirection by SDL on Windows */
> +#if defined (CONFIG_SDL) && defined (_WIN32)
> + freopen("CON", "wb", stdout);
> + freopen("CON", "wb", stderr);
> +#endif
> +
That will not work in RXVT, SSH consoles and for pipes unfortunately
:-/ Also it won't respect the redirections specified on command line,
which is something I often use, therefore I object to this patch. It's
better to use SDL compiled with the --enable-stdio-redirect=no option.
Best regards,
Filip Navara
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH] Work around stdio redirection by SDL on Windows
2009-08-09 12:26 ` [Qemu-devel] " Filip Navara
@ 2009-08-09 22:00 ` Sebastian Herbszt
0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Herbszt @ 2009-08-09 22:00 UTC (permalink / raw)
To: Filip Navara; +Cc: qemu-devel
Filip Navara wrote:
>> Sebastian Herbszt wrote:
>> --- v0.11.0-rc0-201-gd9c3231/vl.c.orig Sun Aug 9 11:52:47 2009
>> +++ v0.11.0-rc0-201-gd9c3231/vl.c Sun Aug 9 11:58:59 2009
>> @@ -4873,6 +4873,12 @@
>> CPUState *env;
>> int show_vnc_port = 0;
>>
>> +/* Work around stdio redirection by SDL on Windows */
>> +#if defined (CONFIG_SDL) && defined (_WIN32)
>> + freopen("CON", "wb", stdout);
>> + freopen("CON", "wb", stderr);
>> +#endif
>> +
>
> That will not work in RXVT, SSH consoles and for pipes unfortunately
> :-/ Also it won't respect the redirections specified on command line,
> which is something I often use, therefore I object to this patch. It's
> better to use SDL compiled with the --enable-stdio-redirect=no option.
Too bad this work around is a no go. At least for me it's good enough to
make qemu usable again.
I hope the need for a custom SDL will at least get properly documented since
this is a big regression for Windows users.
- Sebastian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-09 22:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-09 12:06 [Qemu-devel] [PATCH] Work around stdio redirection by SDL on Windows Sebastian Herbszt
2009-08-09 12:26 ` [Qemu-devel] " Filip Navara
2009-08-09 22:00 ` Sebastian Herbszt
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).