Skip to content

Commit 1829366

Browse files
committed
update to 1.5.5
1 parent 354d27f commit 1829366

3 files changed

Lines changed: 38 additions & 35 deletions

File tree

KBotExt/GameTab.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ class GameTab
16161616
}
16171617
else if (website == "Porofessor.gg")
16181618
{
1619-
url = L"https://porofessor.gg/pregame/" + region + L"/" + summNames;
1619+
url = L"https://porofessor.gg/pregame/" + region + L"/" + summNames + L"/soloqueue/season";
16201620
}
16211621
Utils::OpenUrl(url.c_str(), nullptr, SW_SHOW);
16221622
return Utils::WstringToString(url);

KBotExt/Misc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class Misc
2121
{
2222
public:
23-
static inline std::string programVersion = "1.5.4";
23+
static inline std::string programVersion = "1.5.5";
2424
static inline std::string latestVersion;
2525

2626
static bool LaunchClient(const std::string& args)

KBotExt/SettingsTab.h

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -86,51 +86,54 @@ class SettingsTab
8686

8787
if (ImGui::Checkbox("Register debugger IFEO", &S.debugger))
8888
{
89-
HKEY hkResult;
90-
if (const LSTATUS regCreate = RegCreateKeyExA(HKEY_LOCAL_MACHINE,
91-
R"(Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\LeagueClientUx.exe)",
92-
0, nullptr, 0, KEY_SET_VALUE | KEY_QUERY_VALUE | KEY_CREATE_SUB_KEY, nullptr, &hkResult,
93-
nullptr); regCreate == ERROR_SUCCESS)
89+
if (MessageBoxA(nullptr, "Are you sure?", "Debugger IFEO", MB_OKCANCEL) == IDOK)
9490
{
95-
char* buffer[MAX_PATH];
96-
DWORD bufferLen = sizeof(buffer);
91+
HKEY hkResult;
92+
if (const LSTATUS regCreate = RegCreateKeyExA(HKEY_LOCAL_MACHINE,
93+
R"(Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\LeagueClientUx.exe)",
94+
0, nullptr, 0, KEY_SET_VALUE | KEY_QUERY_VALUE | KEY_CREATE_SUB_KEY, nullptr, &hkResult,
95+
nullptr); regCreate == ERROR_SUCCESS)
96+
{
97+
char* buffer[MAX_PATH];
98+
DWORD bufferLen = sizeof(buffer);
9799

98-
char filePath[MAX_PATH + 1];
99-
static HMODULE kernel32 = GetModuleHandleA("kernel32");
100-
static auto pGetModuleFileNameA = (decltype(&GetModuleFileNameA))GetProcAddress(kernel32, "GetModuleFileNameA");
101-
pGetModuleFileNameA(nullptr, filePath, MAX_PATH);
102-
const auto len = static_cast<DWORD>(strlen(filePath) + 1); // bugprone-misplaced-widening-cast?
100+
char filePath[MAX_PATH + 1];
101+
static HMODULE kernel32 = GetModuleHandleA("kernel32");
102+
static auto pGetModuleFileNameA = (decltype(&GetModuleFileNameA))GetProcAddress(kernel32, "GetModuleFileNameA");
103+
pGetModuleFileNameA(nullptr, filePath, MAX_PATH);
104+
const auto len = static_cast<DWORD>(strlen(filePath) + 1); // bugprone-misplaced-widening-cast?
103105

104-
if (const LSTATUS regQuery = RegQueryValueExA(hkResult, "debugger", nullptr, nullptr, reinterpret_cast<LPBYTE>(buffer),
105-
&bufferLen); regQuery == ERROR_SUCCESS || regQuery == ERROR_FILE_NOT_FOUND)
106-
{
107-
if (S.debugger)
106+
if (const LSTATUS regQuery = RegQueryValueExA(hkResult, "debugger", nullptr, nullptr, reinterpret_cast<LPBYTE>(buffer),
107+
&bufferLen); regQuery == ERROR_SUCCESS || regQuery == ERROR_FILE_NOT_FOUND)
108108
{
109-
auto messageBoxStatus = IDYES;
110-
if (S.autoRename || S.noAdmin)
111-
messageBoxStatus = MessageBoxA(nullptr, "Having \"Auto-rename\" or \"Launch client without admin\" "
112-
"enabled with \"debugger IFEO\" will prevent League client from starting\n\n"
113-
"Do you wish to continue?", "Warning", MB_YESNO | MB_SETFOREGROUND);
114-
115-
if (messageBoxStatus == IDYES)
109+
if (S.debugger)
116110
{
117-
if (RegSetValueExA(hkResult, "debugger", 0, REG_SZ, reinterpret_cast<const BYTE*>(filePath), len) == ERROR_SUCCESS)
111+
auto messageBoxStatus = IDYES;
112+
if (S.autoRename || S.noAdmin)
113+
messageBoxStatus = MessageBoxA(nullptr, "Having \"Auto-rename\" or \"Launch client without admin\" "
114+
"enabled with \"debugger IFEO\" will prevent League client from starting\n\n"
115+
"Do you wish to continue?", "Warning", MB_YESNO | MB_SETFOREGROUND);
116+
117+
if (messageBoxStatus == IDYES)
118+
{
119+
if (RegSetValueExA(hkResult, "debugger", 0, REG_SZ, reinterpret_cast<const BYTE*>(filePath), len) == ERROR_SUCCESS)
120+
{
121+
S.currentDebugger = filePath;
122+
}
123+
}
124+
else
118125
{
119-
S.currentDebugger = filePath;
126+
S.debugger = false;
120127
}
121128
}
122-
else
129+
else if (regQuery == ERROR_SUCCESS)
123130
{
124-
S.debugger = false;
131+
RegDeleteValueA(hkResult, "debugger");
132+
S.currentDebugger = "Nothing";
125133
}
126134
}
127-
else if (regQuery == ERROR_SUCCESS)
128-
{
129-
RegDeleteValueA(hkResult, "debugger");
130-
S.currentDebugger = "Nothing";
131-
}
135+
RegCloseKey(hkResult);
132136
}
133-
RegCloseKey(hkResult);
134137
}
135138
}
136139
ImGui::SameLine();

0 commit comments

Comments
 (0)