mirror of
https://github.com/stenzek/duckstation.git
synced 2025-07-24 11:00:23 +00:00
Qt: Fix timestamps in log window if file timestamps on
This commit is contained in:
parent
1289e045b9
commit
3f2b6995bc
@ -149,9 +149,9 @@ float Log::GetCurrentMessageTime()
|
||||
return static_cast<float>(Timer::ConvertValueToSeconds(Timer::GetCurrentValue() - s_state.start_timestamp));
|
||||
}
|
||||
|
||||
bool Log::AreTimestampsEnabled()
|
||||
bool Log::AreConsoleOutputTimestampsEnabled()
|
||||
{
|
||||
return s_state.console_output_timestamps || s_state.file_output_timestamp;
|
||||
return s_state.console_output_timestamps;
|
||||
}
|
||||
|
||||
bool Log::IsConsoleOutputCurrentlyAvailable()
|
||||
|
@ -98,7 +98,7 @@ const std::array<const char*, static_cast<size_t>(Channel::MaxCount)>& GetChanne
|
||||
|
||||
// returns the time in seconds since the start of the process
|
||||
float GetCurrentMessageTime();
|
||||
bool AreTimestampsEnabled();
|
||||
bool AreConsoleOutputTimestampsEnabled();
|
||||
|
||||
// adds a standard console output
|
||||
bool IsConsoleOutputCurrentlyAvailable();
|
||||
|
@ -411,7 +411,7 @@ void LogWindow::realAppendMessage(const QLatin1StringView& channel, quint32 cat,
|
||||
const size_t dark = static_cast<size_t>(m_is_dark_theme);
|
||||
|
||||
temp_cursor.beginEditBlock();
|
||||
if (Log::AreTimestampsEnabled())
|
||||
if (Log::AreConsoleOutputTimestampsEnabled())
|
||||
{
|
||||
const float message_time = Log::GetCurrentMessageTime();
|
||||
const QString qtimestamp = QStringLiteral("[%1] ").arg(message_time, 10, 'f', 4);
|
||||
|
Loading…
x
Reference in New Issue
Block a user