@@ -980,7 +980,7 @@ static BOOL CALLBACK la_Win32MonitorEnum(HMONITOR hMon, HDC hdc, LPRECT lprcMoni
int la_GetDPI(HWND win){
laWin32MonitorEnumData data = { 0 };
EnumDisplayMonitors(0, 0, la_Win32MonitorEnum, (LPARAM)&data);
- return GetDpiForWindow(win);
+ if(win) return GetDpiForWindow(win);
return 144;
}
#endif
@@ -771,7 +771,12 @@ void lapost_Block(laBlock *b){
void lapost_UserPreferences(void* unused){
//MAIN.ScaledUiRowHeight=MAIN.UiRowHeight;
//tnsInvalidateFontCache();
+#ifdef _WIN32
+ la_GetDPI(0);
+#endif
+#ifdef LA_LINUX
la_GetDPI(MAIN.win);
void laset_ColorPickerGamma(void* unused, real gamma){
MAIN.ColorPickerGamma=gamma; laRedrawCurrentWindow();