libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.34k stars 1.84k forks source link

Automatic Save States with Thumbnails Enabled is Inconsistent. #4908

Open 132ikl opened 7 years ago

132ikl commented 7 years ago

Description

When you have both auto save states and save state thumbnails enabled, RetroArch will sometimes close before being able to take a picture for the thumbnail. It works more often than not. Assuming the emulator waits for a save state to be created before exiting, this should be able to be fixed by applying those same conditions but for the thumbnail as well.

Expected behavior

When exiting the emulator, there should be two files: .state.auto and .state.auto.png.

Actual behavior

It normally works as expected, but it occasionally does not take a screenshot before exiting.

Steps to reproduce the bug

  1. Set savestate_auto_save = "true" and "savestate_thumbnail_enable = "true" in the RetroArch config.
  2. Open a game.
  3. Close the game. Normally, you will have both the save state and the screenshot. Occasionally, you will end up with just the save state and without a screenshot.

Version/Commit

You can find this information under Information/System Information

Environment information

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/45173408-automatic-save-states-with-thumbnails-enabled-is-inconsistent?utm_campaign=plugin&utm_content=tracker%2F296058&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F296058&utm_medium=issues&utm_source=github).
mikezila commented 5 years ago

This is still an issue on Windows 10. It seems the automatic screenshot is not saved if the game is running when retroarch exits. Hitting a hotkey to exit (while in-game) results in only the state being saved, but opening the menu and choosing to quit there results in the screenshot being saved as well.

rtomasa commented 4 years ago

It seems to be still happening in 1.8.5+ I've opened a bounty for the same :-)

rtomasa commented 4 years ago

Tested in 1.9.0 and savestate_thumbnail_enable = "true" does not work at all now, it does not generates any .state.auto.png file anymore. Also if you try to workaround the functionality by taking a regular screenshot assigning the same hotkey for both exit and screenshot and you do the double tap combination for exit very fast, the .state.auto is not flushed :-(

I saw @kivutar working around this parameter long time ago, maybe he knows...