Skip to content

Commit 47f0ab4

Browse files
committed
Merge branch 'master' into next
2 parents 67950c1 + f2ac185 commit 47f0ab4

File tree

880 files changed

+75113
-92806
lines changed

Some content is hidden

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

880 files changed

+75113
-92806
lines changed

.github/workflows/build.yaml

Lines changed: 41 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ name: Build
44
on: [push, pull_request]
55

66
jobs:
7-
windows-release:
8-
name: windows-release
9-
runs-on: windows-2019
7+
windows:
8+
strategy:
9+
matrix:
10+
type: [release, debug]
11+
name: windows-${{ matrix.type }}
12+
runs-on: windows-2022
1013
steps:
1114
- uses: actions/checkout@v2
1215

@@ -32,51 +35,16 @@ jobs:
3235
- name: Install data files
3336
run: utils\premake5 install_data
3437

35-
- name: Run Build
38+
- name: Run Build [Release]
39+
if: ${{ matrix.type == 'release' }}
3640
run: win-build.bat
3741
shell: cmd
3842
env:
3943
DXSDK_DIR: './utils/DXFiles/'
4044
CI: 'true'
4145

42-
- name: Create build artifacts
43-
run: utils\premake5 compose_files
44-
45-
- uses: actions/upload-artifact@master
46-
with:
47-
name: InstallFiles
48-
path: InstallFiles/
49-
50-
51-
windows-debug:
52-
name: windows-debug
53-
runs-on: windows-2019
54-
steps:
55-
- uses: actions/checkout@v2
56-
57-
- uses: actions/cache@v1
58-
id: cache-dxfiles
59-
with:
60-
path: utils/DXFiles
61-
key: dxfiles-0001
62-
63-
- name: Download DirectX
64-
if: steps.cache-dxfiles.outputs.cache-hit != 'true'
65-
run: Invoke-WebRequest https://mirror.mtasa.com/bdata/DXFiles.zip -OutFile utils/DXFiles.zip
66-
shell: powershell
67-
68-
- name: Extract DirectX
69-
if: steps.cache-dxfiles.outputs.cache-hit != 'true'
70-
run: Expand-Archive -Path utils/DXFiles.zip -DestinationPath utils/DXFiles
71-
shell: powershell
72-
73-
- name: Install CEF
74-
run: utils\premake5 install_cef
75-
76-
- name: Install data files
77-
run: utils\premake5 install_data
78-
79-
- name: Run Build
46+
- name: Run Build [Debug]
47+
if: ${{ matrix.type == 'debug' }}
8048
run: win-build.bat Debug
8149
shell: cmd
8250
env:
@@ -87,52 +55,56 @@ jobs:
8755
run: utils\premake5 compose_files
8856

8957
- uses: actions/upload-artifact@master
58+
if: ${{ matrix.type == 'release' }}
59+
with:
60+
name: InstallFiles
61+
path: InstallFiles/
62+
63+
- uses: actions/upload-artifact@master
64+
if: ${{ matrix.type == 'debug' }}
9065
with:
9166
name: InstallFiles-debug
9267
path: InstallFiles/
9368

94-
macOS-release:
95-
name: macOS-release
69+
macOS:
70+
strategy:
71+
matrix:
72+
type: [release, debug]
73+
name: macOS-${{ matrix.type }}
9674
runs-on: macOS-latest
9775
steps:
98-
- name: Install MySQL
99-
run: brew install mysql
100-
continue-on-error: true
101-
- name: Link MySQL
102-
run: brew link --overwrite mysql
10376
- uses: actions/checkout@v2
104-
- name: Run Build
105-
run: ./linux-build.sh
10677

107-
macOS-debug:
108-
name: macOS-debug
109-
runs-on: macOS-latest
110-
steps:
11178
- name: Install MySQL
11279
run: brew install mysql
11380
continue-on-error: true
81+
11482
- name: Link MySQL
11583
run: brew link --overwrite mysql
116-
- uses: actions/checkout@v2
117-
- name: Run Build
84+
85+
- name: Run Build [Release]
86+
if: ${{ matrix.type == 'release' }}
87+
run: ./linux-build.sh
88+
89+
- name: Run Build [Debug]
90+
if: ${{ matrix.type == 'debug' }}
11891
run: ./linux-build.sh "" debug
11992

120-
linux-release:
121-
name: linux-release
93+
linux:
94+
strategy:
95+
matrix:
96+
type: [release, debug]
97+
name: linux-${{ matrix.type }}
12298
runs-on: ubuntu-latest
12399
container:
124100
image: docker://ghcr.io/multitheftauto/mtasa-blue-build:latest
125101
steps:
126102
- uses: actions/checkout@v2
127-
- name: Run Build
103+
104+
- name: Run Build [Release]
105+
if: ${{ matrix.type == 'release' }}
128106
run: ./linux-build.sh
129107

130-
linux-debug:
131-
name: linux-debug
132-
runs-on: ubuntu-latest
133-
container:
134-
image: docker://ghcr.io/multitheftauto/mtasa-blue-build:latest
135-
steps:
136-
- uses: actions/checkout@v2
137-
- name: Run Build
138-
run: ./linux-build.sh "" debug
108+
- name: Run Build [Debug]
109+
if: ${{ matrix.type == 'debug' }}
110+
run: ./linux-build.sh "" debug

.github/workflows/stale.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Stale draft PR handler'
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: multitheftauto/[email protected]
12+
id: stale
13+
with:
14+
close-pr-message: "This draft pull request was closed because it has been marked stale for 30 days with no activity."
15+
days-before-pr-close: 30
16+
days-before-pr-stale: 90
17+
ignored-label: "keep"
18+
stale-pr-label-description: "Inactive for over 90 days, to be closed"
19+
stale-pr-message: "This draft pull request is stale because it has been open for at least 90 days with no activity. Please continue on your draft pull request or it will be closed in 30 days automatically."
20+
- name: Print outputs
21+
run: echo ${{ join(steps.stale.outputs.*, ',') }}

Client/cefweb/CAjaxResourceHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ bool CAjaxResourceHandler::ReadResponse(void* data_out, int bytes_to_read, int&
6464
{
6565
bytes_read = 0;
6666
m_callback = callback;
67-
callback->Continue();
67+
6868
return true;
6969
}
7070

Client/cefweb/CWebView.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ void CWebView::Initialise()
5252
browserSettings.windowless_frame_rate = g_pCore->GetFrameRateLimit();
5353
browserSettings.javascript_access_clipboard = cef_state_t::STATE_DISABLED;
5454
browserSettings.javascript_dom_paste = cef_state_t::STATE_DISABLED;
55-
browserSettings.universal_access_from_file_urls =
56-
cef_state_t::STATE_DISABLED; // Also filtered by resource interceptor, but set this nevertheless
57-
browserSettings.file_access_from_file_urls = cef_state_t::STATE_DISABLED;
5855
browserSettings.webgl = cef_state_t::STATE_ENABLED;
5956

6057
browserSettings.plugins = cef_state_t::STATE_DISABLED;
@@ -173,10 +170,7 @@ const bool CWebView::GetRenderingPaused() const
173170
void CWebView::Focus(bool state)
174171
{
175172
if (m_pWebView)
176-
{
177173
m_pWebView->GetHost()->SetFocus(state);
178-
m_pWebView->GetHost()->SendFocusEvent(state);
179-
}
180174

181175
if (state)
182176
g_pCore->GetWebCore()->SetFocusedWebView(this);
@@ -824,7 +818,7 @@ bool CWebView::OnBeforeBrowse(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame>
824818
// //
825819
////////////////////////////////////////////////////////////////////
826820
CefResourceRequestHandler::ReturnValue CWebView::OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request,
827-
CefRefPtr<CefRequestCallback> callback)
821+
CefRefPtr<CefCallback> callback)
828822
{
829823
// Mostly the same as CWebView::OnBeforeBrowse
830824
CefURLParts urlParts;

Client/cefweb/CWebView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class CWebView : public CWebViewInterface,
142142

143143
// CefResourceRequestHandler
144144
virtual CefResourceRequestHandler::ReturnValue OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request,
145-
CefRefPtr<CefRequestCallback> callback) override;
145+
CefRefPtr<CefCallback> callback) override;
146146

147147
// CefLifeSpawnHandler methods
148148
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) override;

Client/core/CChat.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ void CChat::Draw(bool bUseCacheTexture, bool bAllowOutline)
165165
bool bUsingOutline = m_bTextBlackOutline && bAllowOutline && bUseCacheTexture;
166166
DrawInputLine(bUsingOutline);
167167

168+
if (m_bInputVisible)
169+
{
170+
// ChrML: Hack so chatbox input always works. It might get unfocused..
171+
if (!m_pBackground->IsActive())
172+
{
173+
m_pBackground->Activate();
174+
}
175+
}
176+
168177
// Are we visible?
169178
if (!m_bVisible)
170179
return;
@@ -211,9 +220,8 @@ void CChat::Draw(bool bUseCacheTexture, bool bAllowOutline)
211220
if (m_iReportCount < 5)
212221
{
213222
m_iReportCount++;
214-
SString strAdapterName = g_pDeviceState->AdapterState.Name;
215223
AddReportLog(6532, SString("Chat rt chatSize:%2.0f %2.0f rtsize:%d %d card:%s", chatSize.fX, chatSize.fY, iRenderTargetSizeX,
216-
iRenderTargetSizeY, *strAdapterName));
224+
iRenderTargetSizeY, g_pDeviceState->AdapterState.Name.c_str()));
217225
}
218226
}
219227
m_iCacheTextureRevision = -1; // Make sure the graphics will be updated
@@ -298,15 +306,6 @@ void CChat::GetDrawList(SDrawList& outDrawList, bool bUsingOutline)
298306
m_pBackground->SetVisible(false);
299307
}
300308

301-
if (m_bInputVisible)
302-
{
303-
// ChrML: Hack so chatbox input always works. It might get unfocused..
304-
if (!m_pBackground->IsActive())
305-
{
306-
m_pBackground->Activate();
307-
}
308-
}
309-
310309
// Used for render clipping in CChat::DrawTextString
311310
CRect2D RenderBounds(m_vecBackgroundPosition.fX, m_vecBackgroundPosition.fY + 1, m_vecBackgroundPosition.fX + m_vecBackgroundSize.fX,
312311
m_vecBackgroundPosition.fY + m_vecBackgroundSize.fY);

0 commit comments

Comments
 (0)