psp, scaling revisited

This commit is contained in:
kub 2021-09-10 18:53:31 +02:00
parent d5d1778252
commit 0924243a53
6 changed files with 57 additions and 119 deletions

View file

@ -338,18 +338,6 @@ static int custom_read(menu_entry *me, const char *var, const char *val)
return 1;
/* PSP */
case MA_OPT3_SCALE:
if (strcasecmp(var, "Scale factor") != 0) return 0;
currentConfig.scale = atof(val);
return 1;
case MA_OPT3_HSCALE32:
if (strcasecmp(var, "Hor. scale (for low res. games)") != 0) return 0;
currentConfig.hscale32 = atof(val);
return 1;
case MA_OPT3_HSCALE40:
if (strcasecmp(var, "Hor. scale (for hi res. games)") != 0) return 0;
currentConfig.hscale40 = atof(val);
return 1;
case MA_OPT3_VSYNC:
// XXX: use enum
if (strcasecmp(var, "Wait for vsync") != 0) return 0;

View file

@ -40,10 +40,19 @@ enum {
// linux, GP2X:
EOPT_SCALE_SW = 1,
EOPT_SCALE_HW,
// PSP horiz:
EOPT_SCALE_43 = 1, // DAR 4:3 (12:9)
EOPT_SCALE_WIDE, // DAR 14:9
EOPT_SCALE_FULL, // DAR 16:9
// PSP vert:
EOPT_VSCALE_PAL = 1, // always 240 lines
EOPT_VSCALE_FULL, // zoomed to full height
};
enum {
EOPT_FILTER_NONE = 0,
// PSP texture filtering
EOPT_FILTER_BILINEAR = 1,
// software scalers
EOPT_FILTER_SMOOTHER = 1,
EOPT_FILTER_BILINEAR1,
@ -75,8 +84,6 @@ typedef struct _currentConfig_t {
int scaling; // EOPT_SCALE_*
int vscaling;
int rotation; // for UIQ
float scale; // psp: screen scale
float hscale32, hscale40; // psp: horizontal scale
int gamma2; // psp: black level
int turbo_rate;
int renderer;

View file

@ -62,13 +62,7 @@ typedef enum
MA_OPT2_MAX_FRAMESKIP,
MA_OPT2_PWM_IRQ_OPT,
MA_OPT2_DONE,
MA_OPT3_SCALE, /* psp (all OPT3) */
MA_OPT3_HSCALE32,
MA_OPT3_HSCALE40,
MA_OPT3_GAMMAA,
MA_OPT3_PRES_NOSCALE,
MA_OPT3_PRES_SCALE43,
MA_OPT3_PRES_FULLSCR,
MA_OPT3_GAMMAA, /* psp (all OPT3) */
MA_OPT3_FILTERING,
MA_OPT3_VSYNC,
MA_OPT3_BLACKLVL,