glfw: glfwGetMonitors can return null to signify no monitors
This commit is contained in:
parent
bc8ce57e53
commit
8d2a4cd8d2
1 changed files with 2 additions and 1 deletions
|
|
@ -398,7 +398,8 @@ pub inline fn getAll(allocator: mem.Allocator) mem.Allocator.Error![]Monitor {
|
|||
Error.NotInitialized => unreachable,
|
||||
else => unreachable,
|
||||
};
|
||||
unreachable;
|
||||
// `glfwGetMonitors` returning null can be either an error or no monitors
|
||||
return &[_]Monitor{};
|
||||
}
|
||||
|
||||
/// Returns the primary monitor.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue