Skip to content

Commit 655dd81

Browse files
committed
[Breaking] Small fixes to sdl2_ttf.zig
1 parent ecb1d4c commit 655dd81

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sdl2_ttf.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn init() !void {
1111
extern fn TTF_Init() c_int;
1212

1313
pub fn wasInit() bool {
14-
return TTF_WasInit() == 1;
14+
return TTF_WasInit() == sdl.True;
1515
}
1616
extern fn TTF_WasInit() c_int;
1717

@@ -21,8 +21,8 @@ pub fn quit() void {
2121
extern fn TTF_Quit() void;
2222

2323
pub const Font = opaque {
24-
pub fn open(file: [:0]const u8, ptsize: i32) !*Font {
25-
return TTF_OpenFont(file, ptsize) orelse sdl.makeError();
24+
pub fn open(file: [:0]const u8, ptsize: u16) !*Font {
25+
return TTF_OpenFont(file, @intCast(ptsize)) orelse sdl.makeError();
2626
}
2727
extern fn TTF_OpenFont(file: [*c]const u8, ptsize: c_int) ?*Font;
2828

0 commit comments

Comments
 (0)