mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-02-03 23:03:01 +00:00
- btn 4 + btn 1 = Enter - btn 4 + btn 2 = Space bar - btn 4 + btn 3 = open OSD Also added control of the OSD via joystick: - up/down/left/right : arroy keys, use btn3 for pgUp/pgDown - btn 1 : select - btn 2 : cancel / back The new feature can be disabled by adding "joystick_disable_shortcuts=1" to mist.ini
52 lines
1.3 KiB
C
52 lines
1.3 KiB
C
// mist_cfg.c
|
|
// 2015, rok.krajnc@gmail.com
|
|
|
|
|
|
//// includes ////
|
|
#include "ini_parser.h"
|
|
#include "mist_cfg.h"
|
|
#include "user_io.h"
|
|
#include "usb/usb.h"
|
|
|
|
//// mist_ini_parse() ////
|
|
void mist_ini_parse()
|
|
{
|
|
ini_parse(&mist_ini_cfg);
|
|
}
|
|
|
|
|
|
//// vars ////
|
|
// config data
|
|
mist_cfg_t mist_cfg = {
|
|
.scandoubler_disable = 0,
|
|
.mouse_boot_mode = 0,
|
|
.joystick_ignore_hat = 0,
|
|
.joystick_disable_shortcuts = 0
|
|
};
|
|
|
|
// mist ini sections
|
|
const ini_section_t mist_ini_sections[] = {
|
|
{1, "MIST"}
|
|
};
|
|
|
|
// mist ini vars
|
|
const ini_var_t mist_ini_vars[] = {
|
|
{"SCANDOUBLER_DISABLE", (void*)(&(mist_cfg.scandoubler_disable)), UINT8, 0, 1, 1},
|
|
{"MOUSE_BOOT_MODE", (void*)(&(mist_cfg.mouse_boot_mode)), UINT8, 0, 1, 1},
|
|
{"JOYSTICK_IGNORE_HAT", (void*)(&(mist_cfg.joystick_ignore_hat)), UINT8, 0, 1, 1},
|
|
{"JOYSTICK_DISABLE_SHORTCUTS", (void*)(&(mist_cfg.joystick_disable_shortcuts)), UINT8, 0, 1, 1},
|
|
{"KEY_REMAP", (void*)user_io_key_remap, CUSTOM_HANDLER, 0, 0, 1},
|
|
// {"JOYSTICK_AXIS_REMAP", (void*)user_io_joystick_axis_remap, CUSTOM_HANDLER, 0, 0, 1},
|
|
{"JOYSTICK_BUTTON_REMAP", (void*)hid_joystick_axis_remap, CUSTOM_HANDLER, 0, 0, 1}
|
|
};
|
|
|
|
// mist ini config
|
|
const ini_cfg_t mist_ini_cfg = {
|
|
"MIST INI",
|
|
mist_ini_sections,
|
|
mist_ini_vars,
|
|
(int)(sizeof(mist_ini_sections) / sizeof(ini_section_t)),
|
|
(int)(sizeof(mist_ini_vars) / sizeof(ini_var_t))
|
|
};
|
|
|