1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-10 21:33:38 +00:00

Fixed error handler when GetDpiForMonitor() doesn't exist

This commit is contained in:
Bryan Roe
2022-02-09 23:15:34 -08:00
parent b2e74808eb
commit 96d940eb0b
2 changed files with 10 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@@ -88,18 +88,17 @@ function monitorinfo()
this._user32.CreateMethod('EnumDisplayMonitors');
this._kernel32 = this._gm.CreateNativeProxy('kernel32.dll');
this._kernel32.CreateMethod('GetLastError');
this._shcore = this._gm.CreateNativeProxy('SHCore.dll');
if (this._shcore != null)
try
{
try
{
this._shcore.CreateMethod('GetDpiForMonitor');
}
catch (xx)
{
this._shcore = null;
}
this._shcore = this._gm.CreateNativeProxy('SHCore.dll');
this._shcore.CreateMethod('GetDpiForMonitor');
}
catch (xx)
{
this._shcore = null;
}
this.getInfo = function getInfo()
{