Fix for OSX build.

This commit is contained in:
Zed A. Shaw 2024-12-08 13:18:09 -05:00
parent c483649e20
commit 3de70f71f3
3 changed files with 15 additions and 3 deletions

View file

@ -13,6 +13,7 @@
#include <locale>
#include <codecvt>
#include <vector>
#include <algorithm>
using namespace fmt;
using namespace ftxui;
@ -208,12 +209,12 @@ class GUI {
return true;
} else if(event.type == sf::Event::KeyPressed) {
if(KB::isKeyPressed(KB::Up)) {
$start_char = std::max(WCHAR_MIN+1, $start_char - $font_grid.page_size());
$start_char = std::max(wchar_t(WCHAR_MIN+1), wchar_t($start_char - $font_grid.page_size()));
$font_grid.render($start_char, false);
event_happened = true;
$renderer.clear_cache();
} else if(KB::isKeyPressed(KB::Down)) {
$start_char = std::min(WCHAR_MAX, $start_char + $font_grid.page_size());
$start_char = std::min(wchar_t(WCHAR_MAX), wchar_t($start_char + $font_grid.page_size()));
$font_grid.render($start_char, false);
$renderer.clear_cache();
} else if(KB::isKeyPressed(KB::Equal)) {