Skip to content

Commit

Permalink
Fix incorrect sdl2 fn signatures
Browse files Browse the repository at this point in the history
Closes #3
  • Loading branch information
hazeycode committed Jan 5, 2025
1 parent 2515e58 commit 5a3d4a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sdl2.zig
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,15 @@ extern fn SDL_GetWindowDisplayMode(window: *Window, mode: *DisplayMode) i32;

/// Get the position of a window.
pub fn windowGetPosition(window: *Window, w: ?*i32, h: ?*i32) Error!void {
if (SDL_GetWindowPosition(window, w, h) < 0) return makeError();
SDL_GetWindowPosition(window, w, h);
}
extern fn SDL_GetWindowPosition(window: *Window, x: ?*i32, y: ?*i32) i32;
extern fn SDL_GetWindowPosition(window: *Window, x: ?*i32, y: ?*i32) void;

/// Get the size of a window's client area.
pub fn windowGetSize(window: *Window, w: ?*i32, h: ?*i32) Error!void {
if (SDL_GetWindowSize(window, w, h) < 0) return makeError();
SDL_GetWindowSize(window, w, h);
}
extern fn SDL_GetWindowSize(window: *Window, w: ?*i32, h: ?*i32) i32;
extern fn SDL_GetWindowSize(window: *Window, w: ?*i32, h: ?*i32) void;

/// Set the title of a window.
pub fn windowSetTitle(window: *Window, title: [:0]const u8) void {
Expand Down

0 comments on commit 5a3d4a6

Please sign in to comment.