diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-11-20 22:35:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-11-20 22:44:19 +0100 |
| commit | 2d2af972a53a2c11b95469058803b4eaed2d3c01 (patch) | |
| tree | be9b117ded86780e66f5926aa418619a019cdf9a /src/wx/wx_util.cc | |
| parent | 83e5ff9a10b8f2e44bfc0d25d3f55eb06f3af518 (diff) | |
Extract dpi_scale_factor() to a function.
Diffstat (limited to 'src/wx/wx_util.cc')
| -rw-r--r-- | src/wx/wx_util.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index a0beb8f72..47a6bd5b0 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -673,3 +673,18 @@ gui_is_dark () #endif } + +#if wxCHECK_VERSION(3,1,0) +double +dpi_scale_factor (wxWindow* window) +{ + return window->GetDPIScaleFactor(); +} +#else +double +dpi_scale_factor (wxWindow*) +{ + return 1; +} +#endif + |
