Update minesweeper.c

flagsbased-uncover
Alejandro 2 years ago committed by GitHub
parent 796821331f
commit eafcf9f673
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -81,7 +81,7 @@ static void render_callback(Canvas* const canvas, void* ctx) {
}
FuriString* tempStr;
tempStr = furi_string_alloc();
furi_string_cat_printf(tempStr, "Mines: %d", MINECOUNT - minesweeper_state->flags_set);
furi_string_printf(tempStr, "Mines: %d", MINECOUNT - minesweeper_state->flags_set);
canvas_set_font(canvas, FontSecondary);
canvas_draw_str_aligned(canvas, 0, 0, AlignLeft, AlignTop, furi_string_get_cstr(tempStr));
furi_string_free(tempStr);
@ -93,7 +93,7 @@ static void render_callback(Canvas* const canvas, void* ctx) {
minutes = (int) seconds / 60;
seconds = seconds % 60;
}
furi_string_cat_printf(tempStr, "%01d:%02d", minutes, seconds);
furi_string_printf(tempStr, "%01d:%02d", minutes, seconds);
canvas_draw_str_aligned(canvas, 128, 0, AlignRight, AlignTop, furi_string_get_cstr(tempStr));
furi_string_free(tempStr);

Loading…
Cancel
Save