mirror of
https://github.com/4sval/FModel.git
synced 2026-03-23 18:24:36 -05:00
Add handler for DPI-related benign GLFW error that prevents the 3D viewer from running
This commit is contained in:
parent
5776444020
commit
16328f21b2
|
|
@ -13,6 +13,8 @@ using FModel.Services;
|
|||
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;
|
||||
|
|
@ -123,6 +125,17 @@ public partial class App
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user