From ad093f4f67fc687c2ece465bac86fa5693a27252 Mon Sep 17 00:00:00 2001 From: David Volovskiy Date: Wed, 3 Dec 2025 07:43:47 -0500 Subject: [PATCH 1/3] Fix on typecasting win rate --- watch-faces/complication/blackjack_face.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/watch-faces/complication/blackjack_face.c b/watch-faces/complication/blackjack_face.c index 375e0435..09cf9e4e 100755 --- a/watch-faces/complication/blackjack_face.c +++ b/watch-faces/complication/blackjack_face.c @@ -277,7 +277,7 @@ static void display_win_ratio(blackjack_face_state_t *state) { game_state = BJ_WIN_RATIO; uint8_t win_ratio = 0; if (state->games_played > 0) { // Avoid dividing by zero - win_ratio = (uint8_t)(100 * state->games_won) / state->games_played; + win_ratio = (uint8_t)((100 * state->games_won) / state->games_played); } watch_display_text(WATCH_POSITION_TOP_RIGHT, " "); watch_display_text_with_fallback(WATCH_POSITION_TOP, "WINS ", "WR"); From 8198d6c832925a78500aeaca3ef4bc19bc973272 Mon Sep 17 00:00:00 2001 From: David Volovskiy Date: Wed, 3 Dec 2025 07:50:38 -0500 Subject: [PATCH 2/3] Able to reset the win-lose rate --- watch-faces/complication/blackjack_face.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/watch-faces/complication/blackjack_face.c b/watch-faces/complication/blackjack_face.c index 09cf9e4e..c5dda6b6 100755 --- a/watch-faces/complication/blackjack_face.c +++ b/watch-faces/complication/blackjack_face.c @@ -444,6 +444,11 @@ bool blackjack_face_loop(movement_event_t event, void *context) { case EVENT_ALARM_LONG_PRESS: if (game_state == BJ_TITLE_SCREEN) { toggle_tap_control(state); + } else if (game_state == BJ_WIN_RATIO) { + // Reset the win-lose ratio + state->games_won = 0; + state->games_played = 0; + watch_display_text(WATCH_POSITION_BOTTOM, " 0Pct"); } break; case EVENT_TIMEOUT: From 3b4b70814b3529482bf15ca073bd065edf96fd7d Mon Sep 17 00:00:00 2001 From: David Volovskiy Date: Wed, 3 Dec 2025 07:55:48 -0500 Subject: [PATCH 3/3] Doc update on the win-rate reset --- watch-faces/complication/blackjack_face.h | 1 + 1 file changed, 1 insertion(+) diff --git a/watch-faces/complication/blackjack_face.h b/watch-faces/complication/blackjack_face.h index 4a02cd0b..8b10d069 100755 --- a/watch-faces/complication/blackjack_face.h +++ b/watch-faces/complication/blackjack_face.h @@ -63,6 +63,7 @@ * * Long-pressing the LIGHT button on the Title Screen will display your win rate as a percentage of games finished. * It displays as games won / (games won + games lost) it does not include incomplete nor tied games. + * You can reset the win rate on that screen by long-pressing the ALARM button. * * | Cards | | * |---------|--------------------------|