aboutsummaryrefslogtreecommitdiff
path: root/c/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/common.h')
-rw-r--r--c/common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/c/common.h b/c/common.h
index fb21e6f..709a258 100644
--- a/c/common.h
+++ b/c/common.h
@@ -55,6 +55,10 @@ std::optional<T> maybe_make(U... xs)
}
}
+/* Variable template for caching values from GetSystemMetrics. */
+template <int I>
+const auto Metric = GetSystemMetrics(I);
+
/* Check result of Windows API call, throwing error on NULL. */
template <typename T>
inline T require(const T x)