Skip to content

Commit 4a0d4eb

Browse files
committed
fit the code style
1 parent 01e3208 commit 4a0d4eb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/anbox/platform/sdl/platform.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ Platform::Platform(
125125
touch_->set_abs_max(ABS_MT_TRACKING_ID, MAX_TRACKING_ID);
126126
touch_->set_prop_bit(INPUT_PROP_DIRECT);
127127

128-
for(int i = 0; i < MAX_FINGERS ; i++)touch_slots[i] = -1;
128+
for (int i = 0; i < MAX_FINGERS; i++)
129+
touch_slots[i] = -1;
129130

130131
event_thread_ = std::thread(&Platform::process_events, this);
131132
}
@@ -210,7 +211,7 @@ void Platform::process_input_event(const SDL_Event &event) {
210211
if (config_.no_touch_emulation) {
211212
mouse_events.push_back({EV_KEY, BTN_LEFT, 0});
212213
} else {
213-
push_finger_up(emulated_touch_id_,touch_events);
214+
push_finger_up(emulated_touch_id_, touch_events);
214215
}
215216
break;
216217
case SDL_MOUSEMOTION:
@@ -231,7 +232,7 @@ void Platform::process_input_event(const SDL_Event &event) {
231232
mouse_events.push_back({EV_REL, REL_X, event.motion.xrel});
232233
mouse_events.push_back({EV_REL, REL_Y, event.motion.yrel});
233234
} else {
234-
push_finger_motion(x,y,emulated_touch_id_,touch_events);
235+
push_finger_motion(x, y, emulated_touch_id_, touch_events);
235236
}
236237
break;
237238
case SDL_MOUSEWHEEL:
@@ -263,12 +264,12 @@ void Platform::process_input_event(const SDL_Event &event) {
263264
case SDL_FINGERDOWN: {
264265
if (!calculate_touch_coordinates(event, x, y))
265266
break;
266-
push_finger_down(x,y,event.tfinger.fingerId,touch_events);
267+
push_finger_down(x, y, event.tfinger.fingerId, touch_events);
267268

268269
break;
269270
}
270271
case SDL_FINGERUP: {
271-
push_finger_up(event.tfinger.fingerId,touch_events);
272+
push_finger_up(event.tfinger.fingerId, touch_events);
272273
break;
273274
}
274275
case SDL_FINGERMOTION: {
@@ -311,7 +312,7 @@ void Platform::push_slot(std::vector<input::Event> &touch_events, int slot){
311312
void Platform::push_finger_down(int x, int y, int finger_id, std::vector<input::Event> &touch_events){
312313
int slot = find_touch_slot(-1);
313314
if(slot == -1){
314-
DEBUG("no free slot!\n");
315+
DEBUG("no free slot!");
315316
return;
316317
}
317318
touch_slots[slot] = finger_id;

0 commit comments

Comments
 (0)