diff --git a/watch-faces/complication/blackjack_face.c b/watch-faces/complication/blackjack_face.c index 375e0435..c5dda6b6 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"); @@ -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: 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 | | * |---------|--------------------------|