mirror of https://github.com/bsnes-emu/bsnes.git
Update to v106 release.
byuu says: Changelog (since v105tr1): Changelog: - added Emulation/AutoSaveMemory/Interval setting to specify number of seconds between auto-saves - added Game Notes tool - added 64 new SNES PAL games to the icarus preservation database The Games Notes tool is a new feature that gives you a blank text box to enter notes about a game that you're playing: so you can write down things like level select codes for games with save RAM, combo moves, or whatever other information you'd like quick and easy access to. This is kind of an experiment. Ideally, we'd wanna allow more personalized information, drawings, etc. But hey, let's try it out and see what people think.
This commit is contained in:
parent
3ec08cebbe
commit
b55783c322
|
@ -12,7 +12,7 @@ using namespace nall;
|
||||||
|
|
||||||
namespace Emulator {
|
namespace Emulator {
|
||||||
static const string Name = "higan";
|
static const string Name = "higan";
|
||||||
static const string Version = "105.01";
|
static const string Version = "106";
|
||||||
static const string Author = "byuu";
|
static const string Author = "byuu";
|
||||||
static const string License = "GPLv3";
|
static const string License = "GPLv3";
|
||||||
static const string Website = "https://byuu.org/";
|
static const string Website = "https://byuu.org/";
|
||||||
|
|
|
@ -56,7 +56,8 @@ Settings::Settings() {
|
||||||
set("Input/FocusLoss/Pause", false);
|
set("Input/FocusLoss/Pause", false);
|
||||||
set("Input/FocusLoss/AllowInput", false);
|
set("Input/FocusLoss/AllowInput", false);
|
||||||
|
|
||||||
set("Emulation/AutoSaveRAM", true);
|
set("Emulation/AutoSaveMemory/Enable", true);
|
||||||
|
set("Emulation/AutoSaveMemory/Interval", 30);
|
||||||
|
|
||||||
set("Crashed", false);
|
set("Crashed", false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,6 +134,7 @@ Presentation::Presentation() {
|
||||||
cheatEditor.setText("Cheat Editor ...").onActivate([&] { toolsManager->show(0); });
|
cheatEditor.setText("Cheat Editor ...").onActivate([&] { toolsManager->show(0); });
|
||||||
stateManager.setText("State Manager ...").onActivate([&] { toolsManager->show(1); });
|
stateManager.setText("State Manager ...").onActivate([&] { toolsManager->show(1); });
|
||||||
manifestViewer.setText("Manifest Viewer ...").onActivate([&] { toolsManager->show(2); });
|
manifestViewer.setText("Manifest Viewer ...").onActivate([&] { toolsManager->show(2); });
|
||||||
|
gameNotes.setText("Game Notes ...").onActivate([&] { toolsManager->show(3); });
|
||||||
|
|
||||||
helpMenu.setText("Help");
|
helpMenu.setText("Help");
|
||||||
documentation.setText("Documentation ...").onActivate([&] {
|
documentation.setText("Documentation ...").onActivate([&] {
|
||||||
|
|
|
@ -67,6 +67,7 @@ struct Presentation : Window {
|
||||||
MenuItem cheatEditor{&toolsMenu};
|
MenuItem cheatEditor{&toolsMenu};
|
||||||
MenuItem stateManager{&toolsMenu};
|
MenuItem stateManager{&toolsMenu};
|
||||||
MenuItem manifestViewer{&toolsMenu};
|
MenuItem manifestViewer{&toolsMenu};
|
||||||
|
MenuItem gameNotes{&toolsMenu};
|
||||||
Menu helpMenu{&menuBar};
|
Menu helpMenu{&menuBar};
|
||||||
MenuItem documentation{&helpMenu};
|
MenuItem documentation{&helpMenu};
|
||||||
MenuItem credits{&helpMenu};
|
MenuItem credits{&helpMenu};
|
||||||
|
|
|
@ -39,6 +39,7 @@ auto Program::loadMedium(Emulator::Interface& interface, const Emulator::Interfa
|
||||||
toolsManager->cheatEditor.loadCheats();
|
toolsManager->cheatEditor.loadCheats();
|
||||||
toolsManager->stateManager.doRefresh();
|
toolsManager->stateManager.doRefresh();
|
||||||
toolsManager->manifestViewer.doRefresh();
|
toolsManager->manifestViewer.doRefresh();
|
||||||
|
toolsManager->gameNotes.loadNotes();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Program::unloadMedium() -> void {
|
auto Program::unloadMedium() -> void {
|
||||||
|
@ -46,6 +47,7 @@ auto Program::unloadMedium() -> void {
|
||||||
|
|
||||||
presentation->clearViewport();
|
presentation->clearViewport();
|
||||||
toolsManager->cheatEditor.saveCheats();
|
toolsManager->cheatEditor.saveCheats();
|
||||||
|
toolsManager->gameNotes.saveNotes();
|
||||||
emulator->unload();
|
emulator->unload();
|
||||||
emulator = nullptr;
|
emulator = nullptr;
|
||||||
mediumPaths.reset();
|
mediumPaths.reset();
|
||||||
|
|
|
@ -90,9 +90,9 @@ auto Program::main() -> void {
|
||||||
}
|
}
|
||||||
|
|
||||||
emulator->run();
|
emulator->run();
|
||||||
if(settings["Emulation/AutoSaveRAM"].boolean()) {
|
if(settings["Emulation/AutoSaveMemory/Enable"].boolean()) {
|
||||||
time_t currentTime = time(nullptr);
|
time_t currentTime = time(nullptr);
|
||||||
if(currentTime - autoSaveTime >= 5) {
|
if(currentTime - autoSaveTime >= settings["Emulation/AutoSaveMemory/Interval"].natural()) {
|
||||||
autoSaveTime = currentTime;
|
autoSaveTime = currentTime;
|
||||||
emulator->save();
|
emulator->save();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ AdvancedSettings::AdvancedSettings(TabFrame* parent) : TabFrameItem(parent) {
|
||||||
});
|
});
|
||||||
|
|
||||||
otherLabel.setText("Other").setFont(Font().setBold());
|
otherLabel.setText("Other").setFont(Font().setBold());
|
||||||
autoSaveRAM.setText("Auto-Save RAM Periodically").setChecked(settings["Emulation/AutoSaveRAM"].boolean()).onToggle([&] {
|
autoSaveMemory.setText("Auto-Save Memory Periodically").setChecked(settings["Emulation/AutoSaveMemory/Enable"].boolean()).onToggle([&] {
|
||||||
settings["Emulation/AutoSaveRAM"].setValue(autoSaveRAM.checked());
|
settings["Emulation/AutoSaveMemory/Enable"].setValue(autoSaveMemory.checked());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ struct AdvancedSettings : TabFrameItem {
|
||||||
Button libraryChange{&libraryLayout, Size{0, 0}};
|
Button libraryChange{&libraryLayout, Size{0, 0}};
|
||||||
CheckLabel ignoreManifests{&layout, Size{~0, 0}};
|
CheckLabel ignoreManifests{&layout, Size{~0, 0}};
|
||||||
Label otherLabel{&layout, Size{~0, 0}, 2};
|
Label otherLabel{&layout, Size{~0, 0}, 2};
|
||||||
CheckLabel autoSaveRAM{&layout, Size{~0, 0}};
|
CheckLabel autoSaveMemory{&layout, Size{~0, 0}};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SettingsManager : Window {
|
struct SettingsManager : Window {
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
GameNotes::GameNotes(TabFrame* parent) : TabFrameItem(parent) {
|
||||||
|
setIcon(Icon::Emblem::Text);
|
||||||
|
setText("Game Notes");
|
||||||
|
|
||||||
|
layout.setMargin(5);
|
||||||
|
notes.setWordWrap(false).setFont(Font().setFamily(Font::Mono));
|
||||||
|
}
|
||||||
|
|
||||||
|
auto GameNotes::loadNotes() -> void {
|
||||||
|
auto contents = string::read({program->mediumPaths(1), "higan/notes.txt"});
|
||||||
|
notes.setText(contents);
|
||||||
|
}
|
||||||
|
|
||||||
|
auto GameNotes::saveNotes() -> void {
|
||||||
|
auto contents = notes.text();
|
||||||
|
if(contents) {
|
||||||
|
directory::create({program->mediumPaths(1), "higan/"});
|
||||||
|
file::write({program->mediumPaths(1), "higan/notes.txt"}, contents);
|
||||||
|
} else {
|
||||||
|
file::remove({program->mediumPaths(1), "higan/notes.txt"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
#include "cheat-editor.cpp"
|
#include "cheat-editor.cpp"
|
||||||
#include "state-manager.cpp"
|
#include "state-manager.cpp"
|
||||||
#include "manifest-viewer.cpp"
|
#include "manifest-viewer.cpp"
|
||||||
|
#include "game-notes.cpp"
|
||||||
unique_pointer<CheatDatabase> cheatDatabase;
|
unique_pointer<CheatDatabase> cheatDatabase;
|
||||||
unique_pointer<ToolsManager> toolsManager;
|
unique_pointer<ToolsManager> toolsManager;
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,15 @@ struct ManifestViewer : TabFrameItem {
|
||||||
TextEdit manifestView{&layout, Size{~0, ~0}};
|
TextEdit manifestView{&layout, Size{~0, ~0}};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct GameNotes : TabFrameItem {
|
||||||
|
GameNotes(TabFrame*);
|
||||||
|
auto loadNotes() -> void;
|
||||||
|
auto saveNotes() -> void;
|
||||||
|
|
||||||
|
VerticalLayout layout{this};
|
||||||
|
TextEdit notes{&layout, Size{~0, ~0}};
|
||||||
|
};
|
||||||
|
|
||||||
struct ToolsManager : Window {
|
struct ToolsManager : Window {
|
||||||
ToolsManager();
|
ToolsManager();
|
||||||
auto show(uint tool) -> void;
|
auto show(uint tool) -> void;
|
||||||
|
@ -93,6 +102,7 @@ struct ToolsManager : Window {
|
||||||
CheatEditor cheatEditor{&panel};
|
CheatEditor cheatEditor{&panel};
|
||||||
StateManager stateManager{&panel};
|
StateManager stateManager{&panel};
|
||||||
ManifestViewer manifestViewer{&panel};
|
ManifestViewer manifestViewer{&panel};
|
||||||
|
GameNotes gameNotes{&panel};
|
||||||
};
|
};
|
||||||
|
|
||||||
extern unique_pointer<CheatDatabase> cheatDatabase;
|
extern unique_pointer<CheatDatabase> cheatDatabase;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue