Fix switch/case code style

For readability and consistency, indent case statatements, and remove
unnecessary additional blocks.
This commit is contained in:
Romain Vimont 2018-03-15 16:00:40 +01:00
parent 047179f232
commit 080df5eb5d

View file

@ -85,10 +85,9 @@ static void event_loop(void) {
break; break;
} }
break; break;
case SDL_TEXTINPUT: { case SDL_TEXTINPUT:
input_manager_process_text_input(&input_manager, &event.text); input_manager_process_text_input(&input_manager, &event.text);
break; break;
}
case SDL_KEYDOWN: case SDL_KEYDOWN:
case SDL_KEYUP: case SDL_KEYUP:
input_manager_process_key(&input_manager, &event.key); input_manager_process_key(&input_manager, &event.key);
@ -96,17 +95,15 @@ static void event_loop(void) {
case SDL_MOUSEMOTION: case SDL_MOUSEMOTION:
input_manager_process_mouse_motion(&input_manager, &event.motion); input_manager_process_mouse_motion(&input_manager, &event.motion);
break; break;
case SDL_MOUSEWHEEL: { case SDL_MOUSEWHEEL:
input_manager_process_mouse_wheel(&input_manager, &event.wheel); input_manager_process_mouse_wheel(&input_manager, &event.wheel);
break; break;
}
case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP: { case SDL_MOUSEBUTTONUP:
input_manager_process_mouse_button(&input_manager, &event.button); input_manager_process_mouse_button(&input_manager, &event.button);
break; break;
} }
} }
}
} }
SDL_bool scrcpy(const char *serial, Uint16 local_port, Uint16 max_size, Uint32 bit_rate) { SDL_bool scrcpy(const char *serial, Uint16 local_port, Uint16 max_size, Uint32 bit_rate) {