From 212da0a966a854a50db7fa9942600921e65258da Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Tue, 31 Jul 2018 12:23:12 +1000 Subject: [PATCH] Update to 20180730 release. byuu says: These WIPs-within-WIPs are getting more and more broken ... this isn't going the way I wanted. But ... this time around, I've revamped the entire ruby API again, to solve a bunch of tough problems that have always made using ruby really clunky. But there are *so many* ruby drivers that it's going to take a long time to work through them all. This WIP is only going to run bsnes, and only on FreeBSD, and only with some drivers. hiro's Application::initialize() now calls hiro::initialize(), which you define inside of your hiro apps. This lets you call Application::setName(...) before anything else in hiro runs. This is essential on Xorg to set program icons, for instance. With the ruby rewrite and the change to hiro, I can get away from the need to make everything in bsnes/higan pointers to objects, and can now just declare them as regular objects. --- genius/genius.cpp | 15 +- higan/target-bsnes/bsnes.cpp | 11 +- higan/target-bsnes/bsnes.hpp | 6 +- higan/target-bsnes/input/hotkeys.cpp | 10 +- higan/target-bsnes/input/input.cpp | 6 +- higan/target-bsnes/presentation/about.cpp | 4 +- .../presentation/presentation.cpp | 24 +-- .../presentation/presentation.hpp | 5 +- higan/target-bsnes/program/audio.cpp | 46 ++-- higan/target-bsnes/program/input.cpp | 6 +- higan/target-bsnes/program/platform.cpp | 8 +- higan/target-bsnes/program/program.cpp | 6 +- higan/target-bsnes/program/utility.cpp | 2 +- higan/target-bsnes/program/video.cpp | 32 +-- higan/target-bsnes/settings/drivers.cpp | 62 +++--- hiro/core/application.cpp | 1 + hiro/core/core.hpp | 2 + icarus/icarus.cpp | 6 +- nall/dsp/resampler/cubic.hpp | 9 +- nall/queue.hpp | 63 +++--- ruby/GNUmakefile | 7 +- ruby/audio.hpp | 67 ------ ruby/audio/asio.cpp | 1 + ruby/{ => audio}/audio.cpp | 202 ++++++++++-------- ruby/audio/audio.hpp | 105 +++++++++ ruby/audio/directsound.cpp | 14 +- ruby/audio/openal.cpp | 53 +++-- ruby/audio/oss.cpp | 118 ++++------ ruby/input.hpp | 31 --- ruby/{ => input}/input.cpp | 116 ++++++---- ruby/input/input.hpp | 60 ++++++ ruby/input/sdl.cpp | 64 +++--- ruby/ruby.cpp | 6 +- ruby/ruby.hpp | 10 +- ruby/video.hpp | 59 ----- ruby/video/glx2.cpp | 68 +++--- ruby/{ => video}/video.cpp | 176 ++++++++------- ruby/video/video.hpp | 100 +++++++++ ruby/video/xshm.cpp | 49 ++--- 39 files changed, 868 insertions(+), 762 deletions(-) delete mode 100644 ruby/audio.hpp rename ruby/{ => audio}/audio.cpp (53%) create mode 100644 ruby/audio/audio.hpp delete mode 100644 ruby/input.hpp rename ruby/{ => input}/input.cpp (63%) create mode 100644 ruby/input/input.hpp delete mode 100644 ruby/video.hpp rename ruby/{ => video}/video.cpp (57%) create mode 100644 ruby/video/video.hpp diff --git a/genius/genius.cpp b/genius/genius.cpp index 9fcf4718..4f9bb425 100644 --- a/genius/genius.cpp +++ b/genius/genius.cpp @@ -615,9 +615,12 @@ auto OscillatorWindow::updateWindow() -> void { // -#include -auto nall::main(string_vector args) -> void { +auto hiro::initialize() -> void { Application::setName("genius"); +} + +#include +auto nall::main(vector arguments) -> void { new ListWindow; new GameWindow; new MemoryWindow; @@ -625,12 +628,12 @@ auto nall::main(string_vector args) -> void { //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(args.size() == 3 && args[1] == "--sync") { - for(auto& filename : directory::contents(args[2], "*.bml")) { +/*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({args[2], filename}); - listWindow->saveDatabase({args[2], filename}); + listWindow->loadDatabase({arguments[2], filename}); + listWindow->saveDatabase({arguments[2], filename}); } return print("[Done]\n"); }*/ diff --git a/higan/target-bsnes/bsnes.cpp b/higan/target-bsnes/bsnes.cpp index 700bfec0..b174baf5 100644 --- a/higan/target-bsnes/bsnes.cpp +++ b/higan/target-bsnes/bsnes.cpp @@ -1,8 +1,8 @@ #include "bsnes.hpp" #include -unique_pointer