Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions GUI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ extern const char* ATTACH_SAVED_ONLY;
extern const char* SHOW_SYSTEM_PROCESSES;
extern const char* DEFAULT_CODEPAGE;
extern const char* FLUSH_DELAY;
extern const char* FLUSH_DELAY_SPACING;
extern const char* MAX_BUFFER_SIZE;
extern const char* MAX_HISTORY_SIZE;
extern const char* CONFIG_JP_LOCALE;
Expand Down Expand Up @@ -492,6 +493,7 @@ namespace
{ autoAttach, AUTO_ATTACH },
{ autoAttachSavedOnly, ATTACH_SAVED_ONLY },
{ showSystemProcesses, SHOW_SYSTEM_PROCESSES },
{ TextThread::flushDelaySpacing, FLUSH_DELAY_SPACING },
})
{
auto checkBox = new QCheckBox(&dialog);
Expand Down Expand Up @@ -663,6 +665,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
autoAttach = settings.value(AUTO_ATTACH, autoAttach).toBool();
autoAttachSavedOnly = settings.value(ATTACH_SAVED_ONLY, autoAttachSavedOnly).toBool();
showSystemProcesses = settings.value(SHOW_SYSTEM_PROCESSES, showSystemProcesses).toBool();
TextThread::flushDelaySpacing = settings.value(FLUSH_DELAY_SPACING, TextThread::flushDelaySpacing).toBool();
TextThread::flushDelay = settings.value(FLUSH_DELAY, TextThread::flushDelay).toInt();
TextThread::maxBufferSize = settings.value(MAX_BUFFER_SIZE, TextThread::maxBufferSize).toInt();
TextThread::maxHistorySize = settings.value(MAX_HISTORY_SIZE, TextThread::maxHistorySize).toInt();
Expand Down
1 change: 1 addition & 0 deletions host/textthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ void TextThread::Push(BYTE* data, int length)
}
}

if (flushDelaySpacing && !buffer.empty() && (hp.type & (USING_STRING))) buffer += L"\x200b "; // insert \x200b to recognize it in case it has to be found with a filter
if (hp.type & HEX_DUMP) for (int i = 0; i < length; i += sizeof(short)) buffer.append(FormatString(L"%04hX ", *(short*)(data + i)));
else if (hp.type & USING_UNICODE) buffer.append((wchar_t*)data, length / sizeof(wchar_t));
else if (auto converted = StringToWideString(std::string((char*)data, length), hp.codepage ? hp.codepage : Host::defaultCodepage)) buffer.append(converted.value());
Expand Down
1 change: 1 addition & 0 deletions host/textthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class TextThread
inline static OutputCallback Output;

inline static bool filterRepetition = false;
inline static bool flushDelaySpacing = false;
inline static int flushDelay = 500; // flush every 500ms by default
inline static int maxBufferSize = 3000;
inline static int maxHistorySize = 10'000'000;
Expand Down
2 changes: 2 additions & 0 deletions text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const char* ATTACH_SAVED_ONLY = u8"Auto attach (saved only)";
const char* SHOW_SYSTEM_PROCESSES = u8"Show system processes";
const char* DEFAULT_CODEPAGE = u8"Default codepage";
const char* FLUSH_DELAY = u8"Flush delay";
const char* FLUSH_DELAY_SPACING = u8"Flush delay string spacing";
const char* MAX_BUFFER_SIZE = u8"Max buffer size";
const char* MAX_HISTORY_SIZE = u8"Max history size";
const char* CONFIG_JP_LOCALE = u8"Launch with JP locale";
Expand Down Expand Up @@ -820,6 +821,7 @@ Per rimuovere un estenzione, selezionala e premi rimuovi)";
SHOW_SYSTEM_PROCESSES = u8"Mostra i processi di sistema";
DEFAULT_CODEPAGE = u8"Codepage di base";
FLUSH_DELAY = u8"Ritardo flush";
FLUSH_DELAY_SPACING = u8"Spazia ritardo flush string";
MAX_BUFFER_SIZE = u8"Massima dimensione buffer";
MAX_HISTORY_SIZE = u8"Massima dimensione cronologia";
CONFIG_JP_LOCALE = u8"Avvia con il JP locale";
Expand Down