mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-05-04 15:26:29 +00:00
Change keyrah_mode option to accept VID and PID (for A500 Arduino converter).
This commit is contained in:
@@ -46,7 +46,7 @@ const ini_section_t mist_ini_sections[] = {
|
||||
const ini_var_t mist_ini_vars[] = {
|
||||
{"YPBPR", (void*)(&(mist_cfg.ypbpr)), UINT8, 0, 1, 1},
|
||||
{"KEEP_VIDEO_MODE", (void*)(&(mist_cfg.keep_video_mode)), UINT8, 0, 1, 1},
|
||||
{"KEYRAH_MODE", (void*)(&(mist_cfg.keyrah_mode)), UINT8, 0, 1, 1},
|
||||
{"KEYRAH_MODE", (void*)(&(mist_cfg.keyrah_mode)), UINT32, 0, 0xFFFFFFFF, 1},
|
||||
{"RESET_COMBO", (void*)(&(mist_cfg.reset_combo)), UINT8, 0, 2, 1},
|
||||
{"SCANDOUBLER_DISABLE", (void*)(&(mist_cfg.scandoubler_disable)), UINT8, 0, 1, 1},
|
||||
{"MOUSE_BOOT_MODE", (void*)(&(mist_cfg.mouse_boot_mode)), UINT8, 0, 1, 1},
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
|
||||
//// type definitions ////
|
||||
typedef struct {
|
||||
uint32_t keyrah_mode;
|
||||
uint8_t scandoubler_disable;
|
||||
uint8_t mouse_boot_mode;
|
||||
uint8_t joystick_ignore_hat;
|
||||
uint8_t joystick_ignore_osd;
|
||||
uint8_t joystick_disable_shortcuts;
|
||||
uint8_t key_menu_as_rgui;
|
||||
uint8_t keyrah_mode;
|
||||
uint8_t reset_combo;
|
||||
uint8_t ypbpr;
|
||||
uint8_t keep_video_mode;
|
||||
|
||||
@@ -1705,7 +1705,7 @@ static void keyrah_trans(unsigned char *m, unsigned char *k)
|
||||
}
|
||||
|
||||
//Keyrah v2: USB\VID_18D8&PID_0002\A600/A1200_MULTIMEDIA_EXTENSION_VERSION
|
||||
#define KEYRAH_ID ((vid == 0x18D8) && (pid == 0x0002))
|
||||
#define KEYRAH_ID (mist_cfg.keyrah_mode && (((((uint32_t)vid)<<16) | pid) == mist_cfg.keyrah_mode))
|
||||
|
||||
void user_io_kbd(unsigned char m, unsigned char *k, uint8_t priority, unsigned short vid, unsigned short pid)
|
||||
{
|
||||
@@ -1716,7 +1716,7 @@ void user_io_kbd(unsigned char m, unsigned char *k, uint8_t priority, unsigned s
|
||||
}
|
||||
latest_keyb_priority = priority; // set for next call
|
||||
|
||||
char keyrah = (KEYRAH_ID && !mist_cfg.keyrah_mode) ? 1 : 0;
|
||||
char keyrah = KEYRAH_ID ? 1 : 0;
|
||||
if(emu_mode == EMU_MOUSE) keyrah <<= 1;
|
||||
|
||||
if(keyrah) keyrah_trans(&m, k);
|
||||
|
||||
Reference in New Issue
Block a user