MCPcopy Create free account
hub / github.com/cmauri/eviacam / GetScreenSize

Method GetScreenSize

wxutil/mousecontrol.cpp:125–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125void CMouseControl::GetScreenSize()
126{
127#if defined(WIN32)
128 DEVMODE devMode;
129 // Get screen size. TODO: test with multiple displays
130 BOOL retval= EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devMode);
131 if (!retval) { exit (-1); }
132
133 m_ScreenHeight= devMode.dmPelsHeight;
134 m_ScreenWidth= devMode.dmPelsWidth;
135#else // Linux
136 m_ScreenHeight=
137 DisplayHeight (static_cast<Display*>(m_pDisplay), DefaultScreen (static_cast<Display*>(m_pDisplay)));
138 m_ScreenWidth=
139 DisplayWidth (static_cast<Display*>(m_pDisplay), DefaultScreen (static_cast<Display*>(m_pDisplay)));
140#endif
141 slog_write (SLOG_PRIO_DEBUG, "current screen size: %d, %d\n", m_ScreenWidth, m_ScreenHeight);
142}
143
144void CMouseControl::GetPointerLocation (int& x, int& y)
145{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected