X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fmenu.c;h=c806aa9eb935409a6004c6b75b1e5493f385f486;hp=36a9a6b1d134a434b336f6ac098fd921c85e0e48;hb=3cf51e0893f3646f4f6217b9701c0ab199d8a6ac;hpb=ba1677491c5fc12c4ee7a60f0ba2af47da8e32dc diff --git a/frontend/menu.c b/frontend/menu.c index 36a9a6b1..c806aa9e 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -1,5 +1,5 @@ /* - * (C) Gražvydas "notaz" Ignotas, 2010-2013 + * (C) Gražvydas "notaz" Ignotas, 2010-2015 * * This work is licensed under the terms of any of these licenses * (at your option): @@ -39,6 +39,7 @@ #include "../plugins/dfinput/externals.h" #include "../plugins/dfsound/spu_config.h" #include "psemu_plugin_defs.h" +#include "arm_features.h" #include "revision.h" #define REARMED_BIRTHDAY_TIME 1293306830 /* 25 Dec 2010 */ @@ -75,6 +76,7 @@ typedef enum MA_OPT_SAVECFG, MA_OPT_SAVECFG_GAME, MA_OPT_CPU_CLOCKS, + MA_OPT_SPU_THREAD, MA_OPT_DISP_OPTS, MA_OPT_VARSCALER, MA_OPT_VARSCALER_C, @@ -99,7 +101,7 @@ int scanlines, scanline_level = 20; int soft_scaling, analog_deadzone; // for Caanoo int soft_filter; -#ifdef __ARM_ARCH_7A__ +#ifndef HAVE_PRE_ARMV7 #define DEFAULT_PSX_CLOCK 57 #define DEFAULT_PSX_CLOCK_S "57" #else @@ -441,9 +443,11 @@ static const struct { CE_INTVAL_P(gpu_peopsgl.iTexGarbageCollection), CE_INTVAL_P(gpu_peopsgl.dwActFixes), CE_INTVAL(spu_config.iUseReverb), + CE_INTVAL(spu_config.idiablofix), CE_INTVAL(spu_config.iXAPitch), CE_INTVAL(spu_config.iUseInterpolation), CE_INTVAL(spu_config.iTempo), + CE_INTVAL(spu_config.iUseThread), CE_INTVAL(config_save_counter), CE_INTVAL(in_evdev_allow_abs_only), CE_INTVAL(volume_boost), @@ -703,6 +707,9 @@ fail: static const char *filter_exts[] = { "bin", "img", "mdf", "iso", "cue", "z", + #ifdef HAVE_CHD + "chd", + #endif "bz", "znx", "pbp", "cbn", NULL }; @@ -730,7 +737,7 @@ static unsigned short fname2color(const char *fname) static void draw_savestate_bg(int slot); #define MENU_ALIGN_LEFT -#ifdef __ARM_ARCH_7A__ // assume hires device +#ifndef HAVE_PRE_ARMV7 // assume hires device #define MENU_X2 1 #else #define MENU_X2 0 @@ -811,7 +818,7 @@ static void draw_savestate_bg(int slot) // darken this so that menu text is visible if (g_menuscreen_w - w < 320) - menu_darken_bg(d, d, w * 2, 0); + menu_darken_bg(d, d, w, 0); } out: @@ -850,7 +857,7 @@ me_bind_action emuctrl_actions[] = { "Toggle Frameskip ", 1 << SACTION_TOGGLE_FSKIP }, { "Take Screenshot ", 1 << SACTION_SCREENSHOT }, { "Show/Hide FPS ", 1 << SACTION_TOGGLE_FPS }, -#ifdef __ARM_ARCH_7A__ +#ifndef HAVE_PRE_ARMV7 { "Switch Renderer ", 1 << SACTION_SWITCH_DISPMODE }, #endif { "Fast Forward ", 1 << SACTION_FAST_FORWARD }, @@ -901,8 +908,6 @@ static void get_line(char *d, size_t size, const char *s) len = size - 1; strncpy(d, s, len); d[len] = 0; - - mystrip(d); } static void keys_write_all(FILE *f) @@ -1009,7 +1014,10 @@ static void keys_load_all(const char *cfg) while (p != NULL && (p = strstr(p, "binddev = ")) != NULL) { p += 10; + // don't strip 'dev' because there are weird devices + // with names with space at the end get_line(dev, sizeof(dev), p); + dev_id = in_config_parse_dev(dev); if (dev_id < 0) { printf("input: can't handle dev: %s\n", dev); @@ -1450,6 +1458,7 @@ static menu_entry e_menu_plugin_spu[] = mee_range_h ("Volume boost", 0, volume_boost, -5, 30, h_spu_volboost), mee_onoff ("Reverb", 0, spu_config.iUseReverb, 1), mee_enum ("Interpolation", 0, spu_config.iUseInterpolation, men_spu_interp), + mee_onoff ("Diablo Music fix", 0, spu_config.idiablofix, 1), mee_onoff ("Adjust XA pitch", 0, spu_config.iXAPitch, 1), mee_onoff_h ("Adjust tempo", 0, spu_config.iTempo, 1, h_spu_tempo), mee_end, @@ -1604,6 +1613,11 @@ static menu_entry e_menu_options[] = mee_onoff ("Show FPS", 0, g_opts, OPT_SHOWFPS), mee_enum ("Region", 0, region, men_region), mee_range ("CPU clock", MA_OPT_CPU_CLOCKS, cpu_clock, 20, 5000), +#ifdef C64X_DSP + mee_onoff ("Use C64x DSP for sound", MA_OPT_SPU_THREAD, spu_config.iUseThread, 1), +#else + mee_onoff ("Threaded SPU", MA_OPT_SPU_THREAD, spu_config.iUseThread, 1), +#endif mee_handler_id("[Display]", MA_OPT_DISP_OPTS, menu_loop_gfx_options), mee_handler ("[BIOS/Plugins]", menu_loop_plugin_options), mee_handler ("[Advanced]", menu_loop_adv_options), @@ -1616,10 +1630,9 @@ static menu_entry e_menu_options[] = static int menu_loop_options(int id, int keys) { static int sel = 0; - int i; - i = me_id2offset(e_menu_options, MA_OPT_CPU_CLOCKS); - e_menu_options[i].enabled = cpu_clock_st > 0 ? 1 : 0; + me_enable(e_menu_options, MA_OPT_CPU_CLOCKS, cpu_clock_st > 0); + me_enable(e_menu_options, MA_OPT_SPU_THREAD, spu_config.iThreadAvail); me_enable(e_menu_options, MA_OPT_SAVECFG_GAME, ready_to_go && CdromId[0]); me_loop(e_menu_options, &sel); @@ -1928,7 +1941,7 @@ static const char credits_text[] = "PCSX4ALL plugin by PCSX4ALL team\n" " Chui, Franxis, Unai\n\n" "integration, optimization and\n" - " frontend (C) 2010-2012 notaz\n"; + " frontend (C) 2010-2015 notaz\n"; static int reset_game(void) { @@ -2514,7 +2527,7 @@ void menu_init(void) me_enable(e_menu_gfx_options, MA_OPT_GAMMA, plat_target.gamma_set != NULL); -#ifndef __ARM_ARCH_7A__ +#ifdef HAVE_PRE_ARMV7 me_enable(e_menu_gfx_options, MA_OPT_SWFILTER, 0); #endif me_enable(e_menu_gfx_options, MA_OPT_VARSCALER, MENU_SHOW_VARSCALER);