From 9a5055af82bdd281e334513e5318c636d63f53ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 1 Apr 2022 13:55:30 +0200 Subject: Free libraries. --- c/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'c/common.c') diff --git a/c/common.c b/c/common.c index a44462d..fb76c71 100644 --- a/c/common.c +++ b/c/common.c @@ -15,8 +15,10 @@ int Dpi(int i) extern HWND HWnd; IDPI = 96; hModule = LoadLibrary(TEXT("User32.dll")); - if (hModule && (GetDpiForWindow = GetProcAddress(hModule, "GetDpiForWindow"))) + if (hModule && (GetDpiForWindow = GetProcAddress(hModule, "GetDpiForWindow"))) { IDPI = GetDpiForWindow(HWnd); + FreeLibrary(hModule); + } } return MulDiv(i, IDPI, 96); -- cgit v1.2.3