liballeg / allegro5

The official Allegro 5 git repository. Pull requests welcome!
https://liballeg.org
Other
1.9k stars 285 forks source link

`ALLEGRO_FULLSCREEN_WINDOWED` does not work properly on Windows (OpenGL) #1582

Open alemart opened 2 months ago

alemart commented 2 months ago

ALLEGRO_FULLSCREEN_WINDOWED does not work properly when using the OpenGL backend on Windows.

Changing the display mode from windowed to fullscreen_windowed works as expected, but changing it back to windowed doesn't. Graphics are displayed at the bottom left corner of the screen.

Here is a video of one of my users experiencing the issue in ex_fs_window. Not all users experience this problem. The user who does has an Intel HD Graphics 2500 card and uses Windows 10.

https://github.com/user-attachments/assets/e12c41c8-f78a-44e0-b4f5-cc04e80db011

ex_fs_window was changed slightly, so that:

al_set_new_display_flags(ALLEGRO_FULLSCREEN_WINDOW);

was replaced by

al_set_new_display_flags(ALLEGRO_WINDOWED | ALLEGRO_OPENGL | ALLEGRO_PROGRAMMABLE_PIPELINE);

The example works fine with the Direct3D backend. The issue is possibly related to the OpenGL backend interacting with Intel drivers.

Related to #415

SiegeLord commented 2 months ago

What version are you using?

alemart commented 2 months ago

Allegro 5.2.9.1

I can't reproduce the issue on my own machine.

SiegeLord commented 2 months ago

Is it possible to get them to try a build from master? There have been some fixes on that part of the code recently.

alemart commented 2 months ago

Yes. I built it from master. The user just reported that the issue persists. I'm attaching allegro.log.

SiegeLord commented 1 month ago

Yeah, I can't seem to reproduce this. I had a different issue with those flags set, which I fixed in https://github.com/liballeg/allegro5/commit/fd9b8199177f96a9e8a00d0e46166f7822a334bb