diff --git a/include/terml.h b/include/terml.h index 4f74252..2480b28 100644 --- a/include/terml.h +++ b/include/terml.h @@ -11,9 +11,7 @@ typedef int (*terml_quit_callback) (); typedef void (*terml_key_callback) (char code); typedef void (*terml_resize_callback)( unsigned int previous_width, - unsigned int previous_height, - unsigned int new_width, - unsigned int new_height + unsigned int previous_height ); int terml_init(); diff --git a/source/terml.cpp b/source/terml.cpp index a6cfcec..8761ea3 100644 --- a/source/terml.cpp +++ b/source/terml.cpp @@ -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); } } }