Skip to content

Add rewind playback handling#1

Open
NOirBRight wants to merge 1 commit intomasterfrom
codex/add-game-rollback-feature-with-threading
Open

Add rewind playback handling#1
NOirBRight wants to merge 1 commit intomasterfrom
codex/add-game-rollback-feature-with-threading

Conversation

@NOirBRight
Copy link
Owner

Summary

  • add an atomic rewinding flag and update the native step loop plus rewind lifecycle helpers so that buffered states are consumed and playback automatically stops when no history remains
  • expose setters/getters for the rewinding mode through JNI/Java/Kotlin so the UI can toggle continuous rewind playback while recording continues in the background

Testing

  • ./gradlew :libretrodroid:assembleDebug (fails: Unsupported class file major version 65 when compiling settings.gradle in this environment)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +668 to +672
void LibretroDroid::enableRewind(size_t maxBufferSizeBytes, unsigned int captureIntervalFrames) {
std::lock_guard<std::mutex> lock(rewindMutex);
rewindMaxBufferSizeBytes = maxBufferSizeBytes;
rewindCaptureInterval = std::max(1u, captureIntervalFrames);
rewindStates.clear();

Choose a reason for hiding this comment

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

P0 Badge Declare new rewind APIs in LibretroDroid header

The implementations for enableRewind, disableRewind, rewind, and hasRewindStates are added here and the JNI layer now calls those methods, but libretrodroid.h was only updated with setRewinding/isRewinding. Because the header lacks declarations for these four methods, any translation unit including it (including this file) will fail to compile with errors such as “class LibretroDroid has no member named enableRewind”. Add the corresponding member declarations to the class definition so the build succeeds.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant