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:
File diff suppressed because one or more lines are too long
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user