mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-29 15:29:57 +02:00
Update to v099r15 release.
byuu says: Changelog: - nall::lstring -> nall::string_vector - added IntegerBitField<type, lo, hi> -- hopefully it works correctly... - Multitap 1-4 -> Super Multitap 2-5 - fixed SFC PPU CGRAM read regression - huge amounts of SFC PPU IO register cleanups -- .bits really is lovely - re-added the read/write(VRAM,OAM,CGRAM) helpers for the SFC PPU - but they're now optimized to the realities of the PPU (16-bit data sizes / no address parameter / where appropriate) - basically used to get the active-display overrides in a unified place; but also reduces duplicate code in (read,write)IO
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
namespace hiro {
|
||||
|
||||
static auto BrowserWindow_addFilters(GtkWidget* dialog, lstring filters) -> void {
|
||||
static auto BrowserWindow_addFilters(GtkWidget* dialog, string_vector filters) -> void {
|
||||
for(auto& filter : filters) {
|
||||
GtkFileFilter* gtkFilter = gtk_file_filter_new();
|
||||
gtk_file_filter_set_name(gtkFilter, filter);
|
||||
lstring patterns = filter.split("(", 1L)(1).trimRight(")", 1L).split(",").strip();
|
||||
auto patterns = filter.split("(", 1L)(1).trimRight(")", 1L).split(",").strip();
|
||||
for(auto& pattern : patterns) gtk_file_filter_add_pattern(gtkFilter, pattern);
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), gtkFilter);
|
||||
}
|
||||
|
@@ -36,11 +36,11 @@ static auto CreateImage(const image& icon, bool scale = false) -> GtkImage* {
|
||||
return gtkIcon;
|
||||
}
|
||||
|
||||
static auto DropPaths(GtkSelectionData* data) -> lstring {
|
||||
static auto DropPaths(GtkSelectionData* data) -> string_vector {
|
||||
gchar** uris = gtk_selection_data_get_uris(data);
|
||||
if(uris == nullptr) return {};
|
||||
|
||||
lstring paths;
|
||||
string_vector paths;
|
||||
for(unsigned n = 0; uris[n] != nullptr; n++) {
|
||||
gchar* pathname = g_filename_from_uri(uris[n], nullptr, nullptr);
|
||||
if(pathname == nullptr) continue;
|
||||
|
@@ -5,7 +5,7 @@ namespace hiro {
|
||||
static auto Canvas_drop(GtkWidget* widget, GdkDragContext* context, signed x, signed y,
|
||||
GtkSelectionData* data, unsigned type, unsigned timestamp, pCanvas* p) -> void {
|
||||
if(!p->state().droppable) return;
|
||||
lstring paths = DropPaths(data);
|
||||
auto paths = DropPaths(data);
|
||||
if(!paths) return;
|
||||
p->self().doDrop(paths);
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ struct pConsole : pWidget {
|
||||
GtkWidget* subWidget = nullptr;
|
||||
GtkTextBuffer* textBuffer = nullptr;
|
||||
string previousPrompt;
|
||||
lstring history;
|
||||
string_vector history;
|
||||
unsigned historyOffset = 0;
|
||||
};
|
||||
|
||||
|
@@ -5,7 +5,7 @@ namespace hiro {
|
||||
static auto Viewport_dropEvent(GtkWidget* widget, GdkDragContext* context, signed x, signed y,
|
||||
GtkSelectionData* data, unsigned type, unsigned timestamp, pViewport* p) -> void {
|
||||
if(!p->state().droppable) return;
|
||||
lstring paths = DropPaths(data);
|
||||
auto paths = DropPaths(data);
|
||||
if(!paths) return;
|
||||
p->self().doDrop(paths);
|
||||
}
|
||||
|
@@ -81,7 +81,7 @@ static auto Window_configure(GtkWidget* widget, GdkEvent* event, pWindow* p) ->
|
||||
static auto Window_drop(GtkWidget* widget, GdkDragContext* context, signed x, signed y,
|
||||
GtkSelectionData* data, unsigned type, unsigned timestamp, pWindow* p) -> void {
|
||||
if(!p->state().droppable) return;
|
||||
lstring paths = DropPaths(data);
|
||||
auto paths = DropPaths(data);
|
||||
if(!paths) return;
|
||||
p->self().doDrop(paths);
|
||||
}
|
||||
|
Reference in New Issue
Block a user