Skip to content

Commit

Permalink
Merge branch 'master' into patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Moris authored Dec 24, 2024
2 parents e041992 + fd95204 commit 5ba6f94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Client/core/DXHook/CProxyDirect3D9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*****************************************************************************/

#include "StdInc.h"
#include <dwmapi.h>

HRESULT HandleCreateDeviceResult(HRESULT hResult, IDirect3D9* pDirect3D, UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags,
D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DDevice9** ppReturnedDeviceInterface);
std::vector<IDirect3D9*> ms_CreatedDirect3D9List;
Expand Down Expand Up @@ -166,6 +168,10 @@ HRESULT CProxyDirect3D9::CreateDevice(UINT Adapter, D3DDEVTYPE DeviceType, HWND
SetWindowTextW(hFocusWindow, MbUTF8ToUTF16("MTA: San Andreas").c_str());
#endif

// Set dark titlebar if needed
BOOL darkTitleBar = GetSystemRegistryValue((uint)HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", "AppsUseLightTheme") == "\x0";
DwmSetWindowAttribute(hFocusWindow, DWMWA_USE_IMMERSIVE_DARK_MODE, &darkTitleBar, sizeof(darkTitleBar));

// Detect if second call to CreateDevice
if (CreateDeviceSecondCallCheck(hResult, m_pDevice, Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, ppReturnedDeviceInterface))
{
Expand Down
2 changes: 1 addition & 1 deletion Client/core/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ project "Client Core"

links {
"ws2_32", "d3dx9", "Userenv", "DbgHelp", "xinput", "Imagehlp", "dxguid", "dinput8",
"strmiids", "odbc32", "odbccp32", "shlwapi", "winmm", "gdi32", "Imm32", "Psapi",
"strmiids", "odbc32", "odbccp32", "shlwapi", "winmm", "gdi32", "Imm32", "Psapi", "dwmapi",
"pthread", "libpng", "jpeg", "zlib", "tinygettext", "discord-rpc",
}

Expand Down

0 comments on commit 5ba6f94

Please sign in to comment.