[FL-976] Removing lambdas (#1849)
* Removing lambdas... * Wake the fk up, Gordon! We have a citadel to burn! * Here comes the Nihilanth * Lambda documentation Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -103,7 +103,9 @@ static void bt_hid_mouse_draw_callback(Canvas* canvas, void* context) {
|
||||
|
||||
static void bt_hid_mouse_process(BtHidMouse* bt_hid_mouse, InputEvent* event) {
|
||||
with_view_model(
|
||||
bt_hid_mouse->view, (BtHidMouseModel * model) {
|
||||
bt_hid_mouse->view,
|
||||
BtHidMouseModel * model,
|
||||
{
|
||||
if(event->key == InputKeyBack) {
|
||||
if(event->type == InputTypeShort) {
|
||||
furi_hal_bt_hid_mouse_press(HID_MOUSE_BTN_RIGHT);
|
||||
@@ -167,8 +169,8 @@ static void bt_hid_mouse_process(BtHidMouse* bt_hid_mouse, InputEvent* event) {
|
||||
model->up_pressed = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
},
|
||||
true);
|
||||
}
|
||||
|
||||
static bool bt_hid_mouse_input_callback(InputEvent* event, void* context) {
|
||||
@@ -211,8 +213,5 @@ View* bt_hid_mouse_get_view(BtHidMouse* bt_hid_mouse) {
|
||||
void bt_hid_mouse_set_connected_status(BtHidMouse* bt_hid_mouse, bool connected) {
|
||||
furi_assert(bt_hid_mouse);
|
||||
with_view_model(
|
||||
bt_hid_mouse->view, (BtHidMouseModel * model) {
|
||||
model->connected = connected;
|
||||
return true;
|
||||
});
|
||||
bt_hid_mouse->view, BtHidMouseModel * model, { model->connected = connected; }, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user