Fix for OSX build.

main
Zed A. Shaw 3 days ago
parent c483649e20
commit 3de70f71f3
  1. 11
      scripts/coverage_reset.sh
  2. 2
      scripts/reset_build.sh
  3. 5
      tools/designer.cpp

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e
mv -f ./subprojects/packagecache .
rm -rf subprojects builddir
mkdir subprojects
mv packagecache ./subprojects/
mkdir builddir
cp wraps/*.wrap subprojects/
# on OSX you can't do this with static
meson setup -Db_coverage=true builddir

@ -8,4 +8,4 @@ mv packagecache ./subprojects/
mkdir builddir
cp wraps/*.wrap subprojects/
# on OSX you can't do this with static
meson setup -Db_coverage=true builddir
meson setup builddir

@ -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)) {

Loading…
Cancel
Save