Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use core name as save filename #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Allow to use core name as save filename #17

wants to merge 1 commit into from

Conversation

Kekun
Copy link
Contributor

@Kekun Kekun commented May 18, 2017

Add the 'save_filename' variable with the default 'game' value not
changing the current behavior and the 'core' value using a static name
based on the core's filename for every save file.

This allows frontends creating one save directory per game to let the
users rename their game file without loosing their save.

Add the 'save_filename' variable with the default 'game' value not
changing the current behavior and the 'core' value using a static name
based on the core's filename for every save file.

This allows frontends creating one save directory per game to let the
users rename their game file without loosing their save.
Copy link
Contributor

@andres-asm andres-asm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems overly complicated for no reason.
The current behavior is most likely because it's an unmantained, hardly used core.

I think a better approach would be to follow what other cores do (use libretro srm interface or use the save dir with the game name)

@Kekun
Copy link
Contributor Author

Kekun commented May 18, 2017

I thought about allowing access to the save RAM instead of writting save files, but as there are multiple save RAMs here and Libretro don't have RO and WO save RAM accessors like for serialization, but only a RW one you can't serialize/deserialize the save RAM. Instead you would have to put all the save RAMs and their metadata in a contiguous buffer within the emu… It's doable with a LOT more refactoring and it's probably not worth the pain.

This changes is simple and doesn't break the default behavior (hence the current users don't loose their save files) while solving the problem of game file renaming for frontends having one save directory per game and identifying the games with something else than the filename.

@Kekun
Copy link
Contributor Author

Kekun commented May 18, 2017

@fr500 As you said the core is unmaintained and hardly used, is there one you would recommend instead? :)

@andres-asm
Copy link
Contributor

mGBA all the way

@inactive123
Copy link
Contributor

inactive123 commented May 18, 2017

We should implement save files through the proper libretro get_memory/set_memory callback functions. It should be discouraged to do save files any other way through a libretro core if we can prevent it.

@negativeExponent
Copy link
Contributor

the core is able to support mednafen save method, as well as using the libretro api. so, this PR might not be relevant anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants