From a33df351cf569077ede28a2d1cf1579134d8c101 Mon Sep 17 00:00:00 2001 From: leonmavr <0xleo.git@gmail.com> Date: Thu, 23 Feb 2023 14:48:34 +0100 Subject: [PATCH] Windows: use full terminal, re-enable sleep --- main.c | 2 -- src/draw.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 62ff53c..1410a7a 100644 --- a/main.c +++ b/main.c @@ -103,9 +103,7 @@ int main(int argc, char** argv) { obj_cube_rotate(cube, g_rot_speed_x/20*t, g_rot_speed_y/20*t, g_rot_speed_z/20*t); draw_cube(cube); draw_flush_screen(); -#ifndef _WIN32 nanosleep((const struct timespec[]) {{0, (int)(1.0 / g_fps * 1e9)}}, NULL); -#endif } obj_cube_free(cube); draw_end(); diff --git a/src/draw.c b/src/draw.c index a71d09b..28d6a57 100644 --- a/src/draw.c +++ b/src/draw.c @@ -143,9 +143,9 @@ static void draw__get_screen_info() { g_rows = csbi.srWindow.Bottom - csbi.srWindow.Top + 1; g_cols_over_rows = (float)g_cols/g_rows; g_min_rows = -g_rows; - g_max_rows = g_rows/2; + g_max_rows = g_rows+1; g_min_cols = -g_cols/2+1; - g_max_cols = g_cols/4; + g_max_cols = g_cols/2; //// assume a common resolution on Windows g_screen_res = 1920.0/1080.0; #endif