Minor fixes to make initializing the terminal more consistent and to remove a magic number for wall limits.
This commit is contained in:
parent
2d5490131d
commit
ae43dad499
12 changed files with 47 additions and 42 deletions
15
render.cpp
15
render.cpp
|
@ -6,6 +6,12 @@
|
|||
#include "map.hpp"
|
||||
#include <iostream>
|
||||
#include "color.hpp"
|
||||
#if defined(_WIN64) || defined(_WIN32)
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
|
||||
using namespace fmt;
|
||||
|
||||
|
@ -220,3 +226,12 @@ void SFMLRender::draw(Panel &panel, float x_offset, float y_offset) {
|
|||
render_text(panelout, panel.default_fg, panel.default_bg, panel.x + x_offset, panel.y + y_offset);
|
||||
}
|
||||
}
|
||||
|
||||
void SFMLRender::init_terminal() {
|
||||
#if defined(_WIN64) || defined(_WIN32)
|
||||
_setmode(_fileno(stdout), _O_U16TEXT);
|
||||
#endif
|
||||
|
||||
// the parser only handles full color so force it
|
||||
ftxui::Terminal::SetColorSupport(ftxui::Terminal::Color::TrueColor);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue