fixes for audio and video, add psp-like scaling

This commit is contained in:
kub 2024-02-05 20:14:06 +01:00
parent 455cecf973
commit 4abc40d56b
5 changed files with 527 additions and 402 deletions

View file

@ -72,6 +72,8 @@ static int menu_w, menu_h;
#include <platform/gp2x/menu.c>
#elif defined(__PSP__)
#include <platform/psp/menu.c>
#elif defined(__PS2__)
#include <platform/ps2/menu.c>
#elif defined(PANDORA)
#include <platform/pandora/menu.c>
#else

File diff suppressed because it is too large Load diff

21
platform/ps2/menu.c Normal file
View file

@ -0,0 +1,21 @@
static const char *men_vscaling_opts[] = { "OFF", "fullscreen", "borderless", NULL };
static const char *men_hscaling_opts[] = { "1:1", "4:3", "extended", "fullwidth", NULL };
static const char *men_filter_opts[] = { "nearest", "bilinear", NULL };
#define MENU_OPTIONS_GFX \
mee_enum ("Vertical scaling", MA_OPT_VSCALING, currentConfig.vscaling, men_vscaling_opts), \
mee_enum ("Aspect ratio", MA_OPT_SCALING, currentConfig.scaling, men_hscaling_opts), \
mee_enum ("Scaler type", MA_OPT3_FILTERING, currentConfig.filter, men_filter_opts), \
mee_onoff ("Wait for vsync", MA_OPT3_VSYNC, currentConfig.EmuOpt, EOPT_VSYNC), \
#define MENU_OPTIONS_ADV
static menu_entry e_menu_sms_options[];
static menu_entry e_menu_keyconfig[];
void psp_menu_init(void)
{
me_enable(e_menu_sms_options, MA_SMSOPT_GHOSTING, 0);
me_enable(e_menu_keyconfig, MA_CTRL_DEADZONE, 0);
}

10
platform/ps2/menu.h Normal file
View file

@ -0,0 +1,10 @@
void menu_loop(void);
int menu_loop_tray(void);
void menu_romload_prepare(const char *rom_name);
void menu_romload_end(void);
#define CONFIGURABLE_KEYS (PBTN_UP|PBTN_LEFT|PBTN_RIGHT|PBTN_DOWN|PBTN_L|PBTN_R|PBTN_TRIANGLE|PBTN_CIRCLE|PBTN_X|PBTN_SQUARE|PBTN_START| \
PBTN_NUB_UP|PBTN_NUB_RIGHT|PBTN_NUB_DOWN|PBTN_NUB_LEFT|PBTN_NOTE)

View file

@ -19,7 +19,8 @@
#include "../libpicofe/plat.h"
struct plat_target plat_target = {};
static int sound_rates[] = { 11025, 22050, 44100, -1 };
struct plat_target plat_target = { .sound_rates = sound_rates };
static void reset_IOP() {
SifInitRpc(0);
@ -205,4 +206,4 @@ void lprintf(const char *fmt, ...)
va_end(vl);
}
void plat_debug_cat(char *str) {}
void plat_debug_cat(char *str) {}