From df5b830d1757a66aa162f8081e99d42c9bd50488 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sat, 26 Aug 2023 07:36:48 -0400 Subject: [PATCH] revert the dumbest change I ever made --- GUI/mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index d95af3c..998702e 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -88,6 +88,8 @@ namespace TextThread* current = nullptr; MainWindow* This = nullptr; + void FindHooks(); + QString TextThreadString(TextThread& thread) { return QString("%1:%2:%3:%4:%5: %6").arg( @@ -274,7 +276,8 @@ namespace void AddHook(QString hook) { if (QString hookCode = QInputDialog::getText(This, ADD_HOOK, CODE_INFODUMP, QLineEdit::Normal, hook, &ok, Qt::WindowCloseButtonHint); ok) - if (auto hp = HookCode::Parse(S(hookCode))) try { Host::InsertHook(selectedProcessId, hp.value()); } catch (std::out_of_range) {} + if (hookCode.startsWith("S") || hookCode.startsWith("/S")) FindHooks(); // backwards compatibility for old hook search UX + else if (auto hp = HookCode::Parse(S(hookCode))) try { Host::InsertHook(selectedProcessId, hp.value()); } catch (std::out_of_range) {} else Host::AddConsoleOutput(INVALID_CODE); }