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

Netplay overwriting local progress (srm, ...) #8571

Closed
barbudreadmon opened this issue Apr 10, 2019 · 1 comment · Fixed by #14111 or #14117
Closed

Netplay overwriting local progress (srm, ...) #8571

barbudreadmon opened this issue Apr 10, 2019 · 1 comment · Fixed by #14111 or #14117

Comments

@barbudreadmon
Copy link
Contributor

barbudreadmon commented Apr 10, 2019

Description

By design, in a netplay session, machine state is the same on both side through the sharing of savestates. Part of that shared data is flushed to disk when you leave game (can be srm or any other kind of local savefiles).

Expected behavior

Not overwriting local progress with data from other side

Actual behavior

Overwriting local progress with data from other side

More information

The issue was discovered while talking about having hiscore pointers included in savestates for FBAlpha, now FBNeo (libretro/FBNeo#52).

The following might be what's needed to fix this issue :

  • preventing client-side from loading a savetate because it will overwrite the host-side state too, including the internal backup memory that will be flushed at the end of the netplay session
  • preventing client-side from flushing its srm at the end of a netplay session, otherwise it will be overwritten by host-side srm
  • having api calls for netplay awareness, because some cores don't rely on srm, they use their own internal functions to flush savefiles instead, the core needs to prevent those functions from running when it is client-side of a netplay session.
@barbudreadmon
Copy link
Contributor Author

#14111 moves client-side save_dir to another folder, indirectly taking care of preventing client-side from flushing its srm at the end of a netplay session, otherwise it will be overwritten by host-side srm, netplay needs to be enabled before joining a room though.

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