mirror of https://github.com/bsnes-emu/bsnes.git
Update to icarus_20151002.
byuu says: - fixes checkboxes (-again- again [*again*]) - won't check folders with select all / unselect all - won't crash anymore if the SNES ROM image is too small (Saturday Night Slam Masters was crashing it before due to DB size error) - corrected heuristics for Sufami Turbo base cart (mirrors the absurdities of the real cart precisely, since it's one of a kind) - corrected a few DB issues (BS-X name + PSRAM (again [*again*]), SNSM, LAH) (_again_) - these are temporary. Monkey patched in the generated .hpp source rather than the actual DB - not going to fix the SFT sizes because I want to verify what happened there first
This commit is contained in:
parent
1a90e206e0
commit
bc5ad4a1cd
|
@ -316,18 +316,12 @@ static auto CALLBACK Shared_windowProc(WindowProc windowProc, HWND hwnd, UINT ms
|
|||
}
|
||||
|
||||
case WM_NOTIFY: {
|
||||
//WC_TABCONTROL requires parenting widgets to it; rather than the WINDOW
|
||||
//without doing this; backgrounds on transparent controls (eg STATIC) are painted wrong
|
||||
//this causes some WC_LISTVIEW WM_NOTIFY messages to only go to the WC_TABCONTROL WNDPROC
|
||||
//all other controls also send their messages to the WC_TABCONTROL WNDPROC
|
||||
//to avoid duplicating all message logic, hiro shares a WNDPROC with Window and TabFrame
|
||||
//LVN_ITEM(ACTIVATE,CHANGED) are only sent to the TabFrame, as expected
|
||||
//yet for unknown reasons, LVN_COLUMNCLICK and NM_(CLICK,DBLCLK,RCLICK) are
|
||||
//sent to both the TabFrame, and then again to the Window's WNDPROC
|
||||
//this causes on(Sort,Toggle,Context) to trigger callbacks twice
|
||||
//if we try to block propagation to the Window (via return instead of break); then
|
||||
//this will result in the LVN_ITEM(ACTIVATE,CHANGED) never being invoked (unsure why)
|
||||
//as a workaround; we must detect these message to the Windows' WNDPROC, and block them
|
||||
//Widgets inside a TabFrame must be parented to it rather than the Window.
|
||||
//This is critical for proper inheritance of styles and message passing.
|
||||
//However, by doing this, some WM_NOTIFY messages end up being sent to both
|
||||
//the TabFrame and the Window; while others are only sent to the TabFrame.
|
||||
//To save code, hiro uses a shared callback for both of these cases.
|
||||
//So when a message is sent to both, we ignore the TabFrame message.
|
||||
bool isWindowCallback = (object == window);
|
||||
|
||||
auto header = (LPNMHDR)lparam;
|
||||
|
@ -345,16 +339,16 @@ static auto CALLBACK Shared_windowProc(WindowProc windowProc, HWND hwnd, UINT ms
|
|||
break;
|
||||
}
|
||||
if(header->code == LVN_COLUMNCLICK) {
|
||||
if(!isWindowCallback) listView->self()->onSort(lparam);
|
||||
if(isWindowCallback) listView->self()->onSort(lparam);
|
||||
break;
|
||||
}
|
||||
if(header->code == NM_CLICK || header->code == NM_DBLCLK) {
|
||||
//onToggle performs the test to ensure the ListViewItem clicked was checkable
|
||||
if(!isWindowCallback) listView->self()->onToggle(lparam);
|
||||
if(isWindowCallback) listView->self()->onToggle(lparam);
|
||||
break;
|
||||
}
|
||||
if(header->code == NM_RCLICK) {
|
||||
if(!isWindowCallback) listView->self()->onContext(lparam);
|
||||
if(isWindowCallback) listView->self()->onContext(lparam);
|
||||
break;
|
||||
}
|
||||
if(header->code == NM_CUSTOMDRAW) {
|
||||
|
|
|
@ -73,6 +73,7 @@ auto Icarus::superFamicomImport(vector<uint8_t>& buffer, const string& location)
|
|||
auto name = rom["name"].text();
|
||||
auto size = rom["size"].decimal();
|
||||
if(name == "program.rom" || name == "data.rom" || firmwareAppended) {
|
||||
if(size > buffer.size() - offset) return failure("ROM image is missing data");
|
||||
file::write({target, name}, buffer.data() + offset, size);
|
||||
offset += size;
|
||||
} else {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
string SuperFamicom = R"(
|
||||
|
||||
database revision=2015-09-28
|
||||
database revision=2015-10-02
|
||||
|
||||
release
|
||||
cartridge region=NTSC
|
||||
|
@ -8,7 +8,7 @@ release
|
|||
mcc
|
||||
rom name=program.rom size=0x100000
|
||||
ram name=save.ram size=0x8000
|
||||
ram name=download.ram size=0x40000
|
||||
ram name=download.ram size=0x80000
|
||||
map id=io address=00-3f,80-bf:5000-5fff
|
||||
map id=rom address=00-3f,80-bf:8000-ffff
|
||||
map id=rom address=40-5f,c0-ff:0000-ffff
|
||||
|
@ -16,7 +16,7 @@ release
|
|||
map id=ram address=20-3f:6000-7fff mask=0xe000
|
||||
map id=ram address=70-77:0000-ffff
|
||||
information
|
||||
title: BS-X それは名前を盗まれた待の物語
|
||||
title: BS-X それは名前を盗まれた街の物語
|
||||
name: BS-X - Sore wa Namae o Nusumareta Machi no Monogatari
|
||||
region: JP
|
||||
revision: 1.1
|
||||
|
@ -5410,6 +5410,7 @@ release
|
|||
information
|
||||
title: Last Action Hero
|
||||
name: Last Action Hero
|
||||
region: NA
|
||||
revision: 1.0
|
||||
board: SHVC-1A0N-10
|
||||
serial: SNS-L5-USA
|
||||
|
@ -9030,7 +9031,7 @@ release
|
|||
release
|
||||
cartridge region=NTSC
|
||||
board type=BJ0N revision=01,20
|
||||
rom name=program.rom size=0x400000
|
||||
rom name=program.rom size=0x300000
|
||||
map id=rom address=00-3f,80-bf:8000-ffff
|
||||
map id=rom address=40-7d,c0-ff:0000-ffff
|
||||
information
|
||||
|
@ -9042,7 +9043,7 @@ release
|
|||
serial: SNS-ZW-USA
|
||||
sha256: 34e1af0642c85148c5a3dc3c7ab4bcbda13a9fea190934b5526c555fff035651
|
||||
configuration
|
||||
rom name=program.rom size=0x400000
|
||||
rom name=program.rom size=0x300000
|
||||
|
||||
release
|
||||
cartridge region=NTSC
|
||||
|
|
|
@ -401,14 +401,14 @@ SuperFamicomCartridge::SuperFamicomCartridge(const uint8_t *data, unsigned size)
|
|||
else if(mapper == STROM) {
|
||||
markup.append(
|
||||
" rom name=program.rom size=0x", hex(rom_size), "\n"
|
||||
" map id=rom address='00-1f,80-9f:8000-ffff mask=0x8000\n"
|
||||
" map id=rom address=00-1f,80-9f:8000-ffff mask=0x8000\n"
|
||||
" sufamiturbo\n"
|
||||
" slot id=A\n"
|
||||
" map id=rom address=20-3f,a0-bf:8000-ffff mask=0x8000\n"
|
||||
" map id=ram address=60-63,e0-e3:8000-ffff\n"
|
||||
" slot id=B\n"
|
||||
" map id=rom address=40-5f,c0-df:8000-ffff mask=0x8000\n"
|
||||
" map id=ram address=70-73,f0-f3:8000-ffff\n"
|
||||
" map id=rom address=20-3f,a0-bf:8000-ffff mask=0x8000\n"
|
||||
" map id=ram address=60-6f,e0-ef:0000-ffff\n"
|
||||
" sufamiturbo\n"
|
||||
" map id=rom address=40-5f,c0-df:0000-7fff mask=0x8000\n"
|
||||
" map id=rom address=40-5f,c0-df:8000-ffff mask=0x8000\n"
|
||||
" map id=ram address=70-7f,f0-ff:0000-ffff\n"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,10 +18,14 @@ ScanDialog::ScanDialog() {
|
|||
});
|
||||
scanList.onActivate([&] { activate(); });
|
||||
selectAllButton.setText("Select All").onActivate([&] {
|
||||
for(auto& item : scanList.items()) item.cell(0).setChecked(true);
|
||||
for(auto& item : scanList.items()) {
|
||||
if(item.cell(0).checkable()) item.cell(0).setChecked(true);
|
||||
}
|
||||
});
|
||||
unselectAllButton.setText("Unselect All").onActivate([&] {
|
||||
for(auto& item : scanList.items()) item.cell(0).setChecked(false);
|
||||
for(auto& item : scanList.items()) {
|
||||
if(item.cell(0).checkable()) item.cell(0).setChecked(false);
|
||||
}
|
||||
});
|
||||
createManifestsLabel.setChecked(settings.createManifests).setText("Create Manifests").onToggle([&] {
|
||||
settings.createManifests = createManifestsLabel.checked();
|
||||
|
|
Loading…
Reference in New Issue