summaryrefslogtreecommitdiffstats
path: root/src/libs/dxvk-native-1.9.2a/src/util/util_monitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/dxvk-native-1.9.2a/src/util/util_monitor.cpp')
-rw-r--r--src/libs/dxvk-native-1.9.2a/src/util/util_monitor.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/libs/dxvk-native-1.9.2a/src/util/util_monitor.cpp b/src/libs/dxvk-native-1.9.2a/src/util/util_monitor.cpp
new file mode 100644
index 00000000..7e1b7c6d
--- /dev/null
+++ b/src/libs/dxvk-native-1.9.2a/src/util/util_monitor.cpp
@@ -0,0 +1,51 @@
+#include "util_monitor.h"
+#include "util_string.h"
+
+#include "../wsi/wsi_mode.h"
+#include "../wsi/wsi_monitor.h"
+#include "../wsi/wsi_window.h"
+
+#include "./log/log.h"
+
+namespace dxvk {
+
+ HMONITOR GetDefaultMonitor() {
+ return wsi::getDefaultMonitor();
+ }
+
+
+ void GetWindowClientSize(
+ HWND hWnd,
+ UINT* pWidth,
+ UINT* pHeight) {
+ wsi::getWindowSize(hWnd, pWidth, pHeight);
+ }
+
+
+ void GetMonitorClientSize(
+ HMONITOR hMonitor,
+ UINT* pWidth,
+ UINT* pHeight) {
+ RECT rect;
+
+ if (!wsi::getDesktopCoordinates(hMonitor, &rect)) {
+ Logger::err("D3D9: Failed to query monitor info");
+ return;
+ }
+
+ if (pWidth)
+ *pWidth = rect.right - rect.left;
+
+ if (pHeight)
+ *pHeight = rect.bottom - rect.top;
+ }
+
+
+ void GetMonitorRect(
+ HMONITOR hMonitor,
+ RECT* pRect) {
+ if (!wsi::getDesktopCoordinates(hMonitor, pRect))
+ Logger::err("D3D9: Failed to query monitor info");
+ }
+
+}