X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fmenu.c;h=ce5c3eb61fd9b9397cc7261f483aa45ec674105c;hp=5fe86adeca6639d872fb9eeb56b89e2ba7723dbf;hb=c069dc1bff054b9e47ba7bdf9a2fc8344b90ea89;hpb=9fe27e257939224d5a85975dee39f63f50b7e3dc diff --git a/frontend/menu.c b/frontend/menu.c index 5fe86ade..ce5c3eb6 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -13,6 +13,9 @@ #include #include #include +#include +#include +#include #include "main.h" #include "menu.h" @@ -34,6 +37,8 @@ #include "../plugins/dfinput/main.h" #include "revision.h" +#define REARMED_BIRTHDAY_TIME 1293306830 /* 25 Dec 2010 */ + #define array_size(x) (sizeof(x) / sizeof(x[0])) typedef enum @@ -124,10 +129,30 @@ void emu_make_path(char *buff, const char *end, int size) printf("Warning: path truncated: %s\n", buff); } -static int emu_check_save_file(int slot) +static int emu_check_save_file(int slot, int *time) { - int ret = emu_check_state(slot); - return ret == 0 ? 1 : 0; + char fname[MAXPATHLEN]; + struct stat status; + int ret; + + ret = emu_check_state(slot); + if (ret != 0 || time == NULL) + return ret == 0 ? 1 : 0; + + ret = get_state_filename(fname, sizeof(fname), slot); + if (ret != 0) + return 1; + + ret = stat(fname, &status); + if (ret != 0) + return 1; + + if (status.st_mtime < REARMED_BIRTHDAY_TIME) + return 1; // probably bad rtc like on some Caanoos + + *time = status.st_mtime; + + return 1; } static int emu_save_load_game(int load, int unused) @@ -216,6 +241,9 @@ static void menu_set_defconfig(void) { #val, sizeof(pl_rearmed_cbs.val), &pl_rearmed_cbs.val } // 'versioned' var, used when defaults change +#define CE_CONFIG_STR_V(val, ver) \ + { #val #ver, 0, Config.val } + #define CE_INTVAL_V(val, ver) \ { #val #ver, sizeof(val), &val } @@ -228,7 +256,7 @@ static const struct { void *val; } config_data[] = { CE_CONFIG_STR(Bios), - CE_CONFIG_STR(Gpu), + CE_CONFIG_STR_V(Gpu, 2), CE_CONFIG_STR(Spu), // CE_CONFIG_STR(Cdr), CE_CONFIG_VAL(Xa), @@ -258,6 +286,7 @@ static const struct { CE_INTVAL_V(frameskip, 3), CE_INTVAL_P(gpu_peops.iUseDither), CE_INTVAL_P(gpu_peops.dwActFixes), + CE_INTVAL_P(gpu_unai.lineskip), CE_INTVAL_P(gpu_unai.abe_hack), CE_INTVAL_P(gpu_unai.no_light), CE_INTVAL_P(gpu_unai.no_blend), @@ -1166,6 +1195,7 @@ static int menu_loop_gfx_options(int id, int keys) static menu_entry e_menu_plugin_gpu_unai[] = { + mee_onoff ("Skip every 2nd line", 0, pl_rearmed_cbs.gpu_unai.lineskip, 1), mee_onoff ("Abe's Odyssey hack", 0, pl_rearmed_cbs.gpu_unai.abe_hack, 1), mee_onoff ("Disable lighting", 0, pl_rearmed_cbs.gpu_unai.no_light, 1), mee_onoff ("Disable blending", 0, pl_rearmed_cbs.gpu_unai.no_blend, 1), @@ -1617,10 +1647,13 @@ static const char credits_text[] = "(C) 1999-2003 PCSX Team\n" "(C) 2005-2009 PCSX-df Team\n" "(C) 2009-2011 PCSX-Reloaded Team\n\n" - "GPU and SPU code by Pete Bernert\n" - " and the P.E.Op.S. team\n" "ARM recompiler (C) 2009-2011 Ari64\n" - "PCSX4ALL plugins by PCSX4ALL team\n" +#ifdef __ARM_NEON__ + "ARM NEON GPU (c) 2011 Exophase\n" +#endif + "PEOpS GPU and SPU by Pete Bernert\n" + " and the P.E.Op.S. team\n" + "PCSX4ALL plugin by PCSX4ALL team\n" " Chui, Franxis, Unai\n\n" "integration, optimization and\n" " frontend (C) 2010-2011 notaz\n";