Skip to content

Commit b9dc43b

Browse files
committed
Merge branch 'master' into new/custom_upgrades
2 parents e61482d + 954f741 commit b9dc43b

File tree

1,127 files changed

+17780
-17260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,127 files changed

+17780
-17260
lines changed

.git-blame-ignore-revs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,3 +259,15 @@ e7c3619a5d5e0b6bf352befde6ff33c5921032b2
259259
# Date: Wed Jan 7 16:42:45 2026 -0500
260260
#
261261
# codemod: disable clang-format for `__asm` directives (#4611)
262+
263+
7cd17bc67c5c2d631b6aaac1ac48521b6922045e
264+
# Author: qaisjp <[email protected]>
265+
# Date: Mon Jan 19 01:50:18 2026 -0500
266+
#
267+
# fastmod '} // namespace [a-zA-Z0-9]+$' '}' Client/ Server/ Shared/
268+
269+
e75ba93362c6ae99d30a95d3f20a1e04ba46a22e
270+
# Author: qaisjp <[email protected]>
271+
# Date: Mon Jan 19 02:08:21 2026 -0500
272+
#
273+
# Run utils/clang-format.ps1

.github/workflows/sync-master-to-maetro.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.

Client/ceflauncher_DLL/CCefApp.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <cef3/cef/include/cef_app.h>
1111
#include <string>
1212
#include "V8Helpers.h"
13-
#include "CCefAppAuth.h" // IPC message append helpers
13+
#include "CCefAppAuth.h" // IPC message append helpers
1414
using V8Helpers::CV8Handler;
1515

1616
class CCefApp : public CefApp, public CefRenderProcessHandler
@@ -41,7 +41,12 @@ class CCefApp : public CefApp, public CefRenderProcessHandler
4141
if (!node)
4242
return;
4343

44-
if (node->GetType() == CefDOMNode::Type::DOM_NODE_TYPE_ELEMENT && node->GetFormControlElementType() != CefDOMNode::FormControlType::DOM_FORM_CONTROL_TYPE_UNSUPPORTED)
44+
#ifdef MTA_MAETRO
45+
if (node->GetType() == CefDOMNode::Type::DOM_NODE_TYPE_ELEMENT && !node->GetFormControlElementType().empty())
46+
#else
47+
if (node->GetType() == CefDOMNode::Type::DOM_NODE_TYPE_ELEMENT &&
48+
node->GetFormControlElementType() != CefDOMNode::FormControlType::DOM_FORM_CONTROL_TYPE_UNSUPPORTED)
49+
#endif
4550
{
4651
auto message = CefProcessMessage::Create("InputFocus");
4752
message->GetArgumentList()->SetBool(0, true);
@@ -77,7 +82,7 @@ class CCefApp : public CefApp, public CefRenderProcessHandler
7782
return;
7883

7984
CefRefPtr<CefProcessMessage> message = V8Helpers::SerialiseV8Arguments("TriggerLuaEvent", arguments);
80-
if (!CefAppAuth::AppendAuthCodeToMessage(message)) [[unlikely]] // AUTH: race condition check
85+
if (!CefAppAuth::AppendAuthCodeToMessage(message)) [[unlikely]] // AUTH: race condition check
8186
return;
8287
frame->GetBrowser()->GetMainFrame()->SendProcessMessage(PID_BROWSER, message);
8388
}

Client/ceflauncher_DLL/CCefAppAuth.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ namespace CefAppAuth
2929
return false;
3030

3131
auto& authCode = AuthCodeStorage();
32-
32+
3333
// Block messages until initialized (prevents race condition)
3434
if (authCode.empty()) [[unlikely]]
3535
return false;
36-
36+
3737
CefRefPtr<CefListValue> args = message->GetArgumentList();
38-
const auto size = args->GetSize();
38+
const auto size = args->GetSize();
3939
args->SetSize(size + 1);
4040
args->SetString(size, authCode.c_str());
4141
return true;

Client/ceflauncher_DLL/Main.cpp

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@
3030
#include <SharedUtil.h>
3131

3232
#ifdef CEF_ENABLE_SANDBOX
33-
#include <cef3/cef/include/cef_sandbox_win.h>
34-
#pragma comment(lib, "cef_sandbox.lib")
33+
#include <cef3/cef/include/cef_sandbox_win.h>
34+
#pragma comment(lib, "cef_sandbox.lib")
3535
#endif
3636

3737
// Return codes
38-
inline constexpr int CEF_INIT_SUCCESS = 0;
39-
inline constexpr int CEF_INIT_ERROR_NO_BASE_DIR = -1;
40-
inline constexpr int CEF_INIT_ERROR_DLL_LOAD_FAILED = -2;
38+
inline constexpr int CEF_INIT_SUCCESS = 0;
39+
inline constexpr int CEF_INIT_ERROR_NO_BASE_DIR = -1;
40+
inline constexpr int CEF_INIT_ERROR_DLL_LOAD_FAILED = -2;
4141

42-
inline constexpr DWORD CEF_PARENT_CHECK_INTERVAL = 1000;
43-
inline constexpr const char* CEF_DLL_NAME = "libcef.dll";
44-
inline constexpr const char* CEF_MTA_SUBDIR = "MTA";
42+
inline constexpr DWORD CEF_PARENT_CHECK_INTERVAL = 1000;
43+
inline constexpr const char* CEF_DLL_NAME = "libcef.dll";
44+
inline constexpr const char* CEF_MTA_SUBDIR = "MTA";
4545

46-
inline constexpr DWORD PARENT_CHECK_ERROR_NO_QUERY_FUNC = 1;
47-
inline constexpr DWORD PARENT_CHECK_ERROR_QUERY_FAILED = 2;
48-
inline constexpr DWORD PARENT_CHECK_ERROR_OPEN_FAILED = 3;
46+
inline constexpr DWORD PARENT_CHECK_ERROR_NO_QUERY_FUNC = 1;
47+
inline constexpr DWORD PARENT_CHECK_ERROR_QUERY_FAILED = 2;
48+
inline constexpr DWORD PARENT_CHECK_ERROR_OPEN_FAILED = 3;
4949

5050
using NtQueryInformationProcessFunc = NTSTATUS(NTAPI*)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG);
5151

5252
// Safe parent monitor thread shutdown
53-
std::atomic<bool> g_bShouldTerminateMonitor{false};
53+
std::atomic<bool> g_bShouldTerminateMonitor{false};
5454
std::atomic<HANDLE> g_hMonitorThread{nullptr};
5555

5656
namespace
@@ -60,19 +60,19 @@ namespace
6060
const auto ntdll = GetModuleHandleW(L"ntdll.dll");
6161
if (!ntdll)
6262
return nullptr;
63-
63+
6464
const auto procAddr = GetProcAddress(ntdll, "NtQueryInformationProcess");
6565
if (!procAddr)
6666
return nullptr;
67-
67+
6868
return reinterpret_cast<NtQueryInformationProcessFunc>(procAddr);
6969
}
7070

7171
[[nodiscard]] auto GetParentProcessId(NtQueryInformationProcessFunc queryFunc) noexcept -> DWORD
7272
{
7373
PROCESS_BASIC_INFORMATION info{};
74-
ULONG returnLength = 0;
75-
74+
ULONG returnLength = 0;
75+
7676
if (const auto status = queryFunc(GetCurrentProcess(), ProcessBasicInformation, &info, sizeof(info), &returnLength);
7777
!NT_SUCCESS(status) || returnLength < sizeof(PROCESS_BASIC_INFORMATION))
7878
{
@@ -87,7 +87,7 @@ namespace
8787
while (!g_bShouldTerminateMonitor.load(std::memory_order_acquire))
8888
{
8989
const DWORD result = WaitForSingleObject(parentProcess, CEF_PARENT_CHECK_INTERVAL);
90-
90+
9191
if (result == WAIT_OBJECT_0)
9292
{
9393
DWORD exitCode = 0;
@@ -104,7 +104,7 @@ namespace
104104
}
105105
}
106106
}
107-
} // namespace
107+
} // namespace
108108

109109
DWORD WINAPI CheckParentProcessAliveness(LPVOID) noexcept;
110110

@@ -120,7 +120,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, [[maybe_unused]] LPVOID l
120120
{
121121
g_bShouldTerminateMonitor.store(true, std::memory_order_release);
122122
}
123-
123+
124124
return TRUE;
125125
}
126126

@@ -132,28 +132,26 @@ extern "C" [[nodiscard]] __declspec(dllexport) auto InitCEF() noexcept -> int
132132
{
133133
const auto valueStart = pos + 11; // Skip "--kgfiv8n="
134134
const auto valueEnd = cmdLine.find_first_of(L" \t\"", valueStart);
135-
const auto authCodeW = cmdLine.substr(valueStart,
136-
valueEnd == std::wstring_view::npos ? 30 : std::min<size_t>(30, valueEnd - valueStart));
137-
135+
const auto authCodeW = cmdLine.substr(valueStart, valueEnd == std::wstring_view::npos ? 30 : std::min<size_t>(30, valueEnd - valueStart));
136+
138137
std::string authCode;
139138
authCode.reserve(30);
140-
std::transform(authCodeW.begin(), authCodeW.end(), std::back_inserter(authCode),
141-
[](const wchar_t wc) { return static_cast<char>(wc); });
142-
139+
std::transform(authCodeW.begin(), authCodeW.end(), std::back_inserter(authCode), [](const wchar_t wc) { return static_cast<char>(wc); });
140+
143141
CefAppAuth::AuthCodeStorage() = std::move(authCode);
144142
}
145143

146144
const auto baseDir = SharedUtil::GetMTAProcessBaseDir();
147145
if (baseDir.empty())
148146
return CEF_INIT_ERROR_NO_BASE_DIR;
149-
147+
150148
const auto mtaDir = SharedUtil::PathJoin(baseDir, CEF_MTA_SUBDIR);
151149
SetDllDirectoryW(SharedUtil::FromUTF8(mtaDir));
152150

153151
if (FAILED(__HrLoadAllImportsForDll(CEF_DLL_NAME)))
154152
return CEF_INIT_ERROR_DLL_LOAD_FAILED;
155153

156-
const CefMainArgs mainArgs(GetModuleHandleW(nullptr));
154+
const CefMainArgs mainArgs(GetModuleHandleW(nullptr));
157155
const CefRefPtr<CCefApp> app{new CCefApp};
158156

159157
void* sandboxInfo = nullptr;

Client/ceflauncher_DLL/V8Helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,4 @@ namespace V8Helpers
9494
CefRefPtr<CefV8Value> func = CefV8Value::CreateFunction(name, handler);
9595
object->SetValue(name, func, V8_PROPERTY_ATTRIBUTE_NONE);
9696
}
97-
} // namespace V8Helpers
97+
} // namespace V8Helpers

Client/cefweb/CAjaxResourceHandler.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ void CAjaxResourceHandler::GetResponseHeaders(CefRefPtr<CefResponse> response, i
6666
constexpr int HTTP_OK = 200;
6767
response->SetStatus(HTTP_OK);
6868
response->SetStatusText("OK");
69-
69+
7070
// Use default MIME type if none provided
7171
if (!m_strMime.empty())
7272
response->SetMimeType(m_strMime);
7373
else
7474
response->SetMimeType("application/octet-stream");
75-
75+
7676
response_length = -1;
7777
}
7878

@@ -116,10 +116,10 @@ bool CAjaxResourceHandler::ReadResponse(void* data_out, int bytes_to_read, int&
116116
const auto copyBytes = std::min(static_cast<size_t>(bytes_to_read), remainingBytes);
117117

118118
memcpy(data_out, m_strResponse.c_str() + m_DataOffset, copyBytes);
119-
119+
120120
// copyBytes is bounded by bytes_to_read (an int), so cast is always safe
121121
bytes_read = static_cast<int>(copyBytes);
122-
122+
123123
m_DataOffset += copyBytes;
124124

125125
return true;

Client/cefweb/CAjaxResourceHandler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CAjaxResourceHandler : public CefResourceHandler, public CAjaxResourceHand
2525

2626
std::vector<std::string>& GetGetData() override { return m_vecGetData; }
2727
std::vector<std::string>& GetPostData() override { return m_vecPostData; }
28-
void SetResponse(std::string data) override;
28+
void SetResponse(std::string data) override;
2929

3030
// CefResourceHandler
3131
virtual void Cancel() override;
@@ -37,7 +37,7 @@ class CAjaxResourceHandler : public CefResourceHandler, public CAjaxResourceHand
3737
DISALLOW_COPY_AND_ASSIGN(CAjaxResourceHandler);
3838

3939
private:
40-
CefRefPtr<CefCallback> m_callback;
40+
CefRefPtr<CefCallback> m_callback;
4141
std::vector<std::string> m_vecGetData;
4242
std::vector<std::string> m_vecPostData;
4343
std::string m_strResponse;

0 commit comments

Comments
 (0)