Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions FModel/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
using FModel.Settings;
using Newtonsoft.Json;
using Serilog.Sinks.SystemConsole.Themes;
using OpenTK.Windowing.Desktop;
using OpenTK.Windowing.GraphicsLibraryFramework;
using MessageBox = AdonisUI.Controls.MessageBox;
using MessageBoxImage = AdonisUI.Controls.MessageBoxImage;
using MessageBoxResult = AdonisUI.Controls.MessageBoxResult;
Expand Down Expand Up @@ -123,6 +125,17 @@ protected override void OnStartup(StartupEventArgs e)
Log.Information("{OS}", GetOperatingSystemProductName());
Log.Information("{RuntimeVer}", RuntimeInformation.FrameworkDescription);
Log.Information("Culture {SysLang}", CultureInfo.CurrentCulture);

GLFWProvider.SetErrorCallback((error, description) =>
{
if (error == ErrorCode.PlatformError && description.Contains("Win32: Failed to query monitor DPI"))
{
Log.Information("Absorbed benign DPI-related GLFW error for asset viewer.");
return;
}

throw new GLFWException(description, error);
});
}

private void AppExit(object sender, ExitEventArgs e)
Expand Down