[AD] win32 screen change problem.

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


winXP
alg 4.1.14
screen driver  GFX_DIRECTX_WINDOWED


i have a situation where the user wishes to change the screen properties whilst my allegro application is still running.. the user is adding a second monitor, so the original screen properties W, H, Depth do not change.
the allegro window (still running on the original monitor) goes black..
i have moved the mouse over the window, that would cause a total screen redraw, but nothing occurs, nor does it crash.. so i can only presume that the ALLEGRO_SCREEN var is still OK, however nothing is visible.. therefore with my limited knowledge of how the directX surface scheme works in allegro i can only guess its that the directX surface is lost during the screen switch (when user turns on the dual monitor) and not able to be re-initialized or the allegro app has not attempted to re-initialize (or re-acquire) a new directX surface, possibly because it is unaware of it going missing ? ?

i have checked MSDN for info, and apparently applications receive the WM_DISPLAYCHANGE message with the W, H, Depth packed in the lParam and wParam. as the W,H,D of the original screen do not change, i am not sure if the app would receive the message, (problem 1).

if this is the case, possible solution would be for allegro to act on the WM_DISPLAYCHANGE message and re-acquire its directX surfaces.

however if the app never receives the WM_DISPLAYCHANGE message, possible due to the fact that W,H,D of the original monitor has not changed, how can i force the re-acquiring of the directX surfaces ?


aj.





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