Fix switch/case code style
For readability and consistency, indent case statatements, and remove unnecessary additional blocks.
This commit is contained in:
parent
047179f232
commit
080df5eb5d
1 changed files with 7 additions and 10 deletions
|
@ -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,18 +95,16 @@ 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) {
|
||||||
if (!server_start(&server, serial, local_port, max_size, bit_rate)) {
|
if (!server_start(&server, serial, local_port, max_size, bit_rate)) {
|
||||||
|
|
Loading…
Reference in a new issue