Flush Delay String Spacing option
This commit is contained in:
parent
233e75225c
commit
81a63dba1c
@ -62,6 +62,7 @@ extern const char* ATTACH_SAVED_ONLY;
|
|||||||
extern const char* SHOW_SYSTEM_PROCESSES;
|
extern const char* SHOW_SYSTEM_PROCESSES;
|
||||||
extern const char* DEFAULT_CODEPAGE;
|
extern const char* DEFAULT_CODEPAGE;
|
||||||
extern const char* FLUSH_DELAY;
|
extern const char* FLUSH_DELAY;
|
||||||
|
extern const char* FLUSH_DELAY_SPACING;
|
||||||
extern const char* MAX_BUFFER_SIZE;
|
extern const char* MAX_BUFFER_SIZE;
|
||||||
extern const char* MAX_HISTORY_SIZE;
|
extern const char* MAX_HISTORY_SIZE;
|
||||||
extern const char* CONFIG_JP_LOCALE;
|
extern const char* CONFIG_JP_LOCALE;
|
||||||
@ -492,6 +493,7 @@ namespace
|
|||||||
{ autoAttach, AUTO_ATTACH },
|
{ autoAttach, AUTO_ATTACH },
|
||||||
{ autoAttachSavedOnly, ATTACH_SAVED_ONLY },
|
{ autoAttachSavedOnly, ATTACH_SAVED_ONLY },
|
||||||
{ showSystemProcesses, SHOW_SYSTEM_PROCESSES },
|
{ showSystemProcesses, SHOW_SYSTEM_PROCESSES },
|
||||||
|
{ TextThread::flushDelaySpacing, FLUSH_DELAY_SPACING },
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
auto checkBox = new QCheckBox(&dialog);
|
auto checkBox = new QCheckBox(&dialog);
|
||||||
@ -663,6 +665,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
|||||||
autoAttach = settings.value(AUTO_ATTACH, autoAttach).toBool();
|
autoAttach = settings.value(AUTO_ATTACH, autoAttach).toBool();
|
||||||
autoAttachSavedOnly = settings.value(ATTACH_SAVED_ONLY, autoAttachSavedOnly).toBool();
|
autoAttachSavedOnly = settings.value(ATTACH_SAVED_ONLY, autoAttachSavedOnly).toBool();
|
||||||
showSystemProcesses = settings.value(SHOW_SYSTEM_PROCESSES, showSystemProcesses).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::flushDelay = settings.value(FLUSH_DELAY, TextThread::flushDelay).toInt();
|
||||||
TextThread::maxBufferSize = settings.value(MAX_BUFFER_SIZE, TextThread::maxBufferSize).toInt();
|
TextThread::maxBufferSize = settings.value(MAX_BUFFER_SIZE, TextThread::maxBufferSize).toInt();
|
||||||
TextThread::maxHistorySize = settings.value(MAX_HISTORY_SIZE, TextThread::maxHistorySize).toInt();
|
TextThread::maxHistorySize = settings.value(MAX_HISTORY_SIZE, TextThread::maxHistorySize).toInt();
|
||||||
|
@ -58,6 +58,7 @@ void TextThread::Push(BYTE* data, int length)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (flushDelaySpacing && !buffer.empty() && (hp.type & (USING_STRING))) buffer += L" ";
|
||||||
if (hp.type & HEX_DUMP) for (int i = 0; i < length; i += sizeof(short)) buffer.append(FormatString(L"%04hX ", *(short*)(data + i)));
|
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 (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());
|
else if (auto converted = StringToWideString(std::string((char*)data, length), hp.codepage ? hp.codepage : Host::defaultCodepage)) buffer.append(converted.value());
|
||||||
|
@ -9,6 +9,7 @@ public:
|
|||||||
inline static OutputCallback Output;
|
inline static OutputCallback Output;
|
||||||
|
|
||||||
inline static bool filterRepetition = false;
|
inline static bool filterRepetition = false;
|
||||||
|
inline static bool flushDelaySpacing = false;
|
||||||
inline static int flushDelay = 500; // flush every 500ms by default
|
inline static int flushDelay = 500; // flush every 500ms by default
|
||||||
inline static int maxBufferSize = 3000;
|
inline static int maxBufferSize = 3000;
|
||||||
inline static int maxHistorySize = 10'000'000;
|
inline static int maxHistorySize = 10'000'000;
|
||||||
|
2
text.cpp
2
text.cpp
@ -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* SHOW_SYSTEM_PROCESSES = u8"Show system processes";
|
||||||
const char* DEFAULT_CODEPAGE = u8"Default codepage";
|
const char* DEFAULT_CODEPAGE = u8"Default codepage";
|
||||||
const char* FLUSH_DELAY = u8"Flush delay";
|
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_BUFFER_SIZE = u8"Max buffer size";
|
||||||
const char* MAX_HISTORY_SIZE = u8"Max history size";
|
const char* MAX_HISTORY_SIZE = u8"Max history size";
|
||||||
const char* CONFIG_JP_LOCALE = u8"Launch with JP locale";
|
const char* CONFIG_JP_LOCALE = u8"Launch with JP locale";
|
||||||
@ -820,6 +821,7 @@ Per rimuovere un estenzione, selezionala e premi rimuovi)";
|
|||||||
SHOW_SYSTEM_PROCESSES = u8"Mostra i processi di sistema";
|
SHOW_SYSTEM_PROCESSES = u8"Mostra i processi di sistema";
|
||||||
DEFAULT_CODEPAGE = u8"Codepage di base";
|
DEFAULT_CODEPAGE = u8"Codepage di base";
|
||||||
FLUSH_DELAY = u8"Ritardo flush";
|
FLUSH_DELAY = u8"Ritardo flush";
|
||||||
|
FLUSH_DELAY_SPACING = u8"Spazia ritardo flush string";
|
||||||
MAX_BUFFER_SIZE = u8"Massima dimensione buffer";
|
MAX_BUFFER_SIZE = u8"Massima dimensione buffer";
|
||||||
MAX_HISTORY_SIZE = u8"Massima dimensione cronologia";
|
MAX_HISTORY_SIZE = u8"Massima dimensione cronologia";
|
||||||
CONFIG_JP_LOCALE = u8"Avvia con il JP locale";
|
CONFIG_JP_LOCALE = u8"Avvia con il JP locale";
|
||||||
|
Loading…
Reference in New Issue
Block a user