Option to disable mouse emulation by keyboard.

This commit is contained in:
sorgelig
2018-01-20 22:09:40 +08:00
parent 20dedcf16c
commit b71ee14a02
3 changed files with 7 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ const ini_var_t mist_ini_vars[] = {
{ "VIDEO_MODE", (void*)(mist_cfg.video_conf), STRING, 0, sizeof(mist_cfg.video_conf)-1, 1 },
{ "HDMI_AUDIO_96K", (void*)(&(mist_cfg.hdmi_audio_96k)), UINT8, 0, 1, 1 },
{ "DVI_MODE", (void*)(&(mist_cfg.dvi)), UINT8, 0, 1, 1 },
{ "KBD_NOMOUSE", (void*)(&(mist_cfg.kbd_nomouse)), UINT8, 0, 1, 1 },
};
// mist ini config

View File

@@ -23,6 +23,7 @@ typedef struct {
uint8_t hdmi_audio_96k;
uint8_t dvi;
uint8_t video_mode;
uint8_t kbd_nomouse;
char video_conf[1024];
} mist_cfg_t;

View File

@@ -1822,7 +1822,11 @@ void user_io_kbd(uint16_t key, int press)
default:
if (joy_force) emu_mode = (emu_mode == EMU_JOY0) ? EMU_JOY1 : EMU_JOY0;
else emu_mode = (emu_mode + 1) & 3;
else
{
emu_mode = (emu_mode + 1) & 3;
if(mist_cfg.kbd_nomouse && emu_mode == EMU_MOUSE) emu_mode = (emu_mode + 1) & 3;
}
break;
}
input_notify_mode();