Skip to content

Commit

Permalink
Windows: use full terminal, re-enable sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
leonmavr committed Feb 23, 2023
1 parent d789376 commit a33df35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a33df35

Please sign in to comment.