X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=maemo%2Fmain.c;h=2da693d0199d3390e37b03f8c42f29c20ce58a5c;hp=45317040c5950cdafa2969a2e1eab23ae45f0aab;hb=06bc35c833797ce9f6f3287abf954f037bb12319;hpb=2aa6a3a0cd427c289fd906c5ada5b8e718da6c31 diff --git a/maemo/main.c b/maemo/main.c index 45317040..2da693d0 100644 --- a/maemo/main.c +++ b/maemo/main.c @@ -19,9 +19,6 @@ #include "../plugins/dfinput/main.h" #include "maemo_common.h" -// sound plugin -extern int iUseTimer; - int g_opts = OPT_SHOWFPS; int g_maemo_opts; char file_name[MAXPATHLEN]; @@ -41,20 +38,26 @@ static void ChangeWorkingDirectory(char *exe) } } -int maemo_main(int argc, char **argv) +int main(int argc, char **argv) { - ChangeWorkingDirectory("c"); char file[MAXPATHLEN] = ""; char path[MAXPATHLEN]; const char *cdfile = NULL; int loadst = 0; int i; + emu_core_preinit(); + ChangeWorkingDirectory("c"); + strcpy(Config.BiosDir, "/home/user/MyDocs"); strcpy(Config.PluginsDir, "/opt/maemo/usr/games/plugins"); snprintf(Config.PatchesDir, sizeof(Config.PatchesDir), "/opt/maemo/usr/games" PATCHES_DIR); Config.PsxAuto = 1; + pl_init(); + + emu_core_init(); + // read command line options for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-psxout")) Config.PsxOut = 1; @@ -81,7 +84,6 @@ int maemo_main(int argc, char **argv) } else if (!strcmp(argv[i],"-fullscreen")) g_maemo_opts |= 2; else if (!strcmp(argv[i],"-accel")) g_maemo_opts |= 4; - else if (!strcmp(argv[i],"-sputhreaded")) iUseTimer=1; else if (!strcmp(argv[i],"-nosound")) strcpy(Config.Spu, "spunull.so"); else if (!strcmp(argv[i], "-bdir")) sprintf(Config.BiosDir, "%s", argv[++i]); else if (!strcmp(argv[i], "-bios")) sprintf(Config.Bios, "%s", argv[++i]); @@ -101,11 +103,6 @@ int maemo_main(int argc, char **argv) strcpy(file_name, strrchr(cdfile,'/')); } - if (SysInit() == -1) - return 1; - - pl_init(); - if (LoadPlugins() == -1) { SysMessage("Failed loading plugins!"); return 1; @@ -129,6 +126,7 @@ int maemo_main(int argc, char **argv) printf(_("Could not load CD-ROM!\n")); return -1; } + emu_on_new_cd(); ready_to_go = 1; } }