mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
sys_sdl_win: Sys_SetDPIAware: only call GetProcAddress on a non-NULL library handle
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1121 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
336cbb1cb2
commit
53288141e7
1 changed files with 2 additions and 2 deletions
|
@ -190,8 +190,8 @@ void Sys_SetDPIAware (void)
|
|||
|
||||
hShcore = LoadLibraryA ("Shcore.dll");
|
||||
hUser32 = LoadLibraryA ("user32.dll");
|
||||
setDPIAwareness = (SetProcessDPIAwarenessFunc) GetProcAddress(hShcore, "SetProcessDpiAwareness");
|
||||
setDPIAware = (SetProcessDPIAwareFunc) GetProcAddress (hUser32, "SetProcessDPIAware");
|
||||
setDPIAwareness = (SetProcessDPIAwarenessFunc) (hShcore ? GetProcAddress (hShcore, "SetProcessDpiAwareness") : NULL);
|
||||
setDPIAware = (SetProcessDPIAwareFunc) (hUser32 ? GetProcAddress (hUser32, "SetProcessDPIAware") : NULL);
|
||||
|
||||
if (setDPIAwareness) /* Windows 8.1+ */
|
||||
setDPIAwareness (dpi_monitor_aware);
|
||||
|
|
Loading…
Reference in a new issue