Update to v106r55 release.

byuu says:

Everything *should* be working again, but of course that won't
actually be the case. Here's where things stand:

  - bsnes, higan, icarus, and genius compile and run fine on FreeBSD
    with GTK
  - ruby video and audio drivers are untested on Windows, macOS, and
    Linux
  - hiro is untested on macOS
  - bsnes' status bar is not showing up properly with hiro/qt
  - bsnes and higan's about screen is not showing up properly with
    hiro/qt (1x1 window size)
  - bsnes on Windows crashes often when saving states, and I'm not sure
    why ... it happens inside Encode::RLE
  - bsnes on Windows crashes with ruby.input.windows (unsure why)
  - bsnes on Windows fails to show the verified emblem on the status bar
    properly
  - hiro on Windows flickers when changing tabs

To build the Windows bsnes and higan ports, use

    ruby="video.gdi audio.directsound"

Compilation error logs for Linux will help me fix the inevitable list of
typos there. I can fix the typos on other platforms, I just haven't
gotten to it yet.
This commit is contained in:
Tim Allen
2018-08-05 19:00:15 +10:00
parent 552d385031
commit 5da4532771
117 changed files with 1316 additions and 2383 deletions

View File

@@ -10,7 +10,7 @@ bool pApplication::xdgScreenSaver = false;
#endif
auto pApplication::run() -> void {
while(!Application::state.quit) {
while(!Application::state().quit) {
Application::doMain();
processEvents();
}
@@ -48,7 +48,7 @@ auto pApplication::initialize() -> void {
#endif
//set WM_CLASS to Application::name()
auto name = Application::state.name ? Application::state.name : string{"hiro"};
auto name = Application::state().name ? Application::state().name : string{"hiro"};
gdk_set_program_class(name);
#if defined(BUILD_DEBUG)

View File

@@ -3,7 +3,7 @@
namespace hiro {
auto pKeyboard::poll() -> vector<bool> {
if(Application::state.quit) return {};
if(Application::state().quit) return {};
vector<bool> result;
char state[256];

View File

@@ -9,7 +9,7 @@ static auto Message(MessageWindow::State& state, GtkMessageType messageStyle) ->
);
if(state.title) gtk_window_set_title(GTK_WINDOW(dialog), state.title);
else if(Application::state.name) gtk_window_set_title(GTK_WINDOW(dialog), Application::state.name);
else if(Application::state().name) gtk_window_set_title(GTK_WINDOW(dialog), Application::state().name);
switch(state.buttons) {
case MessageWindow::Buttons::Ok:

View File

@@ -2,7 +2,7 @@
namespace hiro {
struct pObject : mLock {
struct pObject : Lock {
pObject(mObject& reference) : reference(reference) {}
virtual ~pObject() {}
auto self() const -> mObject& { return (mObject&)reference; }

View File

@@ -14,6 +14,7 @@ auto pRadioLabel::construct() -> void {
gtkToggleButton = GTK_TOGGLE_BUTTON(gtkWidget);
gtkRadioButton = GTK_RADIO_BUTTON(gtkWidget);
setGroup(state().group);
setText(state().text);
g_signal_connect(G_OBJECT(gtkWidget), "toggled", G_CALLBACK(RadioLabel_activate), (gpointer)this);
@@ -31,9 +32,8 @@ auto pRadioLabel::minimumSize() const -> Size {
}
auto pRadioLabel::setChecked() -> void {
lock();
auto lock = acquire();
gtk_toggle_button_set_active(gtkToggleButton, true);
unlock();
}
auto pRadioLabel::setGroup(sGroup group) -> void {
@@ -42,7 +42,7 @@ auto pRadioLabel::setGroup(sGroup group) -> void {
if(auto object = weak.acquire()) {
if(auto radioLabel = dynamic_cast<mRadioLabel*>(object.data())) {
if(auto self = radioLabel->self()) {
self->lock();
auto lock = self->acquire();
gtk_radio_button_set_group(self->gtkRadioButton, nullptr);
if(!gtkRadioButton) {
gtkRadioButton = self->gtkRadioButton;
@@ -51,7 +51,6 @@ auto pRadioLabel::setGroup(sGroup group) -> void {
gtk_radio_button_set_group(self->gtkRadioButton, gtk_radio_button_get_group(*gtkRadioButton));
gtk_toggle_button_set_active(self->gtkToggleButton, radioLabel->state.checked = false);
}
self->unlock();
}
}
}

View File

@@ -138,7 +138,7 @@ auto pWindow::construct() -> void {
gtk_window_set_resizable(GTK_WINDOW(widget), true);
//if program was given a name, try and set the window taskbar icon from one of the pixmaps folders
if(!Application::state.name);
if(!Application::state().name);
else if(_setIcon({Path::user(), ".local/share/icons/"}));
else if(_setIcon("/usr/local/share/pixmaps/"));
else if(_setIcon("/usr/share/pixmaps/"));
@@ -379,8 +379,8 @@ auto pWindow::setMinimumSize(Size size) -> void {
auto pWindow::setModal(bool modal) -> void {
if(modal) {
gtk_window_set_modal(GTK_WINDOW(widget), true);
while(!Application::state.quit && state().modal) {
if(Application::state.onMain) {
while(!Application::state().quit && state().modal) {
if(Application::state().onMain) {
Application::doMain();
} else {
usleep(20 * 1000);
@@ -454,13 +454,13 @@ auto pWindow::_menuTextHeight() const -> int {
auto pWindow::_setIcon(const string& pathname) -> bool {
string filename;
filename = {pathname, Application::state.name, ".svg"};
filename = {pathname, Application::state().name, ".svg"};
if(file::exists(filename)) {
gtk_window_set_icon_from_file(GTK_WINDOW(widget), filename, nullptr);
return true;
}
filename = {pathname, Application::state.name, ".png"};
filename = {pathname, Application::state().name, ".png"};
if(file::exists(filename)) {
//maximum image size GTK+ supports is 256x256; scale image down if necessary to prevent error
image icon(filename);