From e0b9f995afca2c470ab0543d44e1f40fe5911631 Mon Sep 17 00:00:00 2001 From: pfg Date: Tue, 19 Oct 2021 18:01:17 -0400 Subject: [PATCH] glfw: fix getWindowPos (#35) --- src/Window.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Window.zig b/src/Window.zig index 58e06b4..3ed63ed 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -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.