CLI 2.0: Electric Boogaloo (#1546)

* CLI: begin QT reimplementation

* Add first batch of parameters
* ROM loading (no archives yet)
* --fullscreen
* --boot (non-functional???)

* fix --boot

* archives!

* Add disclaimer that a.zip|b.nds is kind of fucky

* remove shit7 debugging

* Apply requested changes
This commit is contained in:
patata
2022-10-28 12:27:55 +02:00
committed by GitHub
parent 936011964c
commit 561781b954
6 changed files with 235 additions and 35 deletions

View File

@ -503,6 +503,7 @@ bool LoadROM(QStringList filepath, bool reset)
if (len > 0x40000000)
{
fclose(f);
delete[] filedata;
return false;
}
@ -528,14 +529,14 @@ bool LoadROM(QStringList filepath, bool reset)
{
// file inside archive
u32 lenread = Archive::ExtractFileFromArchive(filepath.at(0), filepath.at(1), &filedata, &filelen);
if (lenread < 0) return false;
if (!filedata) return false;
if (lenread != filelen)
{
delete[] filedata;
return false;
}
s32 lenread = Archive::ExtractFileFromArchive(filepath.at(0), filepath.at(1), &filedata, &filelen);
if (lenread < 0) return false;
if (!filedata) return false;
if (lenread != filelen)
{
delete[] filedata;
return false;
}
std::string std_archivepath = filepath.at(0).toStdString();
basepath = std_archivepath.substr(0, LastSep(std_archivepath));