File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ int32_t game_2048_app(void* p) {
391391 GameState * game_state = (GameState * )acquire_mutex_block (& state_mutex );
392392
393393 if (event_status == FuriStatusOk ) {
394- if (event .type == InputTypePress ) {
394+ if (event .type == InputTypeShort ) {
395395 switch (event .key ) {
396396 case InputKeyUp :
397397 game_state -> direction = DirectionUp ;
@@ -415,12 +415,16 @@ int32_t game_2048_app(void* p) {
415415 break ;
416416 case InputKeyOk :
417417 game_state -> direction = DirectionIdle ;
418- game_2048_restart (game_state );
419418 break ;
420419 case InputKeyBack :
421420 loop = false;
422421 break ;
423422 }
423+ } else if (event .type == InputTypeLong ) {
424+ if (event .key == InputKeyOk ) {
425+ game_state -> direction = DirectionIdle ;
426+ game_2048_restart (game_state );
427+ }
424428 }
425429 }
426430
You can’t perform that action at this time.
0 commit comments