glfw: re-instate prong

Bring back the 'c.GLFW_NOT_INITIALIZED' prong in 'convertError', such that if it is ever passed that error code, we can differentiate it from just an invalid input; because it is a valid input, we just guarantee that it won't occur.
This commit is contained in:
InKryption 2021-11-23 18:50:16 +01:00 committed by Stephen Gutekanst
parent b35a7b4fad
commit 6127fa267f

View file

@ -84,6 +84,7 @@ pub const Error = error{
fn convertError(e: c_int) Error!void {
return switch (e) {
c.GLFW_NO_ERROR => {},
c.GLFW_NOT_INITIALIZED => unreachable,
c.GLFW_NO_CURRENT_CONTEXT => Error.NoCurrentContext,
c.GLFW_INVALID_ENUM => Error.InvalidEnum,
c.GLFW_INVALID_VALUE => Error.InvalidValue,