mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
[PR #2210] [MERGED] NoGUI: Fix autosave on shutdown when started with -resume #916
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/stenzek/duckstation/pull/2210
Author: @mgziminsky
Created: 6/2/2021
Status: ✅ Merged
Merged: 6/3/2021
Merged by: @stenzek
Base:
master← Head:fix_autosave📝 Commits (1)
6038389NoGUI: Fix autosave on shutdown📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
src/duckstation-nogui/main.cpp(+1 -0)📄 Description
Currently, the nogui launcher fails to save resume files when started with the
-resumearg due to it holding onto the initial file handle in theboot_paramsuntil program termination, after shutdown hooks and emulation have ended.This is a simple solution to explicitly release the
boot_paramsafter they have been read.I wouldn't consider this solution ideal in terms of overall design though, and I think ideally the pointer usage and ownership of the
boot_paramsneeds some cleanup. Unless you are against it, or if I find something better to do, I may submit a follow-up PR doing a small refactor of that.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.