mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-01-11 23:43:04 +00:00
Add joystick_disable_swap option
This commit is contained in:
parent
fd51a0dccd
commit
62139481d2
1
mist.ini
1
mist.ini
@ -11,6 +11,7 @@ joystick_dead_range=4 ; set to 0 to disable analogue joystick dead rang
|
||||
joystick_remap=0583,2060,1,2,4,8,10,20,20,8,400,800,40,80
|
||||
key_menu_as_rgui=0 ; set to 1 to make the MENU key map to RGUI in Minimig (e.g. for Right Amiga)
|
||||
usb_storage=0 ; set to 1 to allow accessing the SD Card via the USB port
|
||||
joystick_disable_swap=0 ; set to to disable the automatic swapping of joystick 0 and joystick 1
|
||||
|
||||
[minimig_config]
|
||||
;conf_default="68020 AGA"
|
||||
|
||||
@ -61,6 +61,7 @@ mist_cfg_t mist_cfg = {
|
||||
.joystick_analog_mult = 128,
|
||||
.joystick_analog_offset = 0,
|
||||
.joystick_autofire_combo = 0,
|
||||
.joystick_disable_swap = 0,
|
||||
.joystick_dead_range = 4,
|
||||
.key_menu_as_rgui = 0,
|
||||
.keyrah_mode = 0,
|
||||
@ -109,6 +110,7 @@ const ini_var_t mist_ini_vars[] = {
|
||||
{"JOYSTICK_ANALOG_MULTIPLIER", (void*)(&(mist_cfg.joystick_analog_mult)), UINT8, 1, 128, 1},
|
||||
{"JOYSTICK_ANALOG_OFFSET", (void*)(&(mist_cfg.joystick_analog_offset)), INT8, -127, 127, 1},
|
||||
{"JOYSTICK_AUTOFIRE_COMBO", (void*)(&(mist_cfg.joystick_autofire_combo)), INT8, 0, 2, 1},
|
||||
{"JOYSTICK_DISABLE_SWAP", (void*)(&(mist_cfg.joystick_disable_swap)), INT8, 0, 1, 1},
|
||||
{"JOYSTICK_DEAD_RANGE", (void*)(&(mist_cfg.joystick_dead_range)), UINT8, 0, 255, 1},
|
||||
{"KEY_MENU_AS_RGUI", (void*)(&(mist_cfg.key_menu_as_rgui)), UINT8, 0, 1, 1},
|
||||
{"SDRAM64", (void*)(&(mist_cfg.sdram64)), UINT8, 0, 1, 1},
|
||||
|
||||
@ -27,6 +27,7 @@ typedef struct {
|
||||
uint8_t joystick_emu_fixed_index;
|
||||
uint8_t joystick_analog_mult;
|
||||
uint8_t joystick_autofire_combo;
|
||||
uint8_t joystick_disable_swap;
|
||||
uint8_t joystick_dead_range;
|
||||
int8_t joystick_analog_offset;
|
||||
uint8_t key_menu_as_rgui;
|
||||
|
||||
@ -841,9 +841,11 @@ static void usb_process_iface (usb_device_t *dev,
|
||||
|
||||
// swap joystick 0 and 1 since 1 is the one
|
||||
// used primarily on most systems
|
||||
if(idx == 0) idx = 1;
|
||||
else if(idx == 1) idx = 0;
|
||||
//StateJoySetExtra( btn_extra, idx);
|
||||
if(!mist_cfg.joystick_disable_swap || user_io_core_type() != CORE_TYPE_8BIT) {
|
||||
if(idx == 0) idx = 1;
|
||||
else if(idx == 1) idx = 0;
|
||||
//StateJoySetExtra( btn_extra, idx);
|
||||
}
|
||||
|
||||
// if real DB9 mouse is preffered, switch the id back to 1
|
||||
idx = (idx == 0) && mist_cfg.joystick0_prefer_db9 ? 1 : idx;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user