mirror of
https://git.shylie.info/shylie/terml.git
synced 2024-12-22 22:50:05 +00:00
Remove new_width and new_height parameters from resize callback. Use terml_get_width() and terml_get_height() instead.
This commit is contained in:
parent
97ff848762
commit
d6db7301f0
@ -11,9 +11,7 @@ typedef int (*terml_quit_callback) ();
|
|||||||
typedef void (*terml_key_callback) (char code);
|
typedef void (*terml_key_callback) (char code);
|
||||||
typedef void (*terml_resize_callback)(
|
typedef void (*terml_resize_callback)(
|
||||||
unsigned int previous_width,
|
unsigned int previous_width,
|
||||||
unsigned int previous_height,
|
unsigned int previous_height
|
||||||
unsigned int new_width,
|
|
||||||
unsigned int new_height
|
|
||||||
);
|
);
|
||||||
|
|
||||||
int terml_init();
|
int terml_init();
|
||||||
|
@ -214,8 +214,8 @@ void terml::setup_buffer()
|
|||||||
|
|
||||||
stdin_buffer[STDIN_BUFFER_SIZE] = '\0';
|
stdin_buffer[STDIN_BUFFER_SIZE] = '\0';
|
||||||
|
|
||||||
unsigned int new_width = width;
|
const unsigned int new_width = width;
|
||||||
unsigned int new_height = height;
|
const unsigned int new_height = height;
|
||||||
const int scanned = sscanf(stdin_buffer, CURSOR_POSITION_FORMAT(), &new_height, &new_width);
|
const int scanned = sscanf(stdin_buffer, CURSOR_POSITION_FORMAT(), &new_height, &new_width);
|
||||||
if (scanned != 2)
|
if (scanned != 2)
|
||||||
{
|
{
|
||||||
@ -244,7 +244,7 @@ void terml::setup_buffer()
|
|||||||
|
|
||||||
if (resize)
|
if (resize)
|
||||||
{
|
{
|
||||||
resize(old_width, old_height, new_width, new_height);
|
resize(old_width, old_height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user