Do not process finger events if no control

If --no-control is passed, then im->mp is NULL, so processing touches
would crash.
This commit is contained in:
Romain Vimont 2022-01-23 12:02:35 +01:00
parent 0ec3361bc9
commit 0b8e926330

View File

@ -899,6 +899,9 @@ sc_input_manager_handle_event(struct sc_input_manager *im, SDL_Event *event) {
case SDL_FINGERMOTION:
case SDL_FINGERDOWN:
case SDL_FINGERUP:
if (!im->control) {
break;
}
sc_input_manager_process_touch(im, &event->tfinger);
break;
case SDL_DROPFILE: {