MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / outputHandleDone

Function outputHandleDone

extern/glfw/src/wl_monitor.c:86–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86static void outputHandleDone(void* userData, struct wl_output* output)
87{
88 struct _GLFWmonitor* monitor = userData;
89
90 if (monitor->widthMM <= 0 || monitor->heightMM <= 0)
91 {
92 // If Wayland does not provide a physical size, assume the default 96 DPI
93 const GLFWvidmode* mode = &monitor->modes[monitor->wl.currentMode];
94 monitor->widthMM = (int) (mode->width * 25.4f / 96.f);
95 monitor->heightMM = (int) (mode->height * 25.4f / 96.f);
96 }
97
98 for (int i = 0; i < _glfw.monitorCount; i++)
99 {
100 if (_glfw.monitors[i] == monitor)
101 return;
102 }
103
104 _glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST);
105}
106
107static void outputHandleScale(void* userData,
108 struct wl_output* output,

Callers

nothing calls this directly

Calls 1

_glfwInputMonitorFunction · 0.85

Tested by

no test coverage detected