[SDL] Bug in resizing window in win32 ?

Gabriele Greco gabriele.greco at darts.it
Mon Sep 22 02:57:56 PDT 2008


On Mon, Sep 22, 2008 at 8:27 AM, Paolo Minazzi <paolo.minazzi at gmail.com>wrote:

> Liam, thanks for your interest.
> I have studied my problem and I realize that resizing SDL window has
> to be done when SDL_Poll is not running. This solve one problem.
> The other problem occour when pass from iconify-window to "normal
> window) (on the screen).
> If during this step I change resolution (this is my test) I have problem.
> I understand that this is a very very very strange case and noone use it.
> I was doing this test to verify some race condition problem.
>

The fact is that SDL video API calls should be performed on the main thread,
the fact it may work if something else doesn't occur it may be true on
windows but not on other archs or with other versions of SDL, I suggest you
to build a SDL userevent in your thread and let the main thread perform the
Flip call in his loop.

Also be sure to use software surfaces, otherwise in HW surfaces "pixels" can
be null if surface is not locked, and you cannot lock a surface if you are
not the video thread owner...

--
Bye,
 Gabry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080922/d4b4e9ee/attachment.htm>


More information about the SDL mailing list