screen: move debug log
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
parent
de91cbe2d0
commit
7c85f72e7f
2 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,6 @@ pub fn deinit(self: *Screen, alloc: std.mem.Allocator) void {
|
|||
}
|
||||
|
||||
pub fn resize(self: *Screen, alloc: std.mem.Allocator, w: usize, h: usize) !void {
|
||||
log.debug("resizing screen: width={d} height={d}", .{ w, h });
|
||||
alloc.free(self.buf);
|
||||
self.buf = try alloc.alloc(Cell, w * h);
|
||||
self.width = w;
|
||||
|
|
|
@ -101,6 +101,7 @@ pub fn Vaxis(comptime T: type) type {
|
|||
/// required to display the screen (ie width x height). Any previous screen is
|
||||
/// freed when resizing
|
||||
pub fn resize(self: *Self, alloc: std.mem.Allocator, winsize: Winsize) !void {
|
||||
log.debug("resizing screen: width={d} height={d}", .{ winsize.cols, winsize.rows });
|
||||
try self.screen.resize(alloc, winsize.cols, winsize.rows);
|
||||
// we only init our current screen. This has the effect of redrawing
|
||||
// every cell
|
||||
|
|
Loading…
Reference in a new issue