disable cursor movement threshold when controller is the primary input (#14)
This commit is contained in:
parent
1ec20de2f5
commit
52278c5a4d
|
@ -114,6 +114,8 @@ namespace recomp {
|
||||||
};
|
};
|
||||||
|
|
||||||
PromptContext *get_prompt_context(void);
|
PromptContext *get_prompt_context(void);
|
||||||
|
|
||||||
|
bool get_cont_active(void);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -191,6 +191,10 @@ void recomp::set_cont_or_kb(bool cont_interacted) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool recomp::get_cont_active() {
|
||||||
|
return cont_active;
|
||||||
|
}
|
||||||
|
|
||||||
void close_config_menu_impl() {
|
void close_config_menu_impl() {
|
||||||
recomp::save_config();
|
recomp::save_config();
|
||||||
|
|
||||||
|
|
|
@ -1260,6 +1260,11 @@ void draw_hook(RT64::RenderCommandList* command_list, RT64::RenderFramebuffer* s
|
||||||
}
|
}
|
||||||
last_mouse_pos[0] = cur_event.motion.x;
|
last_mouse_pos[0] = cur_event.motion.x;
|
||||||
last_mouse_pos[1] = cur_event.motion.y;
|
last_mouse_pos[1] = cur_event.motion.y;
|
||||||
|
|
||||||
|
// if controller is the primary input, don't use mouse movement to allow cursor to reactivate
|
||||||
|
if (recomp::get_cont_active()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// fallthrough
|
// fallthrough
|
||||||
case SDL_EventType::SDL_MOUSEBUTTONDOWN:
|
case SDL_EventType::SDL_MOUSEBUTTONDOWN:
|
||||||
|
|
Loading…
Reference in New Issue