Explorar o código

fixing some big bugs

MX %!s(int64=2) %!d(string=hai) anos
pai
achega
d0e05bc5dc
Modificáronse 2 ficheiros con 5 adicións e 3 borrados
  1. 1 1
      application.fam
  2. 4 2
      game_reversi.c

+ 1 - 1
application.fam

@@ -14,6 +14,6 @@ App(
     fap_icon_assets_symbol="game_reversi",
     fap_icon_assets_symbol="game_reversi",
     fap_author="@dimat",
     fap_author="@dimat",
     fap_weburl="https://github.com/zyuhel/flipperzero-racegame",
     fap_weburl="https://github.com/zyuhel/flipperzero-racegame",
-    fap_version="1.1",
+    fap_version="1.2",
     fap_description="Reversi game, the game controls should be intuitive. Longs press on OK opens the menu to start a new game.",
     fap_description="Reversi game, the game controls should be intuitive. Longs press on OK opens the menu to start a new game.",
 )
 )

+ 4 - 2
game_reversi.c

@@ -330,16 +330,18 @@ int32_t game_reversi_app() {
                 furi_mutex_acquire(app_state.mutex, FuriWaitForever);
                 furi_mutex_acquire(app_state.mutex, FuriWaitForever);
                 app_state.selected_menu_item = 0;
                 app_state.selected_menu_item = 0;
                 app_state.screen = AppScreenMenu;
                 app_state.screen = AppScreenMenu;
-                view_port_update(view_port);
+                
                 furi_mutex_release(app_state.mutex);
                 furi_mutex_release(app_state.mutex);
+                view_port_update(view_port);
                 continue;
                 continue;
             }
             }
             if(input.type != InputTypePress) continue;
             if(input.type != InputTypePress) continue;
 
 
             furi_mutex_acquire(app_state.mutex, FuriWaitForever);
             furi_mutex_acquire(app_state.mutex, FuriWaitForever);
             is_finished = !handle_key(&app_state, input.key);
             is_finished = !handle_key(&app_state, input.key);
-            view_port_update(view_port);
+
             furi_mutex_release(app_state.mutex);
             furi_mutex_release(app_state.mutex);
+            view_port_update(view_port);
         }
         }
         view_port_update(view_port);
         view_port_update(view_port);
     }
     }