X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=maemo%2Fmain.c;fp=maemo%2Fmain.c;h=80919ace497605224ce7873c17ed9925aacddfca;hp=267fb55fd27f7d85e012dcd50d1fa58468cc4a3a;hb=54b4a001cf0b0f165a59b727c4b201226eda014c;hpb=799b0b8773d6add1de99efd582c93701b82e970d diff --git a/maemo/main.c b/maemo/main.c index 267fb55f..80919ace 100644 --- a/maemo/main.c +++ b/maemo/main.c @@ -7,17 +7,13 @@ #include #include -#include -#include -#include -#include +#include #include -#include #include "main.h" #include "plugin.h" #include "../libpcsxcore/misc.h" -#include "../plugins/cdrcimg/cdrcimg.h" +#include "../libpcsxcore/new_dynarec/new_dynarec.h" // from softgpu plugin extern int iUseDither; @@ -34,11 +30,14 @@ extern int iXAPitch; extern int iSPUIRQWait; extern int iUseTimer; +enum sched_action emu_action; +void do_emu_action(void); + static void ChangeWorkingDirectory(char *exe) { - s8 exepath[1024]; - s8* s; - sprintf(exepath, "%s", exe); + char exepath[1024]; + char *s; + snprintf(exepath, sizeof(exepath), "%s", exe); s = strrchr(exepath, '/'); if (s != NULL) { *s = '\0'; @@ -53,7 +52,6 @@ int maemo_main(int argc, char **argv) char path[MAXPATHLEN]; const char *cdfile = NULL; int loadst = 0; - void *tmp; int i; strcpy(Config.BiosDir, "/home/user/MyDocs"); @@ -190,7 +188,15 @@ int maemo_main(int argc, char **argv) return 0; } - psxCpu->Execute(); + while (1) + { + stop = 0; + emu_action = SACTION_NONE; + + psxCpu->Execute(); + if (emu_action != SACTION_NONE) + do_emu_action(); + } return 0; }