2018-05-18 05:21:22 +00:00
|
|
|
#include "bsnes.hpp"
|
2018-05-19 02:51:34 +00:00
|
|
|
#include <sfc/interface/interface.hpp>
|
2018-05-18 05:21:22 +00:00
|
|
|
unique_pointer<Video> video;
|
|
|
|
unique_pointer<Audio> audio;
|
|
|
|
unique_pointer<Input> input;
|
2018-05-19 02:51:34 +00:00
|
|
|
unique_pointer<Emulator::Interface> emulator;
|
2018-05-18 05:21:22 +00:00
|
|
|
|
|
|
|
auto locate(string name) -> string {
|
|
|
|
string location = {Path::program(), name};
|
|
|
|
if(inode::exists(location)) return location;
|
|
|
|
|
|
|
|
location = {Path::config(), "bsnes/", name};
|
|
|
|
if(inode::exists(location)) return location;
|
|
|
|
|
|
|
|
directory::create({Path::local(), "bsnes/"});
|
|
|
|
return {Path::local(), "bsnes/", name};
|
|
|
|
}
|
|
|
|
|
|
|
|
#include <nall/main.hpp>
|
|
|
|
auto nall::main(string_vector args) -> void {
|
|
|
|
Application::setName("bsnes");
|
2018-05-19 02:51:34 +00:00
|
|
|
emulator = new SuperFamicom::Interface;
|
2018-05-18 05:21:22 +00:00
|
|
|
new Program(args);
|
|
|
|
Application::run();
|
|
|
|
}
|