mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-06-04 19:01:15 +00:00
Rename GetWindowScalingFactor() to Win_GetW.., support older Win versions
Minimum required Windows version is XP again (instead of Win10). Win_GetWindowScalingFactor() tries to use two dynamically loaded functions from newer windows versions (8.1+, Win10 1607+) and has a fallback for older versions that also seems to work (at least if all displays have the same DPI). Moved the function to win_main.cpp so the dynamically loaded functions can be loaded at startup; so edit_gui_common.cpp could be removed again.
This commit is contained in:
parent
e67b77ba5d
commit
c3d480afe4
24 changed files with 98 additions and 65 deletions
|
@ -103,7 +103,7 @@ void CPropTreeView::OnPaint()
|
|||
}
|
||||
|
||||
void CPropTreeView::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct) {
|
||||
float scaling_factor = GetWindowScalingFactor(GetSafeHwnd());
|
||||
float scaling_factor = Win_GetWindowScalingFactor(GetSafeHwnd());
|
||||
int s20 = int(20 * scaling_factor);
|
||||
|
||||
// #HvGNote : This should be the right way to do it, but hardcoded is fine too.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue