mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-30 05:00:11 +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:
@@ -7,7 +7,7 @@ struct BrowserDialogWindow {
|
||||
auto change() -> void;
|
||||
auto isFolder(const string& name) -> bool;
|
||||
auto isMatch(const string& name) -> bool;
|
||||
auto run() -> lstring;
|
||||
auto run() -> string_vector;
|
||||
auto setPath(string path) -> void;
|
||||
|
||||
private:
|
||||
@@ -26,7 +26,7 @@ private:
|
||||
Button cancelButton{&controlLayout, Size{80, 0}, 5};
|
||||
|
||||
BrowserDialog::State& state;
|
||||
vector<lstring> filters;
|
||||
vector<string_vector> filters;
|
||||
};
|
||||
|
||||
//accept button clicked, or enter pressed on file name line edit
|
||||
@@ -113,7 +113,7 @@ auto BrowserDialogWindow::isMatch(const string& name) -> bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto BrowserDialogWindow::run() -> lstring {
|
||||
auto BrowserDialogWindow::run() -> string_vector {
|
||||
state.response.reset();
|
||||
|
||||
layout.setMargin(5);
|
||||
@@ -197,7 +197,7 @@ auto BrowserDialog::openFile() -> string {
|
||||
return {};
|
||||
}
|
||||
|
||||
auto BrowserDialog::openFiles() -> lstring {
|
||||
auto BrowserDialog::openFiles() -> string_vector {
|
||||
state.action = "openFiles";
|
||||
if(!state.title) state.title = "Open Files";
|
||||
if(auto result = _run()) return result;
|
||||
@@ -225,7 +225,7 @@ auto BrowserDialog::selectFolder() -> string {
|
||||
return {};
|
||||
}
|
||||
|
||||
auto BrowserDialog::setFilters(const lstring& filters) -> type& {
|
||||
auto BrowserDialog::setFilters(const string_vector& filters) -> type& {
|
||||
state.filters = filters;
|
||||
return *this;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ auto BrowserDialog::setTitle(const string& title) -> type& {
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto BrowserDialog::_run() -> lstring {
|
||||
auto BrowserDialog::_run() -> string_vector {
|
||||
if(!state.path) state.path = Path::user();
|
||||
return BrowserDialogWindow(state).run();
|
||||
}
|
||||
|
@@ -6,12 +6,12 @@ struct BrowserDialog {
|
||||
using type = BrowserDialog;
|
||||
|
||||
BrowserDialog();
|
||||
auto openFile() -> string; //one existing file
|
||||
auto openFiles() -> lstring; //any existing files or folders
|
||||
auto openFolder() -> string; //one existing folder
|
||||
auto saveFile() -> string; //one file
|
||||
auto selectFolder() -> string; //one existing folder
|
||||
auto setFilters(const lstring& filters = {}) -> type&;
|
||||
auto openFile() -> string; //one existing file
|
||||
auto openFiles() -> string_vector; //any existing files or folders
|
||||
auto openFolder() -> string; //one existing folder
|
||||
auto saveFile() -> string; //one file
|
||||
auto selectFolder() -> string; //one existing folder
|
||||
auto setFilters(const string_vector& filters = {}) -> type&;
|
||||
auto setParent(const sWindow& parent) -> type&;
|
||||
auto setPath(const string& path = "") -> type&;
|
||||
auto setTitle(const string& title = "") -> type&;
|
||||
@@ -19,14 +19,14 @@ struct BrowserDialog {
|
||||
private:
|
||||
struct State {
|
||||
string action;
|
||||
lstring filters = {"*"};
|
||||
string_vector filters = {"*"};
|
||||
sWindow parent;
|
||||
string path;
|
||||
lstring response;
|
||||
string_vector response;
|
||||
string title;
|
||||
} state;
|
||||
|
||||
auto _run() -> lstring;
|
||||
auto _run() -> string_vector;
|
||||
|
||||
friend class BrowserDialogWindow;
|
||||
};
|
||||
|
@@ -4,19 +4,19 @@ MessageDialog::MessageDialog(const string& text) {
|
||||
state.text = text;
|
||||
}
|
||||
|
||||
auto MessageDialog::error(const lstring& buttons) -> string {
|
||||
auto MessageDialog::error(const string_vector& buttons) -> string {
|
||||
state.buttons = buttons;
|
||||
state.icon = Icon::Prompt::Error;
|
||||
return _run();
|
||||
}
|
||||
|
||||
auto MessageDialog::information(const lstring& buttons) -> string {
|
||||
auto MessageDialog::information(const string_vector& buttons) -> string {
|
||||
state.buttons = buttons;
|
||||
state.icon = Icon::Prompt::Information;
|
||||
return _run();
|
||||
}
|
||||
|
||||
auto MessageDialog::question(const lstring& buttons) -> string {
|
||||
auto MessageDialog::question(const string_vector& buttons) -> string {
|
||||
state.buttons = buttons;
|
||||
state.icon = Icon::Prompt::Question;
|
||||
return _run();
|
||||
@@ -37,7 +37,7 @@ auto MessageDialog::setTitle(const string& title) -> type& {
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto MessageDialog::warning(const lstring& buttons) -> string {
|
||||
auto MessageDialog::warning(const string_vector& buttons) -> string {
|
||||
state.buttons = buttons;
|
||||
state.icon = Icon::Prompt::Warning;
|
||||
return _run();
|
||||
|
@@ -4,17 +4,17 @@ struct MessageDialog {
|
||||
using type = MessageDialog;
|
||||
|
||||
MessageDialog(const string& text = "");
|
||||
auto error(const lstring& buttons = {"Ok"}) -> string;
|
||||
auto information(const lstring& buttons = {"Ok"}) -> string;
|
||||
auto question(const lstring& buttons = {"Yes", "No"}) -> string;
|
||||
auto error(const string_vector& buttons = {"Ok"}) -> string;
|
||||
auto information(const string_vector& buttons = {"Ok"}) -> string;
|
||||
auto question(const string_vector& buttons = {"Yes", "No"}) -> string;
|
||||
auto setParent(sWindow parent = {}) -> type&;
|
||||
auto setText(const string& text = "") -> type&;
|
||||
auto setTitle(const string& title = "") -> type&;
|
||||
auto warning(const lstring& buttons = {"Ok"}) -> string;
|
||||
auto warning(const string_vector& buttons = {"Ok"}) -> string;
|
||||
|
||||
private:
|
||||
struct State {
|
||||
lstring buttons;
|
||||
string_vector buttons;
|
||||
vector<uint8_t> icon;
|
||||
sWindow parent;
|
||||
string response;
|
||||
|
Reference in New Issue
Block a user