Enable ctrl-r for reset again
This commit is contained in:
@@ -623,7 +623,7 @@ static void HandleCommand(uint32 j, bool pressed) {
|
|||||||
SDL_ShowCursor(g_cursor);
|
SDL_ShowCursor(g_cursor);
|
||||||
break;
|
break;
|
||||||
case kKeys_Reset:
|
case kKeys_Reset:
|
||||||
//RtlReset(true);
|
RtlReset(true);
|
||||||
break;
|
break;
|
||||||
case kKeys_Pause: g_paused = !g_paused; break;
|
case kKeys_Pause: g_paused = !g_paused; break;
|
||||||
case kKeys_PauseDimmed:
|
case kKeys_PauseDimmed:
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ typedef struct StateRecorder {
|
|||||||
static StateRecorder state_recorder;
|
static StateRecorder state_recorder;
|
||||||
|
|
||||||
void StateRecorder_Init(StateRecorder *sr) {
|
void StateRecorder_Init(StateRecorder *sr) {
|
||||||
|
ByteArray_Destroy(&sr->log);
|
||||||
|
ByteArray_Destroy(&sr->base_snapshot);
|
||||||
memset(sr, 0, sizeof(*sr));
|
memset(sr, 0, sizeof(*sr));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,9 +163,9 @@ void RtlReset(bool preserve_sram) {
|
|||||||
RtlRestoreMusicAfterLoad_Locked(true);
|
RtlRestoreMusicAfterLoad_Locked(true);
|
||||||
RtlApuUnlock();
|
RtlApuUnlock();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RtlSynchronizeWholeState();
|
RtlSynchronizeWholeState();
|
||||||
|
|
||||||
|
StateRecorder_Init(&state_recorder);
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetFileSize(FILE *f) {
|
int GetFileSize(FILE *f) {
|
||||||
@@ -398,7 +400,6 @@ bool RtlRunFrame(int inputs) {
|
|||||||
StateRecorder_Record(&state_recorder, inputs);
|
StateRecorder_Record(&state_recorder, inputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
g_rtl_runframe(inputs, 0);
|
g_rtl_runframe(inputs, 0);
|
||||||
|
|
||||||
snes_frame_counter++;
|
snes_frame_counter++;
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ uint8 ReadReg(uint16 reg);
|
|||||||
typedef void RunFrameFunc(uint16 input, int run_what);
|
typedef void RunFrameFunc(uint16 input, int run_what);
|
||||||
typedef void SyncAllFunc();
|
typedef void SyncAllFunc();
|
||||||
|
|
||||||
|
void RtlReset(bool preserve_sram);
|
||||||
void RtlSetupEmuCallbacks(uint8 *emu_ram, RunFrameFunc *func, SyncAllFunc *sync_all);
|
void RtlSetupEmuCallbacks(uint8 *emu_ram, RunFrameFunc *func, SyncAllFunc *sync_all);
|
||||||
void RtlClearKeyLog();
|
void RtlClearKeyLog();
|
||||||
void RtlStopReplay();
|
void RtlStopReplay();
|
||||||
|
|||||||
Reference in New Issue
Block a user