summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-03-01 14:00:43 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-03-01 14:00:43 +0100
commitcc15700bdb918699b6977140f27f6183efc3ac76 (patch)
treeaea308f5ef184095c98a35cc719ed238226a7235 /src/drivers
parent266647d2a7cb0a9f28be5a035996ec43b6419b04 (diff)
Windows: improve changing scale values of display while app runs.
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H1
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
index 816b667f6..b038fc5f1 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
@@ -97,6 +97,7 @@ public:
// these two are implemented in Fl_get_key_win32.cxx
int event_key(int) FL_OVERRIDE;
int get_key(int) FL_OVERRIDE;
+ float base_scale(int numscreen) FL_OVERRIDE;
};
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
index 83f8f8973..df6906bb4 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
@@ -483,3 +483,8 @@ int Fl_WinAPI_Screen_Driver::screen_num_unscaled(int x, int y)
}
return screen;
}
+
+
+float Fl_WinAPI_Screen_Driver::base_scale(int numscreen) {
+ return dpi[numscreen][0] / 96.;
+}