mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-03 07:02:44 +02:00
Update to v098r08 release.
byuu says: Changelog: - nall/vector rewritten from scratch - higan/audio uses nall/vector instead of raw pointers - higan/sfc/coprocessor/sdd1 updated with new research information - ruby/video/glx and ruby/video/glx2: fuck salt glXSwapIntervalEXT! The big change here is definitely nall/vector. The Windows, OS X and Qt ports won't compile until you change some first/last strings to left/right, but GTK will compile. I'd be really grateful if anyone could stress-test nall/vector. Pretty much everything I do relies on this class. If we introduce a bug, the worst case scenario is my entire SFC game dump database gets corrupted, or the byuu.org server gets compromised. So it's really critical that we test the hell out of this right now. The S-DD1 changes mean you need to update your installation of icarus again. Also, even though the Lunar FMV never really worked on the accuracy core anyway (it didn't initialize the PPU properly), it really won't work now that we emulate the hard-limit of 16MiB for S-DD1 games.
This commit is contained in:
@@ -48,7 +48,7 @@ auto mMenu::remove(sAction action) -> type& {
|
||||
}
|
||||
|
||||
auto mMenu::reset() -> type& {
|
||||
while(state.actions) remove(state.actions.last());
|
||||
while(state.actions) remove(state.actions.right());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@ auto mLayout::remove(sSizable sizable) -> type& {
|
||||
}
|
||||
|
||||
auto mLayout::reset() -> type& {
|
||||
while(state.sizables) remove(state.sizables.last());
|
||||
while(state.sizables) remove(state.sizables.right());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ auto mMenuBar::remove(sMenu menu) -> type& {
|
||||
}
|
||||
|
||||
auto mMenuBar::reset() -> type& {
|
||||
while(state.menus) remove(state.menus.last());
|
||||
while(state.menus) remove(state.menus.right());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@@ -45,7 +45,7 @@ auto mPopupMenu::remove(sAction action) -> type& {
|
||||
}
|
||||
|
||||
auto mPopupMenu::reset() -> type& {
|
||||
while(state.actions) remove(state.actions.last());
|
||||
while(state.actions) remove(state.actions.right());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@@ -86,7 +86,7 @@ struct Group : sGroup {
|
||||
template<typename T = Object> auto objects() const -> vector<T> {
|
||||
vector<T> objects;
|
||||
for(auto object : self().objects()) {
|
||||
if(auto cast = object.cast<T>()) objects.append(cast);
|
||||
if(auto casted = object.cast<T>()) objects.append(casted);
|
||||
}
|
||||
return objects;
|
||||
}
|
||||
|
@@ -77,7 +77,7 @@ auto mTabFrame::remove(sTabFrameItem item) -> type& {
|
||||
}
|
||||
|
||||
auto mTabFrame::reset() -> type& {
|
||||
while(state.items) remove(state.items.last());
|
||||
while(state.items) remove(state.items.right());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@@ -59,9 +59,9 @@ auto mTreeViewItem::icon() const -> image {
|
||||
auto mTreeViewItem::item(const string& path) const -> TreeViewItem {
|
||||
if(path.empty()) return {};
|
||||
auto paths = path.split("/");
|
||||
unsigned position = paths.takeFirst().natural();
|
||||
unsigned position = paths.takeLeft().natural();
|
||||
if(position >= itemCount()) return {};
|
||||
if(paths.empty()) return state.items[position];
|
||||
if(!paths) return state.items[position];
|
||||
return state.items[position]->item(paths.merge("/"));
|
||||
}
|
||||
|
||||
|
@@ -45,9 +45,9 @@ auto mTreeView::foregroundColor() const -> Color {
|
||||
auto mTreeView::item(const string& path) const -> TreeViewItem {
|
||||
if(path.empty()) return {};
|
||||
auto paths = path.split("/");
|
||||
unsigned position = paths.takeFirst().natural();
|
||||
unsigned position = paths.takeLeft().natural();
|
||||
if(position >= itemCount()) return {};
|
||||
if(paths.empty()) return state.items[position];
|
||||
if(!paths) return state.items[position];
|
||||
return state.items[position]->item(paths.merge("/"));
|
||||
}
|
||||
|
||||
|
@@ -35,7 +35,7 @@ auto BrowserDialogWindow::accept() -> void {
|
||||
auto batched = view.batched();
|
||||
|
||||
if(state.action == "openFile" && batched) {
|
||||
string name = batched.first()->cell(0)->text();
|
||||
string name = batched.left()->cell(0)->text();
|
||||
if(isFolder(name)) return setPath({state.path, name});
|
||||
state.response.append(string{state.path, name});
|
||||
}
|
||||
@@ -48,14 +48,14 @@ auto BrowserDialogWindow::accept() -> void {
|
||||
}
|
||||
|
||||
if(state.action == "openFolder" && batched) {
|
||||
string name = batched.first()->cell(0)->text();
|
||||
string name = batched.left()->cell(0)->text();
|
||||
if(!isMatch(name)) return setPath({state.path, name});
|
||||
state.response.append(string{state.path, name, "/"});
|
||||
}
|
||||
|
||||
if(state.action == "saveFile") {
|
||||
string name = fileName.text();
|
||||
if(!name && batched) name = batched.first()->cell(0)->text();
|
||||
if(!name && batched) name = batched.left()->cell(0)->text();
|
||||
if(!name || isFolder(name)) return;
|
||||
if(file::exists({state.path, name})) {
|
||||
if(MessageDialog("File already exists; overwrite it?").question() != "Yes") return;
|
||||
@@ -64,7 +64,7 @@ auto BrowserDialogWindow::accept() -> void {
|
||||
}
|
||||
|
||||
if(state.action == "selectFolder" && batched) {
|
||||
string name = batched.first()->cell(0)->text();
|
||||
string name = batched.left()->cell(0)->text();
|
||||
if(isFolder(name)) state.response.append(string{state.path, name, "/"});
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ auto BrowserDialogWindow::run() -> lstring {
|
||||
filterList.setVisible(state.action != "selectFolder").onChange([&] { setPath(state.path); });
|
||||
for(auto& filter : state.filters) {
|
||||
auto part = filter.split("|", 1L);
|
||||
filterList.append(ComboButtonItem().setText(part.first()));
|
||||
filterList.append(ComboButtonItem().setText(part.left()));
|
||||
}
|
||||
fileName.setVisible(state.action == "saveFile").onActivate([&] { accept(); });
|
||||
acceptButton.onActivate([&] { accept(); });
|
||||
@@ -137,7 +137,7 @@ auto BrowserDialogWindow::run() -> lstring {
|
||||
if(!state.filters) state.filters.append("All|*");
|
||||
for(auto& filter : state.filters) {
|
||||
auto part = filter.split("|", 1L);
|
||||
filters.append(part.last().split(":"));
|
||||
filters.append(part.right().split(":"));
|
||||
}
|
||||
|
||||
setPath(state.path);
|
||||
@@ -201,7 +201,7 @@ BrowserDialog::BrowserDialog() {
|
||||
auto BrowserDialog::openFile() -> string {
|
||||
state.action = "openFile";
|
||||
if(!state.title) state.title = "Open File";
|
||||
if(auto result = _run()) return result.first();
|
||||
if(auto result = _run()) return result.left();
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -215,21 +215,21 @@ auto BrowserDialog::openFiles() -> lstring {
|
||||
auto BrowserDialog::openFolder() -> string {
|
||||
state.action = "openFolder";
|
||||
if(!state.title) state.title = "Open Folder";
|
||||
if(auto result = _run()) return result.first();
|
||||
if(auto result = _run()) return result.left();
|
||||
return {};
|
||||
}
|
||||
|
||||
auto BrowserDialog::saveFile() -> string {
|
||||
state.action = "saveFile";
|
||||
if(!state.title) state.title = "Save File";
|
||||
if(auto result = _run()) return result.first();
|
||||
if(auto result = _run()) return result.left();
|
||||
return {};
|
||||
}
|
||||
|
||||
auto BrowserDialog::selectFolder() -> string {
|
||||
state.action = "selectFolder";
|
||||
if(!state.title) state.title = "Select Folder";
|
||||
if(auto result = _run()) return result.first();
|
||||
if(auto result = _run()) return result.left();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ auto mHorizontalLayout::minimumSize() const -> Size {
|
||||
} else {
|
||||
width += child.width;
|
||||
}
|
||||
if(&child != &properties.last()) width += child.spacing;
|
||||
if(&child != &properties.right()) width += child.spacing;
|
||||
}
|
||||
|
||||
for(auto n : range(sizableCount())) {
|
||||
@@ -94,7 +94,7 @@ auto mHorizontalLayout::setGeometry(Geometry containerGeometry) -> type& {
|
||||
for(auto& child : properties) {
|
||||
if(child.width == Size::Maximum) maximumWidthCounter++;
|
||||
if(child.width != Size::Maximum) minimumWidth += child.width;
|
||||
if(&child != &properties.last()) minimumWidth += child.spacing;
|
||||
if(&child != &properties.right()) minimumWidth += child.spacing;
|
||||
}
|
||||
|
||||
for(auto& child : properties) {
|
||||
|
@@ -35,7 +35,7 @@ auto mVerticalLayout::minimumSize() const -> Size {
|
||||
} else {
|
||||
height += child.height;
|
||||
}
|
||||
if(&child != &properties.last()) height += child.spacing;
|
||||
if(&child != &properties.right()) height += child.spacing;
|
||||
}
|
||||
|
||||
return {settings.margin * 2 + width, settings.margin * 2 + height};
|
||||
@@ -94,7 +94,7 @@ auto mVerticalLayout::setGeometry(Geometry containerGeometry) -> type& {
|
||||
for(auto& child : properties) {
|
||||
if(child.height == Size::Maximum) maximumHeightCounter++;
|
||||
if(child.height != Size::Maximum) minimumHeight += child.height;
|
||||
if(&child != &properties.last()) minimumHeight += child.spacing;
|
||||
if(&child != &properties.right()) minimumHeight += child.spacing;
|
||||
}
|
||||
|
||||
for(auto& child : properties) {
|
||||
|
@@ -6,7 +6,7 @@ static auto Canvas_drop(GtkWidget* widget, GdkDragContext* context, signed x, si
|
||||
GtkSelectionData* data, unsigned type, unsigned timestamp, pCanvas* p) -> void {
|
||||
if(!p->state().droppable) return;
|
||||
lstring paths = DropPaths(data);
|
||||
if(paths.empty()) return;
|
||||
if(!paths) return;
|
||||
p->self().doDrop(paths);
|
||||
}
|
||||
|
||||
|
@@ -83,7 +83,7 @@ auto pConsole::_keyPress(unsigned scancode, unsigned mask) -> bool {
|
||||
gtk_text_buffer_insert(textBuffer, &end, string{"\n", state().prompt}, -1);
|
||||
self().doActivate(s);
|
||||
if(s) history.prepend(s);
|
||||
if(history.size() > 128) history.removeLast();
|
||||
if(history.size() > 128) history.removeRight();
|
||||
historyOffset = 0;
|
||||
_seekToEnd();
|
||||
return true;
|
||||
|
@@ -133,10 +133,10 @@ auto pTreeView::_doDataFunc(GtkTreeViewColumn* column, GtkCellRenderer* renderer
|
||||
auto parts = string{path}.split(":");
|
||||
g_free(path);
|
||||
|
||||
auto item = self().item(parts.takeFirst().natural());
|
||||
auto item = self().item(parts.takeLeft().natural());
|
||||
if(!item) return;
|
||||
while(parts) {
|
||||
item = item.item(parts.takeFirst().natural());
|
||||
item = item.item(parts.takeLeft().natural());
|
||||
if(!item) return;
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ static auto Viewport_dropEvent(GtkWidget* widget, GdkDragContext* context, signe
|
||||
GtkSelectionData* data, unsigned type, unsigned timestamp, pViewport* p) -> void {
|
||||
if(!p->state().droppable) return;
|
||||
lstring paths = DropPaths(data);
|
||||
if(paths.empty()) return;
|
||||
if(!paths) return;
|
||||
p->self().doDrop(paths);
|
||||
}
|
||||
|
||||
|
@@ -82,7 +82,7 @@ static auto Window_drop(GtkWidget* widget, GdkDragContext* context, signed x, si
|
||||
GtkSelectionData* data, unsigned type, unsigned timestamp, pWindow* p) -> void {
|
||||
if(!p->state().droppable) return;
|
||||
lstring paths = DropPaths(data);
|
||||
if(paths.empty()) return;
|
||||
if(!paths) return;
|
||||
p->self().doDrop(paths);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user