Skip to content

Commit 6d6660f

Browse files
authored
Merge branch 'master' into commandhandler-controlling
2 parents e8d3120 + 8c9f53d commit 6d6660f

File tree

449 files changed

+63284
-61121
lines changed

Some content is hidden

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

449 files changed

+63284
-61121
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252

5353
macOS:
5454
name: macOS
55-
runs-on: macOS-13
55+
runs-on: macOS-15
5656
steps:
5757
- uses: actions/checkout@v4
5858

@@ -64,7 +64,7 @@ jobs:
6464
run: brew link --overwrite mysql
6565

6666
- name: Run Build
67-
run: ./linux-build.sh --os=macosx
67+
run: ./linux-build.sh
6868

6969
linux:
7070
strategy:
@@ -78,4 +78,4 @@ jobs:
7878
- uses: actions/checkout@v4
7979

8080
- name: Run Build
81-
run: ./linux-build.sh --arch=${{ matrix.architecture }}
81+
run: /docker-entrypoint.sh --arch=${{ matrix.architecture }}

Client/cefweb/CWebCore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ void CWebCore::ProcessInputMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
502502
if ((keyEvent.type == KEYEVENT_CHAR) && isKeyDown(VK_RMENU))
503503
{
504504
HKL current_layout = ::GetKeyboardLayout(0);
505-
SHORT scan_res = ::VkKeyScanExW(wParam, current_layout);
505+
SHORT scan_res = ::VkKeyScanExW(static_cast<WCHAR>(wParam), current_layout);
506506
if ((HIBYTE(scan_res) & (2 | 4)) == (2 | 4))
507507
{
508508
keyEvent.modifiers &= ~(EVENTFLAG_CONTROL_DOWN | EVENTFLAG_ALT_DOWN);

Client/cefweb/premake5.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ project "Client Webbrowser"
66

77
filter "system:windows"
88
includedirs { "../../vendor/sparsehash/src/windows" }
9-
linkoptions { "/SAFESEH:NO" }
109
buildoptions { "-Zm130" }
1110

1211
filter {}

Client/core/CAdditionalVertexStreamManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,13 @@ SAdditionalStreamInfo* CAdditionalVertexStreamManager::CreateAdditionalStreamInf
466466
declNew->Usage = D3DDECLUSAGE_NORMAL;
467467
declNew->UsageIndex = 0;
468468
if (FAILED(m_pDevice->CreateVertexDeclaration(elements, &info.pVertexDeclaration)))
469-
return false;
469+
return nullptr;
470470

471471
// Create new stream
472472
info.Stride = sizeof(float) * 3;
473473
UINT Size2 = ConvertPTSize(state.decl.VertexBufferDesc1.Size);
474474
if (FAILED(m_pDevice->CreateVertexBuffer(Size2, D3DUSAGE_WRITEONLY, 0, D3DPOOL_MANAGED, &info.pStreamData, NULL)))
475-
return false;
475+
return nullptr;
476476

477477
// Save info
478478
MapSet(m_AdditionalStreamInfoMap, state.stream1.pStreamData, info);

Client/core/CChat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ bool CChat::CharacterKeyHandler(CGUIKeyEventArgs KeyboardArgs)
737737
{
738738
// Check size if it's ok, then output
739739
SString strOutput = strCurrentInput.replace(iFound, std::string::npos, strPlayerName);
740-
if (MbUTF8ToUTF16(strOutput).size() < m_iCharacterLimit)
740+
if (MbUTF8ToUTF16(strOutput).size() < static_cast<size_t>(m_iCharacterLimit))
741741
{
742742
bSuccess = true;
743743
m_strLastPlayerNamePart = strPlayerNamePart;
@@ -802,7 +802,7 @@ bool CChat::CharacterKeyHandler(CGUIKeyEventArgs KeyboardArgs)
802802
}
803803

804804
// If we haven't exceeded the maximum number of characters per chat message, append the char to the message and update the input control
805-
if (MbUTF8ToUTF16(m_strInputText).size() < m_iCharacterLimit)
805+
if (MbUTF8ToUTF16(m_strInputText).size() < static_cast<size_t>(m_iCharacterLimit))
806806
{
807807
if (KeyboardArgs.codepoint >= 32)
808808
{

Client/core/CClientVariables.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ bool CClientVariables::Get(const std::string& strVariable, CColor& val)
106106
try
107107
{
108108
ss >> iR >> iG >> iB >> iA;
109-
val.R = iR;
110-
val.G = iG;
111-
val.B = iB;
112-
val.A = iA;
109+
val.R = static_cast<unsigned char>(iR);
110+
val.G = static_cast<unsigned char>(iG);
111+
val.B = static_cast<unsigned char>(iB);
112+
val.A = static_cast<unsigned char>(iA);
113113
}
114114
catch (...)
115115
{

Client/core/CCommandFuncs.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,8 @@ void CCommandFuncs::FakeLag(const char* szCmdLine)
480480
if (parts.size() > 3)
481481
iKBPSLimit = atoi(parts[3]);
482482

483-
g_pCore->GetNetwork()->SetFakeLag(iPacketLoss, iExtraPing, iExtraPingVary, iKBPSLimit);
483+
g_pCore->GetNetwork()->SetFakeLag(static_cast<unsigned short>(iPacketLoss), static_cast<unsigned short>(iExtraPing),
484+
static_cast<unsigned short>(iExtraPingVary), iKBPSLimit);
484485
g_pCore->GetConsole()->Print(SString("Client send lag is now: %d%% packet loss and %d extra ping with %d extra ping variance and %d KBPS limit",
485486
iPacketLoss, iExtraPing, iExtraPingVary, iKBPSLimit));
486487
}

Client/core/CCommands.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ bool CCommands::Execute(const char* szCommand, const char* szParametersIn, bool
8585
{
8686
// Copy szParametersIn so the contents can be changed
8787
char* szParameters = NULL;
88+
char empyParameters[1] = { 0 };
8889
if (szParametersIn)
8990
{
9091
size_t sizeParameters = strlen(szParametersIn) + 1;
@@ -115,7 +116,7 @@ bool CCommands::Execute(const char* szCommand, const char* szParametersIn, bool
115116
}
116117
if (szParameters == NULL)
117118
{
118-
szParameters = "";
119+
szParameters = empyParameters;
119120
}
120121
}
121122
}

Client/core/CConnectManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ bool CConnectManager::Reconnect(const char* szHost, unsigned short usPort, const
165165
unsigned int uiPort = 0;
166166
CVARS_GET("host", m_strHost);
167167
CVARS_GET("port", uiPort);
168-
m_usPort = uiPort;
168+
m_usPort = static_cast<unsigned short>(uiPort);
169169

170170
// If keeping the same host & port, retrieve the password as well
171171
if (!szHost || !szHost[0] || m_strHost == szHost)

Client/core/CCore.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ static HMODULE WINAPI SkipDirectPlay_LoadLibraryA(LPCSTR fileName)
6161
const fs::path inLaunchDir = fs::path{FromUTF8(GetLaunchPath())} / "enbseries" / "enbhelper.dll";
6262

6363
if (fs::is_regular_file(inLaunchDir, ec))
64-
return Win32LoadLibraryA(inLaunchDir.u8string().c_str());
64+
return Win32LoadLibraryA(UTF8FilePath(inLaunchDir).c_str());
6565

6666
// Try to load enbhelper.dll from the GTA install directory second.
6767
const fs::path inGTADir = g_gtaDirectory / "enbseries" / "enbhelper.dll";
6868

6969
if (fs::is_regular_file(inGTADir, ec))
70-
return Win32LoadLibraryA(inGTADir.u8string().c_str());
70+
return Win32LoadLibraryA(UTF8FilePath(inGTADir).c_str());
7171

7272
return nullptr;
7373
}
@@ -1757,8 +1757,8 @@ void CCore::UpdateRecentlyPlayed()
17571757
{
17581758
CServerBrowser* pServerBrowser = CCore::GetSingleton().GetLocalGUI()->GetMainMenu()->GetServerBrowser();
17591759
CServerList* pRecentList = pServerBrowser->GetRecentList();
1760-
pRecentList->Remove(Address, uiPort);
1761-
pRecentList->AddUnique(Address, uiPort, true);
1760+
pRecentList->Remove(Address, static_cast<ushort>(uiPort));
1761+
pRecentList->AddUnique(Address, static_cast<ushort>(uiPort), true);
17621762

17631763
pServerBrowser->SaveRecentlyPlayedList();
17641764
if (!m_pConnectManager->m_strLastPassword.empty())

0 commit comments

Comments
 (0)