MCPcopy Create free account
hub / github.com/ConfettiFX/The-Forge / wndUpdateResolution

Function wndUpdateResolution

Common_3/OS/WindowSystem/WindowSystem.cpp:257–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255#ifdef ENABLE_FORGE_UI
256
257static void wndUpdateResolution(void* pUserData)
258{
259 ASSERT(pUserData);
260 UIWidget* pWidget = (UIWidget*)pUserData;
261
262 uint32_t activeMonitorIdx = getActiveMonitorIdx();
263
264 if (gWindowSize == gWindowPrevSize && activeMonitorIdx == gPrevActiveMonitor)
265 {
266 return;
267 }
268
269 if (activeMonitorIdx != gPrevActiveMonitor)
270 {
271 wndUpdateResolutionsList(pWidget);
272 }
273 gPrevActiveMonitor = activeMonitorIdx;
274
275 MonitorDesc* pMonitor = getMonitor(activeMonitorIdx);
276
277 gWindowPrevSize = gWindowSize;
278 setWindowClientSize(pWindowRef, pMonitor->resolutions[gWindowSize].mWidth, pMonitor->resolutions[gWindowSize].mHeight);
279}
280
281static void wndSelectRecommendedWindowResolution(void* pUserData, const MonitorDesc* pMonitor)
282{

Callers 1

Calls 4

wndUpdateResolutionsListFunction · 0.85
getActiveMonitorIdxFunction · 0.50
getMonitorFunction · 0.50
setWindowClientSizeFunction · 0.50

Tested by

no test coverage detected