X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fmain.c;h=cb37bd7d131d0844f037e69429aaeb18fb1853f2;hp=52fa349765fd7fe9cf9a332e79b962736d4a38d9;hb=799a9f26a31d64830fcb887fceea2f987136dd00;hpb=e6eb2066c0d198d793067caed47b670b691eb865 diff --git a/frontend/main.c b/frontend/main.c index 52fa3497..cb37bd7d 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -16,6 +16,7 @@ #include "main.h" #include "plugin.h" +#include "plugin_lib.h" #include "pcnt.h" #include "menu.h" #include "../libpcsxcore/misc.h" @@ -61,15 +62,16 @@ static void CheckSubDir() { void set_cd_image(const char *fname) { - const char *ext; - int len; + const char *ext = NULL; - len = strlen(fname); - ext = fname; - if (len > 2) - ext = fname + len - 2; + if (fname != NULL) { + int len = strlen(fname); + ext = fname; + if (len > 2) + ext = fname + len - 2; + } - if (strcasecmp(ext, ".z") == 0) { + if (ext && strcasecmp(ext, ".z") == 0) { SetIsoFile(NULL); cdrcimg_set_fname(fname); strcpy(Config.Cdr, "builtin_cdrcimg"); @@ -242,6 +244,8 @@ int main(int argc, char *argv[]) else menu_loop(); + pl_start_watchdog(); + while (1) { psxCpu->Execute();