mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 03:33:19 +08:00
Merge pull request #3244 from peppy/log-display-fix
Fix notifications suggesting automatic reporting in non-deployed builds
This commit is contained in:
commit
d0ffab6987
@ -7,6 +7,7 @@ using System.Linq;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
|
using osu.Framework.Development;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.IPC;
|
using osu.Game.IPC;
|
||||||
@ -51,7 +52,7 @@ namespace osu.Desktop
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int allowableExceptions = 1;
|
private static int allowableExceptions = DebugUtils.IsDebugBuild ? 0 : 1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Allow a maximum of one unhandled exception, per second of execution.
|
/// Allow a maximum of one unhandled exception, per second of execution.
|
||||||
|
@ -463,7 +463,7 @@ namespace osu.Game
|
|||||||
Schedule(() => notifications.Post(new SimpleNotification
|
Schedule(() => notifications.Post(new SimpleNotification
|
||||||
{
|
{
|
||||||
Icon = entry.Level == LogLevel.Important ? FontAwesome.fa_exclamation_circle : FontAwesome.fa_bomb,
|
Icon = entry.Level == LogLevel.Important ? FontAwesome.fa_exclamation_circle : FontAwesome.fa_bomb,
|
||||||
Text = entry.Message + (entry.Exception != null ? "\n\nThis error has been automatically reported to the devs." : string.Empty),
|
Text = entry.Message + (entry.Exception != null && IsDeployedBuild ? "\n\nThis error has been automatically reported to the devs." : string.Empty),
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
else if (recentLogCount == short_term_display_limit)
|
else if (recentLogCount == short_term_display_limit)
|
||||||
|
Loading…
Reference in New Issue
Block a user