Skip to content

Commit 8e80d2f

Browse files
author
byuu
committed
v115
1 parent bd1759e commit 8e80d2f

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

CREDITS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ This software would not be where it is today without the help and support of the
2828
- Lioncash
2929
- Lord Nightmare
3030
- lowkey
31-
- Max833
3231
- Matthew Callis
32+
- Max833
3333
- MerryMage
3434
- mightymo
3535
- Nach

bsnes/emulator/emulator.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ using namespace nall;
2929

3030
namespace Emulator {
3131
static const string Name = "bsnes";
32-
static const string Version = "114.6";
32+
static const string Version = "115";
3333
static const string Copyright = "byuu";
3434
static const string License = "GPLv3";
3535
static const string Website = "https://byuu.org";
3636

3737
//incremented only when serialization format changes
38-
static const string SerializerVersion = "114.2";
38+
static const string SerializerVersion = "115";
3939

4040
namespace Constants {
4141
namespace Colorburst {

bsnes/target-bsnes/input/hotkeys.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ auto InputManager::bindHotkeys() -> void {
3131

3232
hotkeys.append(InputHotkey("Rewind").onPress([&] {
3333
if(!emulator->loaded() || program.fastForwarding) return;
34-
program.rewinding = true;
3534
if(program.rewind.frequency == 0) {
36-
program.showMessage("Please enable rewind support in Settings->Emulator first");
37-
} else {
38-
program.rewindMode(Program::Rewind::Mode::Rewinding);
35+
return program.showMessage("Please enable rewind support in Settings->Emulator first");
3936
}
37+
program.rewinding = true;
38+
program.rewindMode(Program::Rewind::Mode::Rewinding);
4039
volume = Emulator::audio.volume();
4140
if(settings.rewind.mute) {
4241
program.mute |= Program::Mute::Rewind;

bsnes/target-bsnes/program/rewind.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ auto Program::rewindReset() -> void {
1313
auto Program::rewindRun() -> void {
1414
if(rewind.frequency == 0) return; //rewind disabled?
1515

16+
if(rewind.mode == Rewind::Mode::Playing) {
17+
if(++rewind.counter < rewind.frequency) return;
18+
19+
rewind.counter = 0;
20+
if(rewind.history.size() >= rewind.length) {
21+
rewind.history.takeFirst();
22+
}
23+
auto s = emulator->serialize(0);
24+
rewind.history.append(s);
25+
return;
26+
}
27+
1628
if(rewind.mode == Rewind::Mode::Rewinding) {
1729
if(rewind.history.size() == 0) return rewindMode(Rewind::Mode::Playing); //nothing left to rewind?
1830
if(++rewind.counter < rewind.frequency / 4) return;
@@ -27,16 +39,4 @@ auto Program::rewindRun() -> void {
2739
emulator->unserialize(s);
2840
return;
2941
}
30-
31-
if(rewind.mode == Rewind::Mode::Playing) {
32-
if(++rewind.counter < rewind.frequency) return;
33-
34-
rewind.counter = 0;
35-
if(rewind.history.size() >= rewind.length) {
36-
rewind.history.takeFirst();
37-
}
38-
auto s = emulator->serialize(0);
39-
rewind.history.append(s);
40-
return;
41-
}
4242
}

0 commit comments

Comments
 (0)