mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-29 09:00:02 +02:00
Update to v094r38 release.
byuu says: I'll post more detailed changes later, but basically: - fixed Baldur's Gate bug - guess if no flash ROM ID present (fixes Magical Vacation, many many others) - nall cleanups - sfc/cartridge major cleanups - bsxcartridge/"bsx" renamed to mcc/"mcc" after the logic chip it uses (consistency with SGB/ICD2) - ... and more!
This commit is contained in:
@@ -13,17 +13,17 @@ struct BrowserDialogWindow {
|
||||
private:
|
||||
Window window;
|
||||
VerticalLayout layout{&window};
|
||||
HorizontalLayout pathLayout{&layout, Size{~0, 0}, 8};
|
||||
HorizontalLayout pathLayout{&layout, Size{~0, 0}, 5};
|
||||
LineEdit pathName{&pathLayout, Size{~0, 0}, 0};
|
||||
Button pathHome{&pathLayout, Size{0, 0}, 0};
|
||||
Button pathRefresh{&pathLayout, Size{0, 0}, 0};
|
||||
Button pathUp{&pathLayout, Size{0, 0}, 0};
|
||||
ListView view{&layout, Size{~0, ~0}, 8};
|
||||
ListView view{&layout, Size{~0, ~0}, 5};
|
||||
HorizontalLayout controlLayout{&layout, Size{~0, 0}};
|
||||
ComboButton filterList{&controlLayout, Size{120, 0}, 8};
|
||||
LineEdit fileName{&controlLayout, Size{~0, 0}, 8};
|
||||
Button acceptButton{&controlLayout, Size{80, 0}, 8};
|
||||
Button cancelButton{&controlLayout, Size{80, 0}, 8};
|
||||
ComboButton filterList{&controlLayout, Size{120, 0}, 5};
|
||||
LineEdit fileName{&controlLayout, Size{~0, 0}, 5};
|
||||
Button acceptButton{&controlLayout, Size{80, 0}, 5};
|
||||
Button cancelButton{&controlLayout, Size{80, 0}, 5};
|
||||
|
||||
BrowserDialog::State& state;
|
||||
vector<lstring> filters;
|
||||
@@ -116,7 +116,7 @@ auto BrowserDialogWindow::isMatch(const string& name) -> bool {
|
||||
auto BrowserDialogWindow::run() -> lstring {
|
||||
state.response.reset();
|
||||
|
||||
layout.setMargin(8);
|
||||
layout.setMargin(5);
|
||||
pathName.onActivate([&] { setPath(pathName.text()); });
|
||||
pathHome.setBordered(false).setIcon(Icon::Go::Home).onActivate([&] { setPath(userpath()); });
|
||||
pathRefresh.setBordered(false).setIcon(Icon::Action::Refresh).onActivate([&] { setPath(state.path); });
|
||||
@@ -175,7 +175,7 @@ auto BrowserDialogWindow::setPath(string path) -> void {
|
||||
|
||||
view.append(ListViewItem()
|
||||
.append(ListViewCell().setText(content).setIcon(Icon::Emblem::Folder))
|
||||
.append(ListViewCell().setText(octal(storage::mode({path, content}) & 0777, 3L)))
|
||||
.append(ListViewCell().setText(octal(file_system_object::mode({path, content}) & 0777, 3L)))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ auto BrowserDialogWindow::setPath(string path) -> void {
|
||||
|
||||
view.append(ListViewItem()
|
||||
.append(ListViewCell().setText(content).setIcon(folderMode ? Icon::Action::Open : Icon::Emblem::File))
|
||||
.append(ListViewCell().setText(octal(storage::mode({path, content}) & 0777, 3L)))
|
||||
.append(ListViewCell().setText(octal(file_system_object::mode({path, content}) & 0777, 3L)))
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -46,24 +46,24 @@ auto MessageDialog::warning(const lstring& buttons) -> string {
|
||||
auto MessageDialog::_run() -> string {
|
||||
Window window;
|
||||
VerticalLayout layout{&window};
|
||||
HorizontalLayout messageLayout{&layout, Size{~0, 0}, 8};
|
||||
Canvas messageIcon{&messageLayout, Size{16, 16}, 8};
|
||||
HorizontalLayout messageLayout{&layout, Size{~0, 0}, 5};
|
||||
Canvas messageIcon{&messageLayout, Size{16, 16}, 5};
|
||||
Label messageText{&messageLayout, Size{~0, 0}};
|
||||
HorizontalLayout controlLayout{&layout, Size{~0, 0}};
|
||||
Widget controlSpacer{&controlLayout, Size{~0, 0}};
|
||||
|
||||
layout.setMargin(8);
|
||||
layout.setMargin(5);
|
||||
messageIcon.setIcon(state.icon);
|
||||
messageText.setText(state.text);
|
||||
for(auto n : range(state.buttons)) {
|
||||
Button button{&controlLayout, Size{80, 0}, 8};
|
||||
Button button{&controlLayout, Size{80, 0}, 5};
|
||||
button.onActivate([&, n] { state.response = state.buttons[n]; window.setModal(false); });
|
||||
button.setText(state.buttons[n]);
|
||||
button.setFocused(); //the last button will have effective focus
|
||||
}
|
||||
|
||||
signed widthMessage = 8 + 16 + 8 + Font::size(Font::sans(), state.text).width() + 8;
|
||||
signed widthButtons = 8 + state.buttons.size() * 88;
|
||||
signed widthMessage = 5 + 16 + 5 + Font::size(Font::sans(), state.text).width() + 5;
|
||||
signed widthButtons = 5 + state.buttons.size() * 85;
|
||||
signed width = max(320, widthMessage, widthButtons);
|
||||
|
||||
window.onClose([&] { window.setModal(false); });
|
||||
|
Reference in New Issue
Block a user