Remove new_width and new_height parameters from resize callback. Use terml_get_width() and terml_get_height() instead.

This commit is contained in:
Shylie
2024-03-07 11:47:41 -05:00
parent 97ff848762
commit d6db7301f0
2 changed files with 4 additions and 6 deletions

View File

@@ -214,8 +214,8 @@ void terml::setup_buffer()
stdin_buffer[STDIN_BUFFER_SIZE] = '\0';
unsigned int new_width = width;
unsigned int new_height = height;
const unsigned int new_width = width;
const unsigned int new_height = height;
const int scanned = sscanf(stdin_buffer, CURSOR_POSITION_FORMAT(), &new_height, &new_width);
if (scanned != 2)
{
@@ -244,7 +244,7 @@ void terml::setup_buffer()
if (resize)
{
resize(old_width, old_height, new_width, new_height);
resize(old_width, old_height);
}
}
}