diff options
author | Arisotura <thetotalworm@gmail.com> | 2020-05-20 01:49:40 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2020-05-20 01:49:40 +0200 |
commit | 4dae6d8928b57792c4ba746a7078c9f7dcac44af (patch) | |
tree | b15553656eb6e3b0c7182cdcd429cad8c3bc18d8 /src/frontend | |
parent | a2f9472e5dff77039d66783ffda9ee0fc2de77f8 (diff) |
load shit from command line
Diffstat (limited to 'src/frontend')
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index 70a6ec1..0cd9f70 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -1006,7 +1006,6 @@ int main(int argc, char** argv) emuThread->start(); emuThread->emuPause(true); - #if 0 if (argc > 1) { char* file = argv[1]; @@ -1014,32 +1013,25 @@ int main(int argc, char** argv) if (!strcasecmp(ext, "nds") || !strcasecmp(ext, "srl")) { - strncpy(ROMPath[0], file, 1023); - ROMPath[0][1023] = '\0'; + int res = Frontend::LoadROM(file, Frontend::ROMSlot_NDS); - //SetupSRAMPath(0); - - //if (NDS::LoadROM(ROMPath[0], SRAMPath[0], Config::DirectBoot)) - // Run(); - } - - if (argc > 2) - { - file = argv[2]; - ext = &file[strlen(file)-3]; - - if (!strcasecmp(ext, "gba")) + if (res == Frontend::Load_OK) { - strncpy(ROMPath[1], file, 1023); - ROMPath[1][1023] = '\0'; + if (argc > 2) + { + file = argv[2]; + ext = &file[strlen(file)-3]; - //SetupSRAMPath(1); + if (!strcasecmp(ext, "gba")) + { + Frontend::LoadROM(file, Frontend::ROMSlot_GBA); + } + } - //NDS::LoadGBAROM(ROMPath[1], SRAMPath[1]); + emuThread->emuRun(); } } } - #endif int ret = melon.exec(); |