Fixup cflash handling in cli frontend, bug #2955684
The code is c&p from gtk frontend to handle some addons stuff properly. Should fix #2955684. [insert a rant here on patches without reporter feeedback]
This commit is contained in:
parent
63e66733bd
commit
e68f2e6cf1
|
@ -57,6 +57,7 @@
|
|||
#include "GPU_osd.h"
|
||||
#include "desmume_config.h"
|
||||
#include "commandline.h"
|
||||
#include "addons.h"
|
||||
#ifdef GDB_STUB
|
||||
#include "gdbstub.h"
|
||||
#endif
|
||||
|
@ -653,6 +654,29 @@ int main(int argc, char ** argv) {
|
|||
fw_config.language = my_config.firmware_language;
|
||||
}
|
||||
|
||||
/* addons */
|
||||
my_config.process_addonCommands();
|
||||
addon_type = NDS_ADDON_NONE;
|
||||
if (my_config.is_cflash_configured)
|
||||
addon_type = NDS_ADDON_CFLASH;
|
||||
|
||||
if(my_config.gbaslot_rom != "") {
|
||||
addon_type = NDS_ADDON_GBAGAME;
|
||||
strncpy(GBAgameName, my_config.gbaslot_rom.c_str(), MAX_PATH);
|
||||
}
|
||||
|
||||
switch (addon_type) {
|
||||
case NDS_ADDON_CFLASH:
|
||||
case NDS_ADDON_RUMBLEPAK:
|
||||
case NDS_ADDON_NONE:
|
||||
case NDS_ADDON_GBAGAME:
|
||||
break;
|
||||
default:
|
||||
addon_type = NDS_ADDON_NONE;
|
||||
break;
|
||||
}
|
||||
addonsChangePak (addon_type);
|
||||
|
||||
if ( !g_thread_supported()) {
|
||||
g_thread_init( NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue