fheroes2 icon indicating copy to clipboard operation
fheroes2 copied to clipboard

Program screen goes completely black after the program is minimized in taskbar and then brought to the foreground

Open LeHerosInconnu opened this issue 2 years ago • 8 comments

Preliminary checks

Platform

Windows

Describe the bug

In windowed mode (when a View spell is active or the View World screen is used), when the game window is minimized in the taskbar, then the game is brought to the foreground (by clicking on the game icon in the taskbar), the game window is completely black (or sometimes completely white). It is necessary to switch to another program (by clicking its icon in the taskbar) and then return to the game window (again by clicking its icon in the taskbar) so that the content of the window is displayed correctly.

In fheroes2:

View spells 001

View spells 002

Save file

Not needed.

Additional info

Related closed issue: https://github.com/ihhub/fheroes2/issues/3392.

LeHerosInconnu avatar Oct 24 '22 11:10 LeHerosInconnu

This is a different OS (Linux), but it might be relevant: https://github.com/ihhub/fheroes2/issues/4770

zenseii avatar Oct 24 '22 12:10 zenseii

Interesting, I was not able to reproduce this issue so far using the "View World" screen. Is this observed with SDL1 or SDL2? What resolution is set in the game?

oleg-derevenetz avatar Oct 24 '22 12:10 oleg-derevenetz

Hello @oleg-derevenetz,

Interesting, I was not able to reproduce this issue so far using the "View World" screen. Is this observed with SDL1 or SDL2? What resolution is set in the game?

Windows 7 - 64 bits - SDL2 - 640 x 480

LeHerosInconnu avatar Oct 24 '22 15:10 LeHerosInconnu

I tested this on my 32-bit Win 7 SDL2 and I was able to replicate it. I had version 0.9.14 on the same PC and it did not show this behavior when restoring from minimized. It did not happen on my Win 10 device.

zenseii avatar Oct 24 '22 16:10 zenseii

These symptoms indicate that we do not refresh frame for this dialog. I think we can come up with something simple and efficient at the same time by calling an internal sdl function to refresh screen.

ihhub avatar Oct 25 '22 01:10 ihhub

Hi @LeHerosInconnu , can you please test the latest build to se if the issue is gone?

ihhub avatar Nov 20 '22 11:11 ihhub

Hi, @ihhub. I tested this on my win 7 x86 setup with latest SDL2 snapshot and the problem was still reproducible.

zenseii avatar Nov 20 '22 15:11 zenseii

Hello @ihhub,

Hi @LeHerosInconnu , can you please test the latest build to se if the issue is gone?

This is still the case on Windows 7 - 64 bits - SDL2 - 640 x 480, with version 0.9.21 6251.

LeHerosInconnu avatar Nov 26 '22 18:11 LeHerosInconnu

Hi, @ihhub. I tested this on my win 7 x86 setup with latest SDL2 snapshot and the problem was still reproducible.

Could you please run the engine in debug mode and then attach the log file? I would like to see if there is something related to SDL.

ihhub avatar Aug 22 '23 12:08 ihhub