The International Simutrans Forum

 

Author Topic: Deleting a save minimizes Simutrans  (Read 161 times)

0 Members and 1 Guest are viewing this topic.

Offline Roboron

  • *
  • Posts: 125
    • Las Galácticas Aventuras de Komoyo Diga
  • Languages: ES, EN
Deleting a save minimizes Simutrans
« on: October 15, 2020, 08:01:32 PM »
This bug was originally reported on Steam

OS: Windows 10 (not reproducible on linux)
pakset: pak128.german (not all paksets have this funcionality)
Other settings: Full screen

Steps to reproduce:
1. Open the game in fullscreen
2. Delete an existing save
This action minimizes the game (but it shouldn't).

When not in fullscreen, it seems like Simutrans loses the focus for a brief moment.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10215
  • Languages: De,EN,JP
Re: Deleting a save minimizes Simutrans
« Reply #1 on: October 16, 2020, 12:18:21 AM »
You can enable this by setting show_delete_buttons = 1 in simuconf.tab

The minimisation is done by "SHFileOperationW" I have no idea why, because the confirmation flag is set to zero. Seems like a bug in windows. Another reson not to enable this feature.

I add a hacky workaround for this by retopping the active window. It will cause an ugly flickker and may not even work on other situations.



« Last Edit: October 16, 2020, 12:50:41 AM by prissi »

Offline Roboron

  • *
  • Posts: 125
    • Las Galácticas Aventuras de Komoyo Diga
  • Languages: ES, EN
Re: Deleting a save minimizes Simutrans
« Reply #2 on: October 17, 2020, 09:19:51 PM »
Thank you, this fix will be very appreciated by Steam users which rely on this for deleting gamesaves, when Cloud Save is enabled.

Offline Roboron

  • *
  • Posts: 125
    • Las Galácticas Aventuras de Komoyo Diga
  • Languages: ES, EN
Re: Deleting a save minimizes Simutrans
« Reply #3 on: October 18, 2020, 09:23:09 AM »
Sorry, one more thing a user said:

Quote
thx, have read your simutrans forum post and since windows vista the SHFileOperation is replaced by IFileOperation

Maybe this can help you improve the solution.