#include "term.h" #include "../includes/tart.h" #ifdef _WIN64 #include struct tart_vec2 term_current_size() { struct tart_vec2 ret; CONSOLE_SCREEN_BUFFER_INFO csbi; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); unsigned int rows = (csbi.srWindow.Right - csbi.srWindow.Left + 1); unsigned int cols = (csbi.srWindow.Bottom - csbi.srWindow.Top + 1); unsigned short max_short = 0XFFFF; if(rows < max_short && cols < max_short) { ret = (struct tart_vec2){(unsigned short) rows ,(unsigned short) cols}; } return ret; } #endif struct tart_vec2 term_current_size() { struct tart_vec2 ret = {50,50}; return ret; }