mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 09:59:41 -06:00
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:
@ -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));
|
||||
|
Reference in New Issue
Block a user