Update to 20180724 release.

byuu says:

I failed to complete a WIP, have five of eight cores updated with some
major changes to Emulator::Interface. I'll just post a quick temporary
WIP in the off chance someone wants to look over the new interface and
comment on it.

Also implemented screen saver suppression into hiro/GTK.

I should also add ... a plan of mine is to develop target-bsnes into a
more generic user interface, with the general idea being that
target-higan is for multiple Emulator::Interface cores at the same time,
and target-bsnes is for just one Emulator::Interface core.

The idea being that if one were to compile target-bsnes with the GBA
core, it'd become bgba, for instance.
I don't plan on releasing single-core emulators like this, but ... I don't see any downsides to being more flexible.
This commit is contained in:
Tim Allen
2018-07-24 23:41:41 +10:00
parent 0aedb3430c
commit f1a4576ac4
52 changed files with 840 additions and 704 deletions

View File

@@ -7,6 +7,7 @@
#include <nall/maybe.hpp>
#include <nall/path.hpp>
#include <nall/range.hpp>
#include <nall/run.hpp>
#include <nall/set.hpp>
#include <nall/shared-pointer.hpp>
#include <nall/stdint.hpp>
@@ -369,84 +370,8 @@ struct Hotkey {
};
#endif
#if defined(Hiro_Application)
struct Application {
Application() = delete;
static auto doMain() -> void;
static auto font() -> Font;
static auto locale() -> Locale&;
static auto modal() -> bool;
static auto name() -> string;
static auto onMain(const function<void ()>& callback = {}) -> void;
static auto run() -> void;
static auto scale() -> float;
static auto scale(float value) -> float;
static auto pendingEvents() -> bool;
static auto processEvents() -> void;
static auto quit() -> void;
static auto setFont(const Font& font = {}) -> void;
static auto setName(const string& name = "") -> void;
static auto setScale(float scale = 1.0) -> void;
static auto unscale(float value) -> float;
struct Windows {
static auto doModalChange(bool modal) -> void;
static auto doScreenSaver() -> bool;
static auto onModalChange(const function<void (bool)>& callback = {}) -> void;
static auto onScreenSaver(const function<bool ()>& callback = {}) -> void;
};
struct Cocoa {
static auto doAbout() -> void;
static auto doActivate() -> void;
static auto doPreferences() -> void;
static auto doQuit() -> void;
static auto onAbout(const function<void ()>& callback = {}) -> void;
static auto onActivate(const function<void ()>& callback = {}) -> void;
static auto onPreferences(const function<void ()>& callback = {}) -> void;
static auto onQuit(const function<void ()>& callback = {}) -> void;
};
struct Namespace : Locale::Namespace {
Namespace(const string& value) : Locale::Namespace(Application::locale(), value) {}
};
//private:
struct State {
Font font;
Locale locale;
int modal = 0;
string name;
function<void ()> onMain;
bool quit = false;
float scale = 1.0;
struct Windows {
function<void (bool)> onModalChange;
function<bool ()> onScreenSaver;
} windows;
struct Cocoa {
function<void ()> onAbout;
function<void ()> onActivate;
function<void ()> onPreferences;
function<void ()> onQuit;
} cocoa;
};
static State state;
static auto initialize() -> void;
};
#endif
#if defined(Hiro_Desktop)
struct Desktop {
Desktop() = delete;
static auto size() -> Size;
static auto workspace() -> Geometry;
};
#endif
#include "application.hpp"
#include "desktop.hpp"
#if defined(Hiro_Monitor)
struct Monitor {