Implement Screenshot Hotkey #2417
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At the request of my brother, I implemented a basic screenshot mechanism into MelonDS. This just registers a new hotkey you can assign which will save the current frame buffer to a file at the native resolution of the renderer when the button press is registered. I've gotten this to functional for all graphic modes, and I've tested it on both Windows and MacOS with a couple of users from a nuzlocke forum who helped verify that it works correctly.
I'm happy to make adjustments as you need to better fit the architecture of the project, though I did my best to try and match it.
The last feature that was requested which I haven't yet added is a way to customize the actual filename. My basic thought process is that I'd add a simple templating structure, (Like %... in python, mmmm-DD-YY with strftime, etc.) and a text box that the user can edit to change this format string. Biggest issue is that I couldn't figure out where I would put such a dialog without adding a whole new window, so I want to ask you where this would make sense to go.