mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-23 08:54:12 +08:00
small fixes
This commit is contained in:
parent
f6cf3c9c62
commit
22e0d38a1e
@ -190,7 +190,11 @@ void MainWindow::ThreadAdded(TextThread& thread)
|
|||||||
{
|
{
|
||||||
std::wstring threadCode = HookCode::Generate(thread.hp, thread.tp.processId);
|
std::wstring threadCode = HookCode::Generate(thread.hp, thread.tp.processId);
|
||||||
bool savedMatch = savedThreadCtx == thread.tp.ctx && savedThreadCtx2 == thread.tp.ctx2 && savedThreadCode == threadCode;
|
bool savedMatch = savedThreadCtx == thread.tp.ctx && savedThreadCtx2 == thread.tp.ctx2 && savedThreadCode == threadCode;
|
||||||
if (savedMatch) savedThreadCtx = savedThreadCtx2 = savedThreadCode[0] = 0;
|
if (savedMatch)
|
||||||
|
{
|
||||||
|
savedThreadCtx = savedThreadCtx2 = savedThreadCode[0] = 0;
|
||||||
|
current = &thread;
|
||||||
|
}
|
||||||
QMetaObject::invokeMethod(this, [this, savedMatch, ttString = TextThreadString(thread) + S(FormatString(L" (%s)", threadCode))]
|
QMetaObject::invokeMethod(this, [this, savedMatch, ttString = TextThreadString(thread) + S(FormatString(L" (%s)", threadCode))]
|
||||||
{
|
{
|
||||||
ui->ttCombo->addItem(ttString);
|
ui->ttCombo->addItem(ttString);
|
||||||
@ -212,7 +216,7 @@ bool MainWindow::SentenceReceived(TextThread& thread, std::wstring& sentence)
|
|||||||
{
|
{
|
||||||
if (!DispatchSentenceToExtensions(sentence, GetSentenceInfo(thread).data())) return false;
|
if (!DispatchSentenceToExtensions(sentence, GetSentenceInfo(thread).data())) return false;
|
||||||
sentence += L'\n';
|
sentence += L'\n';
|
||||||
if (current == &thread) QMetaObject::invokeMethod(this, [this, sentence = S(sentence)]() mutable
|
if (&thread == current) QMetaObject::invokeMethod(this, [this, sentence = S(sentence)]() mutable
|
||||||
{
|
{
|
||||||
sanitize(sentence);
|
sanitize(sentence);
|
||||||
auto scrollbar = ui->textOutput->verticalScrollBar();
|
auto scrollbar = ui->textOutput->verticalScrollBar();
|
||||||
|
@ -11,7 +11,7 @@ struct InfoForExtension
|
|||||||
struct SentenceInfo
|
struct SentenceInfo
|
||||||
{
|
{
|
||||||
const InfoForExtension* infoArray;
|
const InfoForExtension* infoArray;
|
||||||
int64_t operator[](std::string propertyName)
|
int64_t operator[](std::string_view propertyName)
|
||||||
{
|
{
|
||||||
for (auto info = infoArray; info->name; ++info) // nullptr name marks end of info array
|
for (auto info = infoArray; info->name; ++info) // nullptr name marks end of info array
|
||||||
if (propertyName == info->name) return info->value;
|
if (propertyName == info->name) return info->value;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// 8/23/2013 jichi
|
// 8/23/2013 jichi
|
||||||
// Branch: ITH/common.h, rev 128
|
// Branch: ITH/common.h, rev 128
|
||||||
|
|
||||||
enum { STRING = 12, MESSAGE_SIZE = 500, PIPE_BUFFER_SIZE = 10000, SHIFT_JIS = 932, MAX_MODULE_SIZE = 120, PATTERN_SIZE = 30, HOOK_NAME_SIZE = 60, FIXED_SPLIT_VALUE = 0x10001 };
|
enum { STRING = 12, MESSAGE_SIZE = 500, PIPE_BUFFER_SIZE = 50000, SHIFT_JIS = 932, MAX_MODULE_SIZE = 120, PATTERN_SIZE = 30, HOOK_NAME_SIZE = 60, FIXED_SPLIT_VALUE = 0x10001 };
|
||||||
enum WildcardByte { XX = 0x11 };
|
enum WildcardByte { XX = 0x11 };
|
||||||
|
|
||||||
enum HostCommandType { HOST_COMMAND_NEW_HOOK, HOST_COMMAND_REMOVE_HOOK, HOST_COMMAND_FIND_HOOK, HOST_COMMAND_MODIFY_HOOK, HOST_COMMAND_HIJACK_PROCESS, HOST_COMMAND_DETACH };
|
enum HostCommandType { HOST_COMMAND_NEW_HOOK, HOST_COMMAND_REMOVE_HOOK, HOST_COMMAND_FIND_HOOK, HOST_COMMAND_MODIFY_HOOK, HOST_COMMAND_HIJACK_PROCESS, HOST_COMMAND_DETACH };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user