Skip to content

Commit

Permalink
Fix duplicate dt_control_log() messages (again)
Browse files Browse the repository at this point in the history
We must display the message if we are
- not in timeout mode so there are no messages currently shown.
- still in timeout mode with old messages still shown but the new one differs from the last.
  • Loading branch information
jenshannoschwalm authored and TurboGit committed Nov 23, 2024
1 parent 2702ef6 commit 584d614
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/control/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ void dt_control_log(const char *msg, ...)

const int old_idx = (dc->log_pos - 1) & (DT_CTL_LOG_SIZE-1);
const gboolean timeout = dc->log_message_timeout_id;
if(timeout || g_strcmp0(escaped_msg, dc->log_message[old_idx]))
if(!timeout || g_strcmp0(escaped_msg, dc->log_message[old_idx]))
{
g_strlcpy(dc->log_message[dc->log_pos & (DT_CTL_LOG_SIZE-1)], escaped_msg, DT_CTL_LOG_MSG_SIZE);
dc->log_pos++;
Expand Down

0 comments on commit 584d614

Please sign in to comment.