Re: [AD] windows resizing regression

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]




On 07/11/2010 3:19 PM, Peter Wang wrote:
I only did a quick test right now, but it seems to have worked
on ex_resize(d3d), ex_resize2 and speed.

ex_fs_window still has the problem I described.

ex_resize(opengl) is problematic as you said.

Sorry, I misread that as ex_fs_resize not ex_fs_window the other day.
The bug is in the example. It was always intended that al_acknowledge
resize was needed after an al_resize_display. All of the other examples
that use it call al_acknowledge resize. Simple patch attached.

When running in MSVC I get three messages of the form:

     The thread 'Win32 Thread' (0xd34) has exited with code 0 (0x0).

every time a window changes size.  Are we creating and destroying
threads on every resize, or is it something else?

Shouldn't be AFAIK. All that happens on the D3D end is the window is
reized and the device is reset. Could be wrong.

Trent
Index: ex_fs_window.c
===================================================================
--- ex_fs_window.c	(revision 13882)
+++ ex_fs_window.c	(working copy)
@@ -53,6 +53,10 @@
       while (al_get_next_event(queue, &event)) {
          if (event.type == ALLEGRO_EVENT_DISPLAY_CLOSE)
             quit = true;
+	 else if (event.type == ALLEGRO_EVENT_DISPLAY_RESIZE) {
+            ALLEGRO_DISPLAY_EVENT *de = &event.display;
+            al_acknowledge_resize(de->source);
+	 }
          else if (event.type == ALLEGRO_EVENT_KEY_DOWN) {
             if (event.keyboard.keycode == ALLEGRO_KEY_ESCAPE)
                quit = true;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/