mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-17 16:38:09 +08:00
Add support for emscripten screen resize. (#463)
This resolves: https://github.com/ArthurSonzogni/FTXUI/issues/432
This commit is contained in:
@@ -135,6 +135,17 @@ void EventListener(std::atomic<bool>* quit, Sender<Task> out) {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
void ftxui_on_resize(int columns, int rows) {
|
||||
Terminal::SetFallbackSize({
|
||||
columns,
|
||||
rows,
|
||||
});
|
||||
std::raise(SIGWINCH);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
#include <sys/time.h> // for timeval
|
||||
|
||||
|
Reference in New Issue
Block a user