diff --git a/genius/GNUmakefile b/genius/GNUmakefile index 908e0990..f2fc8468 100644 --- a/genius/GNUmakefile +++ b/genius/GNUmakefile @@ -55,3 +55,5 @@ else ifneq ($(filter $(platform),linux bsd),) rm -f $(prefix)/share/applications/$(name).desktop rm -f $(prefix)/share/icons/$(name).png endif + +-include obj/*.d diff --git a/genius/genius.cpp b/genius/genius.cpp index b8beb24f..85528b2c 100644 --- a/genius/genius.cpp +++ b/genius/genius.cpp @@ -148,7 +148,7 @@ auto ListWindow::loadDatabase(string location) -> void { } auto ListWindow::saveDatabase(string location) -> void { - file fp{location, file::mode::write}; + auto fp = file::open(location, file::mode::write); if(!fp) return MessageDialog().setParent(*this).setText({ "Error: failed to write file.\n\n", "Name: ", location @@ -618,24 +618,12 @@ auto hiro::initialize() -> void { } #include -auto nall::main(vector arguments) -> void { +auto nall::main(Arguments) -> void { new ListWindow; new GameWindow; new MemoryWindow; new OscillatorWindow; - //internal command used to synchronize all genius databases from an old format to a new format - //if enabled, use with extreme caution and make backups first -/*if(arguments.size() == 3 && arguments[1] == "--sync") { - for(auto& filename : directory::contents(arguments[2], "*.bml")) { - if(filename.beginsWith("Boards")) continue; - print(filename, "\n"); - listWindow->loadDatabase({arguments[2], filename}); - listWindow->saveDatabase({arguments[2], filename}); - } - return print("[Done]\n"); - }*/ - listWindow->setVisible(); Application::run(); } diff --git a/higan/emulator/emulator.hpp b/higan/emulator/emulator.hpp index ddb6ce1e..456823e7 100644 --- a/higan/emulator/emulator.hpp +++ b/higan/emulator/emulator.hpp @@ -28,7 +28,7 @@ using namespace nall; namespace Emulator { static const string Name = "higan"; - static const string Version = "106.64"; + static const string Version = "106.65"; static const string Author = "byuu"; static const string License = "GPLv3"; static const string Website = "https://byuu.org/"; diff --git a/higan/gb/apu/apu.cpp b/higan/gb/apu/apu.cpp index ec3e5170..347c96ff 100644 --- a/higan/gb/apu/apu.cpp +++ b/higan/gb/apu/apu.cpp @@ -67,7 +67,7 @@ auto APU::power() -> void { phase = 0; cycle = 0; - PRNG prng; + PRNG::PCG prng; for(auto& n : wave.pattern) n = prng.random(); } diff --git a/higan/sfc/slot/bsmemory/bsmemory.cpp b/higan/sfc/slot/bsmemory/bsmemory.cpp index 5c51354f..f8053eb4 100644 --- a/higan/sfc/slot/bsmemory/bsmemory.cpp +++ b/higan/sfc/slot/bsmemory/bsmemory.cpp @@ -54,7 +54,7 @@ auto BSMemory::load() -> bool { for(auto& byte : page.buffer[1]) byte = random(); for(auto& block : blocks) { - block.erased = 0; + block.erased = 1; block.locked = 1; } diff --git a/higan/target-bsnes/bsnes.cpp b/higan/target-bsnes/bsnes.cpp index 212e173e..6056199d 100644 --- a/higan/target-bsnes/bsnes.cpp +++ b/higan/target-bsnes/bsnes.cpp @@ -23,10 +23,9 @@ auto hiro::initialize() -> void { } #include -auto nall::main(vector arguments) -> void { +auto nall::main(Arguments arguments) -> void { settings.location = locate("settings.bml"); - arguments.takeLeft(); //ignore program location in argument parsing for(auto argument : arguments) { if(argument == "--fullscreen") { presentation.startFullScreen = true; diff --git a/higan/target-bsnes/program/game-rom.cpp b/higan/target-bsnes/program/game-rom.cpp index 1dc9207e..9629d25c 100644 --- a/higan/target-bsnes/program/game-rom.cpp +++ b/higan/target-bsnes/program/game-rom.cpp @@ -123,7 +123,7 @@ auto Program::openRomSuperFamicom(string name, vfs::file::mode mode) -> vfs::sha return vfs::fs::file::open({Location::notsuffix(superFamicom.location), ".msu"}, mode); } - if(name.match("msu1/track-*.pcm")) { + if(name.match("msu1/track*.pcm")) { name.trimLeft("msu1/track", 1L); return vfs::fs::file::open({Location::notsuffix(superFamicom.location), name}, mode); } diff --git a/higan/target-bsnes/program/states.cpp b/higan/target-bsnes/program/states.cpp index 6407eefe..ea5c30c5 100644 --- a/higan/target-bsnes/program/states.cpp +++ b/higan/target-bsnes/program/states.cpp @@ -100,7 +100,7 @@ auto Program::saveState(string filename) -> bool { if(gamePath().endsWith("/")) { string location = {statePath(), filename, ".bst"}; directory::create(Location::path(location)); - if(!file::write(location, saveState.data(), saveState.size())) { + if(!file::write(location, saveState)) { return showMessage({"Unable to write [", prefix, "] to disk"}), false; } } else { diff --git a/higan/target-higan/higan.cpp b/higan/target-higan/higan.cpp index 5d59fc82..eacc3d33 100644 --- a/higan/target-higan/higan.cpp +++ b/higan/target-higan/higan.cpp @@ -18,7 +18,7 @@ auto hiro::initialize() -> void { } #include -auto nall::main(vector arguments) -> void { +auto nall::main(Arguments arguments) -> void { new Program(arguments); Application::run(); } diff --git a/higan/target-higan/higan.hpp b/higan/target-higan/higan.hpp index 2741f067..7ee1856a 100644 --- a/higan/target-higan/higan.hpp +++ b/higan/target-higan/higan.hpp @@ -1,3 +1,6 @@ +#include +using namespace nall; + #include using namespace ruby; extern unique_pointer