Skip to content

Commit 2a40432

Browse files
committed
Use RETRO_SAVESTATE_CONTEXT_REWIND_SAME_INSTANCE for rewind savestates
1 parent a897da3 commit 2a40432

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

libretro-common/include/libretro.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5674,7 +5674,7 @@ enum retro_savestate_context
56745674
* therefore, internal pointers to code or data are acceptable.
56755675
* May still be loaded or saved at any time.
56765676
*
5677-
* @note This context generally implies the use of runahead or rewinding,
5677+
* @note This context generally implies the use of runahead,
56785678
* which may work by taking savestates multiple times per second.
56795679
* Savestate code that runs in this context should be fast.
56805680
*/
@@ -5706,6 +5706,10 @@ enum retro_savestate_context
57065706
*/
57075707
RETRO_SAVESTATE_CONTEXT_ROLLBACK_NETPLAY = 3,
57085708

5709+
/**
5710+
* Same as \c RETRO_SAVESTATE_CONTEXT_RUNAHEAD_SAME_INSTANCE, but for rewinding.
5711+
*/
5712+
RETRO_SAVESTATE_CONTEXT_REWIND_SAME_INSTANCE = 4,
57095713
/**
57105714
* @private Defined to ensure <tt>sizeof(retro_savestate_context) == sizeof(int)</tt>.
57115715
* Do not use.

runloop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3153,7 +3153,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
31533153
#ifdef HAVE_REWIND
31543154
if (runloop_st->rewind_st.flags &
31553155
STATE_MGR_REWIND_ST_FLAG_IS_REWIND_SERIALIZE)
3156-
result = RETRO_SAVESTATE_CONTEXT_RUNAHEAD_SAME_INSTANCE;
3156+
result = RETRO_SAVESTATE_CONTEXT_REWIND_SAME_INSTANCE;
31573157
else
31583158
#endif
31593159
{

0 commit comments

Comments
 (0)