removed old style overrides

This commit is contained in:
Shaun Inman 2023-03-06 21:09:24 -05:00
parent c4d9102615
commit 493aec31e4
14 changed files with 12 additions and 332 deletions

View file

@ -20,7 +20,6 @@
#include "utils.h"
#include "api.h"
#include "scaler_neon.h"
#include "overrides.h"
///////////////////////////////////////
@ -611,6 +610,16 @@ static const char* device_button_names[LOCAL_BUTTON_COUNT] = {
[BTN_ID_L2] = "L2",
[BTN_ID_R2] = "R2",
};
typedef struct ButtonMapping {
char* name;
int retro;
int local; // TODO: dislike this name...
int mod;
int default_;
int ignore;
} ButtonMapping;
static ButtonMapping default_button_mapping[] = { // used if pak.cfg doesn't exist or doesn't have bindings
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
@ -1420,7 +1429,7 @@ static void input_poll_callback(void) {
if (PAD_isPressed(btn)) buttons |= 1 << config.controls[i].retro;
}
if (buttons) LOG_info("buttons: %i\n", buttons);
// if (buttons) LOG_info("buttons: %i\n", buttons);
}
static int16_t input_state_callback(unsigned port, unsigned device, unsigned index, unsigned id) {
// id == RETRO_DEVICE_ID_JOYPAD_MASK or RETRO_DEVICE_ID_JOYPAD_*
@ -3202,7 +3211,7 @@ static int OptionEmulator_openMenu(MenuList* list, int i) {
Menu_options(&OptionEmulator_menu);
}
else {
Menu_message("This core doesn't have any options.", (char*[]){ "B","BACK", NULL });
Menu_message("This core has no options.", (char*[]){ "B","BACK", NULL });
}
return MENU_CALLBACK_NOP;

View file

@ -1,25 +0,0 @@
#ifndef OVERRIDES_H
#define OVERRIDES_H
typedef struct OptionOverride {
char* key;
char* value;
int lock; // prevents showing/changing this value
} OptionOverride;
typedef struct ButtonMapping {
char* name;
int retro;
int local; // TODO: dislike this name...
int mod;
int default_;
int ignore;
} ButtonMapping;
typedef struct CoreOverrides {
char* core_name; // cannot be NULL
OptionOverride* option_overrides;
ButtonMapping* button_mapping;
} CoreOverrides;
#endif

View file

@ -1,15 +0,0 @@
#include "overrides.h"
static CoreOverrides fake08_overrides = {
.core_name = "fake08",
.button_mapping = (ButtonMapping[]){
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"A Button", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
{"B Button", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
{"Start", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
{NULL},
},
};

View file

@ -1,33 +0,0 @@
#include "overrides.h"
static CoreOverrides fceumm_overrides = {
.core_name = "fceumm",
.option_overrides = (OptionOverride[]){
{"fceumm_sndquality", "High"},
{"fceumm_sndvolume", "10"},
{"fceumm_turbo_enable", "Player 1"}, // stupidly defaults to None despite binding turbo buttons by default
{"fceumm_show_adv_system_options","disabled",1}, // doesn't do anything
{"fceumm_show_adv_sound_options","disabled", 1}, // doesn't do anything
{NULL,NULL},
},
.button_mapping = (ButtonMapping[]){
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"Select", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
{"Start", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
{"A Button", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
{"B Button", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
{"A Turbo", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_NONE},
{"B Turbo", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_NONE},
{"Change Disk", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_NONE},
{"Insert Disk", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_NONE},
{"Insert Coin", RETRO_DEVICE_ID_JOYPAD_R2, BTN_ID_NONE},
// need to HOLD this and press LEFT or RIGHT. our UI isn't setup to communicate that much info
// {"Switch Palette", RETRO_DEVICE_ID_JOYPAD_L2, BTN_ID_NONE},
{NULL},
},
};

View file

@ -1,28 +0,0 @@
#include "overrides.h"
CoreOverrides gambatte_overrides = {
.core_name = "gambatte",
.option_overrides = (OptionOverride[]){
{"gambatte_gb_colorization", "internal"},
{"gambatte_gb_internal_palette", "TWB64 - Pack 1"},
{"gambatte_gb_palette_twb64_1", "TWB64 038 - Pokemon mini Ver."},
{"gambatte_gb_bootloader", "disabled"},
{"gambatte_audio_resampler", "sinc", 1}, // alternatives don't work
{NULL,NULL},
},
.button_mapping = (ButtonMapping[]){
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"Select", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
{"Start", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
{"A Button", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
{"B Button", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
{"A Turbo", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_NONE},
{"B Turbo", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_NONE},
{"Prev. Palette", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_NONE},
{"Next Palette", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_NONE},
{NULL},
},
};

View file

@ -1,24 +0,0 @@
#include "overrides.h"
static CoreOverrides gpsp_overrides = {
.core_name = "gpsp",
.option_overrides = (OptionOverride[]){
{"gpsp_save_method", "libretro", 1}, // frontend doesn't support other option
{NULL,NULL},
},
.button_mapping = (ButtonMapping[]){
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"Select", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
{"Start", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
{"A Button", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
{"B Button", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
{"A Turbo", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_NONE},
{"B Turbo", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_NONE},
{"L Button", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
{"R Button", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
{NULL},
},
};

View file

@ -1,26 +0,0 @@
#include "overrides.h"
static CoreOverrides mednafen_pce_fast_overrides = {
.core_name = "mednafen_pce_fast",
.option_overrides = (OptionOverride[]){
{"pce_fast_turbo_toggle_hotkey", "disabled", 1}, // we don't have L3/R3
{NULL,NULL},
},
.button_mapping = (ButtonMapping[]){
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"Select", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
{"Run", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
{"I", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
{"II", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
{"III", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_Y},
{"IV", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_X},
{"V", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
{"VI", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
{"Mode", RETRO_DEVICE_ID_JOYPAD_L2, BTN_ID_L2},
{NULL},
},
};

View file

@ -1,25 +0,0 @@
#include "overrides.h"
static CoreOverrides mednafen_supafaust_overrides = {
.core_name = "mednafen_supafaust",
.option_overrides = (OptionOverride[]){
{"supafaust_pixel_format", "rgb565", 1}, // others unsupported
{NULL,NULL},
},
.button_mapping = (ButtonMapping[]){
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"Select", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
{"Start", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
{"Y Button", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_Y},
{"X Button", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_X},
{"B Button", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
{"A Button", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
{"L Button", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
{"R Button", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
{NULL},
},
};

View file

@ -1,29 +0,0 @@
#include "overrides.h"
static CoreOverrides mednafen_vb_overrides = {
.core_name = "mednafen_vb",
.option_overrides = (OptionOverride[]){
{"vb_3dmode", "anaglyph", 1}, // others crash frontend
{"vb_right_analog_to_digital", "disabled", 1}, // no analog
{NULL,NULL},
},
.button_mapping = (ButtonMapping[]){
{"L. Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"L. Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"L. Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"L. Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"Select", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT}, // ALT: L2
{"Start", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START}, // ALT: R2
{"A", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A}, // ALT: START
{"B", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B}, // ALT: SELECT
{"L Button", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
{"R Button", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
{"Low Battery", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_NONE},
{"R. Up", RETRO_DEVICE_ID_JOYPAD_L2, BTN_ID_NONE}, // ALT: X
{"R. Down", RETRO_DEVICE_ID_JOYPAD_L3, BTN_ID_NONE}, // ALT: B
{"R. Left", RETRO_DEVICE_ID_JOYPAD_R2, BTN_ID_NONE}, // ALT: Y
{"R. Right", RETRO_DEVICE_ID_JOYPAD_R3, BTN_ID_NONE}, // ALT: A
{NULL},
},
};

View file

@ -1,28 +0,0 @@
#include "overrides.h"
static CoreOverrides mgba_overrides = {
.core_name = "mgba",
.option_overrides = (OptionOverride[]){
{"mgba_skip_bios", "ON"},
{NULL,NULL},
},
.button_mapping = (ButtonMapping[]){
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"Select", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
{"Start", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
{"A Button", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
{"B Button", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
{"A Turbo", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_NONE},
{"B Turbo", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_NONE},
{"L Button", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
{"R Button", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
{"L Turbo", RETRO_DEVICE_ID_JOYPAD_L2, BTN_ID_NONE},
{"R Turbo", RETRO_DEVICE_ID_JOYPAD_R2, BTN_ID_NONE},
{"More Sun", RETRO_DEVICE_ID_JOYPAD_L3, BTN_ID_NONE},
{"Less Sun", RETRO_DEVICE_ID_JOYPAD_R3, BTN_ID_NONE},
{NULL},
},
};

View file

@ -1,27 +0,0 @@
#include "overrides.h"
static CoreOverrides pcsx_rearmed_overrides = {
.core_name = "pcsx_rearmed",
.option_overrides = (OptionOverride[]){
{"pcsx_rearmed_display_internal_fps", "disabled", 1}, // doesn't appear to do anything
{"pcsx_rearmed_show_input_settings", "disabled", 1}, // doesn't appear to do anything
{NULL,NULL},
},
.button_mapping = (ButtonMapping[]){
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"Select", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
{"Start", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
{"Circle", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
{"Cross", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
{"Triangle", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_X},
{"Square", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_Y},
{"L1 Button", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
{"R1 Button", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
{"L2 Button", RETRO_DEVICE_ID_JOYPAD_L2, BTN_ID_L2},
{"R2 Button", RETRO_DEVICE_ID_JOYPAD_R2, BTN_ID_R2},
{NULL},
},
};

View file

@ -1,24 +0,0 @@
#include "overrides.h"
static CoreOverrides picodrive_overrides = {
.core_name = "picodrive",
.option_overrides = (OptionOverride[]){
{"picodrive_sound_rate", "41000", 1},
{NULL,NULL},
},
.button_mapping = (ButtonMapping[]){
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"Mode", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
{"Start", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
{"A Button", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_Y},
{"B Button", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_X},
{"C Button", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
{"X Button", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_B},
{"Y Button", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_L1},
{"Z Button", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
{NULL},
},
};

View file

@ -1,25 +0,0 @@
#include "overrides.h"
static CoreOverrides pokemini_overrides = {
.core_name = "pokemini",
.option_overrides = (OptionOverride[]){
{"pokemini_video_scale", "6x",1},
{"pokemini_60hz_mode", "enabled",1}, // 75fps isn't practical here
{"pokemini_palette", "Old"},
{"pokemini_piezofilter", "disabled"},
{"pokemini_lowpass_filter", "enabled"},
{NULL,NULL},
},
.button_mapping = (ButtonMapping[]){
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"A Button", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
{"B Button", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
{"C Button", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
{"Shake", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
{"Power", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
{NULL},
},
};

View file

@ -1,20 +0,0 @@
#include "overrides.h"
static CoreOverrides snes9x2005_plus_overrides = {
.core_name = "snes9x2005_plus",
.button_mapping = (ButtonMapping[]){
{"Up", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
{"Down", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
{"Left", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
{"Right", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
{"Select", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
{"Start", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
{"Y Button", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_Y},
{"X Button", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_X},
{"B Button", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
{"A Button", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
{"L Button", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
{"R Button", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
{NULL},
},
};