Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/mpc-hc/DpiHelper.h')
-rw-r--r--src/mpc-hc/DpiHelper.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mpc-hc/DpiHelper.h b/src/mpc-hc/DpiHelper.h
index 66000183f..34e0dc857 100644
--- a/src/mpc-hc/DpiHelper.h
+++ b/src/mpc-hc/DpiHelper.h
@@ -1,5 +1,5 @@
/*
- * (C) 2015 see Authors.txt
+ * (C) 2015-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -29,6 +29,9 @@ public:
void Override(HWND hWindow);
void Override(int dpix, int dpiy);
+ inline double ScaleFactorX() const { return m_dpix / 96.0; }
+ inline double ScaleFactorY() const { return m_dpiy / 96.0; }
+
inline int ScaleFloorX(int x) const { return x * m_dpix / 96; }
inline int ScaleFloorY(int y) const { return y * m_dpiy / 96; }
inline int ScaleX(int x) const { return MulDiv(x, m_dpix, 96); }