mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-21 18:38:20 -05:00
First commit
This commit is contained in:
@@ -994,10 +994,7 @@ void OpenSpaceEngine::loadFonts() {
|
||||
}
|
||||
|
||||
try {
|
||||
bool initSuccess = ghoul::fontrendering::FontRenderer::initialize();
|
||||
if (!initSuccess) {
|
||||
LERROR("Error initializing default font renderer");
|
||||
}
|
||||
ghoul::fontrendering::FontRenderer::initialize();
|
||||
}
|
||||
catch (const ghoul::RuntimeError& err) {
|
||||
LERRORC(err.component, err.message);
|
||||
|
||||
@@ -687,7 +687,7 @@ void LuaConsole::render() {
|
||||
|
||||
// Since the overflow is positive, at least one character needs to be removed.
|
||||
const size_t nCharsOverflow = static_cast<size_t>(std::min(
|
||||
std::max(1.f, overflow / _font->glyph('m')->width()),
|
||||
std::max(1.f, overflow / _font->glyph('m')->width),
|
||||
static_cast<float>(currentCommand.size())
|
||||
));
|
||||
|
||||
|
||||
@@ -48,15 +48,15 @@ void ScreenLog::removeExpiredEntries() {
|
||||
_entries.erase(rit, _entries.end() );
|
||||
}
|
||||
|
||||
void ScreenLog::log(LogLevel level, const string& category, const string& message) {
|
||||
void ScreenLog::log(LogLevel level, std::string_view category, std::string_view message) {
|
||||
std::lock_guard<std::mutex> guard(_mutex);
|
||||
if (level >= _logLevel) {
|
||||
_entries.push_back({
|
||||
level,
|
||||
std::chrono::steady_clock::now(),
|
||||
Log::timeString(),
|
||||
category,
|
||||
message
|
||||
std::string(category),
|
||||
std::string(message)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user