Skip to content

Commit

Permalink
Log HighScore
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanlangston committed Jan 4, 2024
1 parent 72c912c commit ea3e3ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Settings.zig
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ pub const Settings = struct {
Shared.Crypto.Decrypt(&scoreBuffer, highScoreDecryptedOut[0..]);
}
var trimValue: [1]u8 = undefined;
const highScore = if (settings.value.object.contains("HighScore")) (std.fmt.parseInt(u64, std.mem.trimRight(u8, &highScoreDecryptedOut, &trimValue), 10) catch default_settings.HighScore) else default_settings.HighScore;
var highScoreTrimmed = std.mem.trimRight(u8, &highScoreDecryptedOut, &trimValue);
Shared.Log.Debug_Formatted("HighScore: {s}", .{highScoreTrimmed});
const highScore = if (settings.value.object.contains("HighScore")) (std.fmt.parseInt(u64, highScoreTrimmed, 10) catch default_settings.HighScore) else default_settings.HighScore;

return NormalizeSettings(Settings{
.CurrentResolution = Resolution{
Expand Down

0 comments on commit ea3e3ba

Please sign in to comment.