Asteroids can use APP_DATA_PATH() again

This commit is contained in:
Willy-JL
2023-07-17 23:09:41 +01:00
parent 68431aa851
commit fc243eaa0e
+1 -4
View File
@@ -28,9 +28,7 @@
#define MAXPOWERUPS 3 /* Max powerups allowed on screen */
#define POWERUPSTTL 400 /* Max powerup time to live, in ticks. */
#define SHIP_HIT_ANIMATION_LEN 15
// Tick runs in thread, cant use APP_DATA_PATH()
#define SAVING_DIRECTORY EXT_PATH("apps_data/asteroids")
#define SAVING_FILENAME SAVING_DIRECTORY "/game_asteroids.save"
#define SAVING_FILENAME APP_DATA_PATH("game_asteroids.save")
#ifndef PI
#define PI 3.14159265358979f
#endif
@@ -1147,7 +1145,6 @@ void game_tick(void* ctx) {
bool load_game(AsteroidsApp* app) {
Storage* storage = furi_record_open(RECORD_STORAGE);
storage_common_mkdir(storage, SAVING_DIRECTORY);
storage_common_migrate(storage, EXT_PATH("apps/Games/game_asteroids.save"), SAVING_FILENAME);
File* file = storage_file_alloc(storage);