Make createTextureFromSurface print the error
This commit is contained in:
parent
1a8319b9c0
commit
ecd398d685
1 changed files with 4 additions and 1 deletions
|
@ -110,7 +110,10 @@ pub const Renderer = struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn createTextureFromSurface(self: Renderer, surface: Surface) !Texture {
|
pub fn createTextureFromSurface(self: Renderer, surface: Surface) !Texture {
|
||||||
var texture = c.SDL_CreateTextureFromSurface(self.renderer, surface.surface) orelse return error.SdlError;
|
var texture = c.SDL_CreateTextureFromSurface(self.renderer, surface.surface) orelse {
|
||||||
|
std.debug.warn("Renderer.createTextureFromSurface: {}\n", .{getError()});
|
||||||
|
return error.SdlError;
|
||||||
|
};
|
||||||
return Texture{ .texture = texture };
|
return Texture{ .texture = texture };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue