mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-25 20:40:45 +02:00
v114.5
* improved appended firmware detection [devinacker] * added dynamic rate control support to ALSA and PulseAudio drivers [RedDwarf] * added option to use native file dialogs
This commit is contained in:
@@ -15,6 +15,11 @@ auto Log_Filter(const char* logDomain, GLogLevelFlags logLevel, const char* mess
|
||||
print(terminal::color::yellow("hiro: "), logDomain, "::", message, "\n");
|
||||
}
|
||||
|
||||
auto pApplication::exit() -> void {
|
||||
quit();
|
||||
::exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
auto pApplication::modal() -> bool {
|
||||
return Application::state().modal > 0;
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
namespace hiro {
|
||||
|
||||
struct pApplication {
|
||||
static auto exit() -> void;
|
||||
static auto modal() -> bool;
|
||||
static auto run() -> void;
|
||||
static auto pendingEvents() -> bool;
|
||||
|
@@ -4,9 +4,12 @@ namespace hiro {
|
||||
|
||||
static auto BrowserWindow_addFilters(GtkWidget* dialog, vector<string> filters) -> void {
|
||||
for(auto& filter : filters) {
|
||||
auto part = filter.split("|", 1L);
|
||||
if(part.size() != 2) continue;
|
||||
|
||||
GtkFileFilter* gtkFilter = gtk_file_filter_new();
|
||||
gtk_file_filter_set_name(gtkFilter, filter);
|
||||
auto patterns = filter.split("(", 1L)(1).trimRight(")", 1L).split(",").strip();
|
||||
gtk_file_filter_set_name(gtkFilter, part[0]);
|
||||
auto patterns = part[1].split(":");
|
||||
for(auto& pattern : patterns) gtk_file_filter_add_pattern(gtkFilter, pattern);
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), gtkFilter);
|
||||
}
|
||||
|
@@ -32,6 +32,9 @@ auto pTableViewItem::setBackgroundColor(Color color) -> void {
|
||||
|
||||
auto pTableViewItem::setFocused() -> void {
|
||||
if(auto parent = _parent()) {
|
||||
//calling setSelected() and then setFocused() right after sometimes fails to set focus
|
||||
Application::processEvents();
|
||||
|
||||
auto lock = parent->acquire();
|
||||
GtkTreePath* path = gtk_tree_path_new_from_string(string{self().offset()});
|
||||
gtk_tree_view_set_cursor(parent->gtkTreeView, path, nullptr, false);
|
||||
|
@@ -127,6 +127,8 @@ auto pWidget::setGeometry(Geometry geometry) -> void {
|
||||
}
|
||||
}
|
||||
pSizable::setGeometry(geometry);
|
||||
//this is needed to prevent some repainting issues (specifically with a Label which has a background color set for it)
|
||||
gtk_widget_queue_draw(gtkWidget);
|
||||
}
|
||||
|
||||
auto pWidget::setMouseCursor(const MouseCursor& mouseCursor) -> void {
|
||||
|
Reference in New Issue
Block a user