diff options
Diffstat (limited to 'frontend/main.c')
-rw-r--r-- | frontend/main.c | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/frontend/main.c b/frontend/main.c index d3c7d40..c1f1cc4 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -54,12 +54,15 @@ enum sched_action emu_action, emu_action_old; char hud_msg[64]; int hud_new_msg; -static void make_path(char *buf, size_t size, const char *dir, const char *fname) +void make_path(char *buf, size_t size, const char *dir, const char *fname) { + char root_dir[MAXPATHLEN]; + plat_get_root_dir(root_dir, MAXPATHLEN); + if (fname) - snprintf(buf, size, ".%s%s", dir, fname); + snprintf(buf, size, "%s%s%s", root_dir, dir, fname); else - snprintf(buf, size, ".%s", dir); + snprintf(buf, size, "%s%s", root_dir, dir); } #define MAKE_PATH(buf, dir, fname) \ make_path(buf, sizeof(buf), dir, fname) @@ -103,7 +106,7 @@ void set_cd_image(const char *fname) static void set_default_paths(void) { #ifndef NO_FRONTEND - snprintf(Config.PatchesDir, sizeof(Config.PatchesDir), "." PATCHES_DIR); + MAKE_PATH(Config.PatchesDir, PATCHES_DIR, NULL); MAKE_PATH(Config.Mcd1, MEMCARD_DIR, "card1.mcd"); MAKE_PATH(Config.Mcd2, MEMCARD_DIR, "card2.mcd"); strcpy(Config.BiosDir, "bios"); @@ -125,6 +128,7 @@ void emu_set_default_config(void) Config.SpuIrq = Config.RCntFix = Config.VSyncWA = 0; Config.PsxAuto = 1; + pl_rearmed_cbs.frameskip_type = 0; pl_rearmed_cbs.thread_rendering = 0; pl_rearmed_cbs.gpu_neon.allow_interlace = 2; // auto @@ -133,7 +137,7 @@ void emu_set_default_config(void) pl_rearmed_cbs.gpu_peops.iUseDither = 0; pl_rearmed_cbs.gpu_peops.dwActFixes = 1<<7; pl_rearmed_cbs.gpu_unai.ilace_force = 0; - pl_rearmed_cbs.gpu_unai.pixel_skip = 1; + pl_rearmed_cbs.gpu_unai.pixel_skip = 0; pl_rearmed_cbs.gpu_unai.lighting = 1; pl_rearmed_cbs.gpu_unai.fast_lighting = 1; pl_rearmed_cbs.gpu_unai.blending = 1; @@ -162,6 +166,13 @@ void emu_set_default_config(void) new_dynarec_hacks = 0; cycle_multiplier = 200; +#ifdef TRIMUI + pl_rearmed_cbs.gpu_unai.scale_hires = 1; + pl_rearmed_cbs.frameskip_type = 1; // audio-based + spu_config.iTempo = 0; + cycle_multiplier = 175; +#endif + in_type[0] = PSE_PAD_TYPE_STANDARD; in_type[1] = PSE_PAD_TYPE_STANDARD; } @@ -477,17 +488,13 @@ static void create_profile_dir(const char *directory) { } static void check_profile(void) { - // make sure that ~/.pcsx exists - create_profile_dir(PCSX_DOT_DIR); - - create_profile_dir(BIOS_DIR); create_profile_dir(MEMCARD_DIR); create_profile_dir(STATES_DIR); create_profile_dir(PLUGINS_DIR); create_profile_dir(PLUGINS_CFG_DIR); create_profile_dir(CHEATS_DIR); create_profile_dir(PATCHES_DIR); - create_profile_dir(PCSX_DOT_DIR "cfg"); + create_profile_dir("/cfg/"); create_profile_dir("/screenshots/"); } @@ -601,7 +608,7 @@ int main(int argc, char *argv[]) // FIXME: this recovery doesn't work, just delete bad config and bail out // SysMessage("could not load plugins, retrying with defaults\n"); set_default_paths(); - snprintf(path, sizeof(path), "." PCSX_DOT_DIR "%s", cfgfile_basename); + MAKE_PATH(path, cfgfile_basename, NULL); remove(path); SysMessage("Failed loading plugins!"); return 1; @@ -626,6 +633,7 @@ int main(int argc, char *argv[]) SysPrintf(_("Could not load CD-ROM!\n")); return -1; } + menu_load_config(1); emu_on_new_cd(!loadst); ready_to_go = 1; } @@ -757,8 +765,10 @@ void SysUpdate() { } int get_state_filename(char *buf, int size, int i) { - return get_gameid_filename(buf, size, - "." STATES_DIR "%.32s-%.9s.%3.3d", i); + char fname[MAXPATHLEN]; + MAKE_PATH(fname, STATES_DIR, "%.32s-%.9s.%3.3d"); + + return get_gameid_filename(buf, size, fname, i); } int emu_check_state(int slot) |