Received: from eggs.gnu.org ([2001:4830:134:3::10]:35311)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from
) id 1ZPrOz-0007wn-5n
for qemu-devel@nongnu.org; Thu, 13 Aug 2015 08:14:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1ZPrOv-0007bg-9l
for qemu-devel@nongnu.org; Thu, 13 Aug 2015 08:14:33 -0400
Received: from mailout2.w1.samsung.com ([210.118.77.12]:35219)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1ZPrOv-0007af-3i
for qemu-devel@nongnu.org; Thu, 13 Aug 2015 08:14:29 -0400
Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244])
by mailout2.w1.samsung.com
(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5
2014)) with ESMTP id <0NT000AQUSO1AL20@mailout2.w1.samsung.com> for
qemu-devel@nongnu.org; Thu, 13 Aug 2015 13:14:25 +0100 (BST)
From: Pavel Fedin
References: <20150813120643.GF430@redhat.com>
In-reply-to: <20150813120643.GF430@redhat.com>
Date: Thu, 13 Aug 2015 15:14:24 +0300
Message-id: <017f01d0d5c1$981d8420$c8588c60$@samsung.com>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: quoted-printable
Content-language: ru
Subject: Re: [Qemu-devel] Win32 stdio not working if SDL is enabled
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: "'Daniel P. Berrange'" , qemu-devel@nongnu.org
Cc: 'Stefan Weil'
Hello!
> Looking at the code in vl.c I see a hack for SDL introduced in
>=20
> commit 59a36a2f6728081050afc6ec97d0018467999f79
> Author: Stefan Weil
> Date: Thu Jun 18 20:11:03 2009 +0200
>=20
> Win32: Fix compilation with SDL.
Just a hint which may have to do with this. Looks like SDL introduces =
its own entry point, but it's WinMain() instead of main(). In this case =
standard CRT setup is omitted. But it is very easy to recover in this =
case. Just call:
freopen("CONOUT$", "w", stderr);
This performs the necessary setup and relinks CRT's stderr with Windows =
console stream. It is a well known hack.
More info here: =
http://stackoverflow.com/questions/9020790/using-stdin-with-an-allocconso=
le
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia