[PR #2210] [MERGED] NoGUI: Fix autosave on shutdown when started with -resume #916

Closed
opened 2026-01-29 19:10:09 +00:00 by claunia · 0 comments
Owner

📋 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: masterHead: fix_autosave


📝 Commits (1)

  • 6038389 NoGUI: 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 -resume arg due to it holding onto the initial file handle in the boot_params until program termination, after shutdown hooks and emulation have ended.

This is a simple solution to explicitly release the boot_params after 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_params needs 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.

## 📋 Pull Request Information **Original PR:** https://github.com/stenzek/duckstation/pull/2210 **Author:** [@mgziminsky](https://github.com/mgziminsky) **Created:** 6/2/2021 **Status:** ✅ Merged **Merged:** 6/3/2021 **Merged by:** [@stenzek](https://github.com/stenzek) **Base:** `master` ← **Head:** `fix_autosave` --- ### 📝 Commits (1) - [`6038389`](https://github.com/stenzek/duckstation/commit/6038389d35f3921a04936af6990892808978d4d6) NoGUI: Fix autosave on shutdown ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/duckstation-nogui/main.cpp` (+1 -0) </details> ### 📄 Description Currently, the nogui launcher fails to save resume files when started with the `-resume` arg due to it holding onto the initial file handle in the `boot_params` until program termination, after shutdown hooks and emulation have ended. This is a simple solution to explicitly release the `boot_params` after 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_params` needs 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 19:10:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/duckstation#916