glfw: fix getWindowPos (#35)

This commit is contained in:
pfg 2021-10-19 18:01:17 -04:00 committed by GitHub
parent c5376934fd
commit d82d6972e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -366,8 +366,8 @@ pub inline fn setIcon(self: Window, allocator: *mem.Allocator, images: ?[]Image)
}
const Pos = struct {
x: usize,
y: usize,
x: isize,
y: isize,
};
/// Retrieves the position of the content area of the specified window.
@ -388,7 +388,7 @@ pub inline fn getPos(self: Window) Error!Pos {
var y: c_int = 0;
c.glfwGetWindowPos(self.handle, &x, &y);
try getError();
return Pos{ .x = @intCast(usize, x), .y = @intCast(usize, y) };
return Pos{ .x = @intCast(isize, x), .y = @intCast(isize, y) };
}
/// Sets the position of the content area of the specified window.