supporting caanoo, line doublers, refactoring

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@893 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2010-09-15 13:48:55 +00:00
parent bf61bea0f2
commit f4750ee051
24 changed files with 349 additions and 222 deletions

View file

@ -43,9 +43,8 @@ extern int g_screen_height;
enum {
EOPT_SCALE_NONE = 0,
EOPT_SCALE_SW_H,
EOPT_SCALE_HW_H,
EOPT_SCALE_HW_HV,
EOPT_SCALE_SW,
EOPT_SCALE_HW,
};
enum {
@ -67,7 +66,8 @@ typedef struct _currentConfig_t {
int CPUclock;
int volume;
int gamma;
int scaling; // gp2x: 0=center, 1=hscale, 2=hvscale, 3=hsoftscale; psp: bilinear filtering
int scaling; // gp2x: EOPT_SCALE_*; psp: bilinear filtering
int vscaling;
int rotation; // for UIQ
float scale; // psp: screen scale
float hscale32, hscale40; // psp: horizontal scale

View file

@ -1606,7 +1606,7 @@ static int menu_loop_32x_options(menu_id id, int keys)
{
static int sel = 0;
me_enable(e_menu_32x_options, MA_32XOPT_RENDERER, renderer_names32x != NULL);
me_enable(e_menu_32x_options, MA_32XOPT_RENDERER, renderer_names32x[0] != NULL);
me_loop(e_menu_32x_options, &sel, NULL);
return 0;
@ -1834,7 +1834,7 @@ static menu_entry e_menu_options[] =
mee_onoff ("Enable sound", MA_OPT_ENABLE_SOUND, currentConfig.EmuOpt, EOPT_EN_SOUND),
mee_cust ("Sound Quality", MA_OPT_SOUND_QUALITY, mh_opt_misc, mgn_opt_sound),
mee_enum_h ("Confirm savestate", MA_OPT_CONFIRM_STATES,currentConfig.confirm_save, men_confirm_save, h_confirm_save),
mee_range (cpu_clk_name, MA_OPT_CPU_CLOCKS, currentConfig.CPUclock, 20, 900),
mee_range ("", MA_OPT_CPU_CLOCKS, currentConfig.CPUclock, 20, 900),
mee_handler ("[Display options]", menu_loop_gfx_options),
mee_handler ("[Sega/Mega CD options]", menu_loop_cd_options),
#ifndef NO_32X
@ -1851,7 +1851,10 @@ static menu_entry e_menu_options[] =
static int menu_loop_options(menu_id id, int keys)
{
static int sel = 0;
int i;
i = me_id2offset(e_menu_options, MA_OPT_CPU_CLOCKS);
e_menu_options[i].enabled = e_menu_options[i].name ? 1 : 0;
me_enable(e_menu_options, MA_OPT_SAVECFG_GAME, rom_loaded);
me_enable(e_menu_options, MA_OPT_LOADCFG, config_slot != config_slot_current);
@ -2191,28 +2194,6 @@ void me_update_msg(const char *msg)
// ------------ util ------------
/* GP2X/wiz for now, probably extend later */
void menu_plat_setup(int is_wiz)
{
int i;
if (!is_wiz) {
me_enable(e_menu_gfx_options, MA_OPT_TEARING_FIX, 0);
i = me_id2offset(e_menu_gfx_options, MA_OPT_TEARING_FIX);
e_menu_gfx_options[i].need_to_save = 0;
return;
}
me_enable(e_menu_adv_options, MA_OPT_ARM940_SOUND, 0);
me_enable(e_menu_gfx_options, MA_OPT2_GAMMA, 0);
me_enable(e_menu_gfx_options, MA_OPT2_A_SN_GAMMA, 0);
i = me_id2offset(e_menu_gfx_options, MA_OPT_SCALING);
e_menu_gfx_options[i].max = 1; /* only off and sw */
i = me_id2offset(e_menu_gfx_options, MA_OPT_ARM940_SOUND);
e_menu_gfx_options[i].need_to_save = 0;
}
/* hidden options for config engine only */
static menu_entry e_menu_hidden[] =
{

View file

@ -27,6 +27,7 @@ typedef enum
MA_MAIN_EXIT,
MA_OPT_RENDERER,
MA_OPT_SCALING,
MA_OPT_VSCALING,
MA_OPT_ACC_SPRITES,
MA_OPT_SHOW_FPS,
MA_OPT_FRAMESKIP,
@ -195,7 +196,6 @@ extern int g_menuscreen_h;
#endif
void menu_init(void);
void menu_plat_setup(int is_wiz);
void text_out16(int x, int y, const char *texto, ...);
void me_update_msg(const char *msg);

View file

@ -3,7 +3,6 @@ extern "C" {
#endif
/* stuff to be implemented by platform code */
extern char cpu_clk_name[];
extern const char *renderer_names[];
extern const char *renderer_names32x[];