mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 14:42:33 +01:00
byuu says: This release adds a settings dialog that lets you control the library path, optionally generate manifest.bml files, and optionally bypass the internal games database (so far this is only the US SNES set.) Also, the settings.bml file can exist in the same folder as the binary now (portable mode). Plus it can share the same config file as higan/tomoko itself does. This will allow you to change the library location in either program and have it affect the other program as well. It's a bit hackish, but it works >_> Note: don't use this with higan v095.06 or earlier, or bad things will happen.
56 lines
1.5 KiB
C++
56 lines
1.5 KiB
C++
#include <nall/nall.hpp>
|
|
using namespace nall;
|
|
|
|
#include <hiro/hiro.hpp>
|
|
using namespace hiro;
|
|
|
|
//if file already exists in the same path as the binary; use it (portable mode)
|
|
//if not, use default requested path (*nix/user mode)
|
|
auto locate(string pathname, string filename) -> string {
|
|
string location{programpath(), filename};
|
|
if(file_system_object::exists(location)) return location;
|
|
return {pathname, filename};
|
|
}
|
|
|
|
#include "settings.cpp"
|
|
Settings settings;
|
|
|
|
#include "heuristics/famicom.hpp"
|
|
#include "heuristics/super-famicom.hpp"
|
|
#include "heuristics/game-boy.hpp"
|
|
#include "heuristics/game-boy-advance.hpp"
|
|
#include "heuristics/bsx-satellaview.hpp"
|
|
#include "heuristics/sufami-turbo.hpp"
|
|
|
|
#include "core/core.hpp"
|
|
#include "core/core.cpp"
|
|
#include "core/famicom.cpp"
|
|
#include "core/super-famicom.cpp"
|
|
#include "core/game-boy.cpp"
|
|
#include "core/game-boy-color.cpp"
|
|
#include "core/game-boy-advance.cpp"
|
|
#include "core/bsx-satellaview.cpp"
|
|
#include "core/sufami-turbo.cpp"
|
|
Icarus icarus;
|
|
|
|
#include "ui/ui.hpp"
|
|
#include "ui/scan-dialog.cpp"
|
|
#include "ui/settings-dialog.cpp"
|
|
#include "ui/import-dialog.cpp"
|
|
#include "ui/error-dialog.cpp"
|
|
|
|
#include <nall/main.hpp>
|
|
auto nall::main(lstring args) -> void {
|
|
if(args.size() == 3 && args[1] == "-m") {
|
|
if(!directory::exists(args[2])) return print("error: directory not found\n");
|
|
return print(icarus.manifest(args[2]));
|
|
}
|
|
|
|
new ScanDialog;
|
|
new SettingsDialog;
|
|
new ImportDialog;
|
|
new ErrorDialog;
|
|
scanDialog->show();
|
|
Application::run();
|
|
}
|