Update to v106r50 release.

byuu says:

Changelog:

  - emulator/video,audio: various cleanups
  - emulator/audio: removed reverb effect (it breaks very badly on
    high-frequency systems)
  - emulator/audio: the Nyquist anti-aliasing lowpass filter is now
    generated automatically instead of set per-core
      - at 44.1KHz output, it's set to 22KHz; at 48KHz, it's set to
        22KHz; at 96KHz, it's set to 25KHz
      - this filter now takes the bsnes emulation speed setting into
        account
  - all system/video.cpp files removed; inlined in System::power() and
    Interface::set() instead
  - sfc/cpu: pre-compute `HTIME` as `HTIME+1<<2` for faster comparisons of
    HIRQs
  - sfc/cpu: re-add check to block IRQs on the last dot of each frame
    (minor speed hit)
  - hiro/gtk3: fixed headers for Linux compilation finally
  - hiro/gtk,qt: fixed settings.cpp logic so initial values are used
    when no settings.bml file exists
  - hiro/gtk: started a minor experiment to specify theming information
    in settings.bml files
  - nall/dsp: allow the precision type (double) to be overridden (to
    float)
  - nall: add some helpers for generating pre-compiled headers
      - it was a failure to try using them for higan, however ...
  - nall: add some helpers for reading fallback values from empty
    `Markup::Node[search]` statements

Todo:

  - CRITICAL: a lot of my IRQ/NMI/HDMA timing tests are failing with the
    fast PPU ... need to figure out why
  - space between Emulator::video functions and Emulator::audio
    functions in gb/system/system.cpp
  - remove Audio/Reverb/Enable from settings.bml in target-bsnes
This commit is contained in:
Tim Allen
2018-07-21 21:06:40 +10:00
parent 65a3e6c676
commit 35ff15f83e
60 changed files with 218 additions and 267 deletions

View File

@@ -43,9 +43,13 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#if defined(Hiro_SourceEdit)
#include <gtksourceview/gtksourceview.h>
#include <gtksourceview/gtksourcelanguagemanager.h>
#include <gtksourceview/gtksourcestyleschememanager.h>
#if HIRO_GTK==2
#include <gtksourceview/gtksourceview.h>
#include <gtksourceview/gtksourcelanguagemanager.h>
#include <gtksourceview/gtksourcestyleschememanager.h>
#elif HIRO_GTK==3
#include <gtksourceview/gtksource.h>
#endif
#endif
#include <nall/xorg/guard.hpp>
#endif

View File

@@ -8,16 +8,20 @@ Settings::Settings() {
auto document = BML::unserialize(file::read({path, "gtk3.bml"}));
#endif
auto get = [&](string_view name) {
return document[name];
};
#define get(name, type, value) \
if(auto node = document[name]) value = node.type()
geometry.frameX = get("Geometry/FrameX").integer();
geometry.frameY = get("Geometry/FrameY").integer();
geometry.frameWidth = get("Geometry/FrameWidth").integer();
geometry.frameHeight = get("Geometry/FrameHeight").integer();
geometry.menuHeight = get("Geometry/MenuHeight").integer();
geometry.statusHeight = get("Geometry/StatusHeight").integer();
get("Geometry/FrameX", integer, geometry.frameX);
get("Geometry/FrameY", integer, geometry.frameY);
get("Geometry/FrameWidth", integer, geometry.frameWidth);
get("Geometry/FrameHeight", integer, geometry.frameHeight);
get("Geometry/MenuHeight", integer, geometry.menuHeight);
get("Geometry/StatusHeight", integer, geometry.statusHeight);
get("Theme/ActionIcons", boolean, theme.actionIcons);
get("Theme/WidgetColors", boolean, theme.widgetColors);
#undef get
}
Settings::~Settings() {
@@ -25,9 +29,9 @@ Settings::~Settings() {
directory::create(path, 0755);
Markup::Node document;
auto set = [&](string_view name, string_view value) {
document(name).setValue(value);
};
#define set(name, value) \
document(name).setValue(value)
set("Geometry/FrameX", geometry.frameX);
set("Geometry/FrameY", geometry.frameY);
@@ -36,6 +40,11 @@ Settings::~Settings() {
set("Geometry/MenuHeight", geometry.menuHeight);
set("Geometry/StatusHeight", geometry.statusHeight);
set("Theme/ActionIcons", theme.actionIcons);
set("Theme/WidgetColors", theme.widgetColors);
#undef set
#if HIRO_GTK==2
file::write({path, "gtk2.bml"}, BML::serialize(document));
#elif HIRO_GTK==3

View File

@@ -14,6 +14,11 @@ struct Settings {
int menuHeight = 8;
int statusHeight = 4;
} geometry;
struct Theme {
bool actionIcons = true;
bool widgetColors = true;
} theme;
};
static Settings settings;

View File

@@ -257,14 +257,14 @@ auto pTableView::_doDataFunc(GtkTreeViewColumn* gtkColumn, GtkCellRenderer* rend
pango_font_description_free(font);
if(auto color = cell->foregroundColor(true)) {
auto gdkColor = CreateColor(color);
g_object_set(G_OBJECT(renderer), "foreground-gdk", &gdkColor, nullptr);
if(settings.theme.widgetColors) g_object_set(G_OBJECT(renderer), "foreground-gdk", &gdkColor, nullptr);
} else {
g_object_set(G_OBJECT(renderer), "foreground-set", false, nullptr);
}
}
if(auto color = cell->backgroundColor(true)) {
auto gdkColor = CreateColor(color);
g_object_set(G_OBJECT(renderer), "cell-background-gdk", &gdkColor, nullptr);
if(settings.theme.widgetColors) g_object_set(G_OBJECT(renderer), "cell-background-gdk", &gdkColor, nullptr);
} else {
g_object_set(G_OBJECT(renderer), "cell-background-set", false, nullptr);
}