Fix mouse input at start when using borderless mode
This commit is contained in:
parent
91e999b33a
commit
d5cf2b4bef
|
@ -199,10 +199,14 @@ void MainContext::FF13_InitializeGameAddresses()
|
|||
ff13_party_screen_scissor_scaling_factor_4 = baseAddr + 0x668E91;
|
||||
}
|
||||
|
||||
void MainContext::ForceWindowActivate(const HWND hWnd) {
|
||||
PostMessage(hWnd, WM_ACTIVATE, WA_INACTIVE, NULL);
|
||||
PostMessage(hWnd, WM_ACTIVATE, WA_CLICKACTIVE, NULL);
|
||||
}
|
||||
|
||||
void MainContext::FF13_OneTimeFixes() {
|
||||
|
||||
if (IsDXVK())
|
||||
SetForegroundWindow(hWndFF13);
|
||||
ForceWindowActivate(hWndFF13);
|
||||
|
||||
FF13_NOPIngameFrameRateLimitSetter();
|
||||
FF13_RemoveContinuousControllerScan();
|
||||
|
@ -309,8 +313,7 @@ void MainContext::FF13_SetFrameRateVariables()
|
|||
|
||||
void MainContext::FF13_2_OneTimeFixes()
|
||||
{
|
||||
if (IsDXVK())
|
||||
SetForegroundWindow(hWndFF13);
|
||||
ForceWindowActivate(hWndFF13);
|
||||
|
||||
if (*ff13_2_frame_pacer_ptr_address) {
|
||||
**ff13_2_frame_pacer_ptr_address = MAX_FRAME_RATE_LIMIT;
|
||||
|
|
|
@ -179,6 +179,7 @@ bool MainContext::ApplyPresentationParameters(D3DPRESENT_PARAMETERS* pPresentati
|
|||
pPresentationParameters->SwapEffect = pPresentationParameters->MultiSampleType == D3DMULTISAMPLE_NONE ? D3DSWAPEFFECT_DISCARD : D3DSWAPEFFECT_FLIP;
|
||||
pPresentationParameters->Windowed = TRUE;
|
||||
pPresentationParameters->FullScreen_RefreshRateInHz = 0;
|
||||
|
||||
PrintLog("ForceWindowedMode");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,6 +139,7 @@ private:
|
|||
void PrintVersionInfo();
|
||||
|
||||
void FF13_InitializeGameAddresses();
|
||||
|
||||
void FF13_OneTimeFixes();
|
||||
void FF13_EnableControllerVibration();
|
||||
void FF13_NOPIngameFrameRateLimitSetter();
|
||||
|
@ -154,8 +155,8 @@ private:
|
|||
void FF13_2_EnableControllerVibration();
|
||||
|
||||
void AdjustVertexData(const uint32_t width, const uint32_t height);
|
||||
|
||||
bool MatchesExpectedVertexStream(const float* pVertexStreamZeroData);
|
||||
void ForceWindowActivate(const HWND hWnd);
|
||||
|
||||
bool OneTimeFixInit(std::unique_ptr<wchar_t[]>& className, HWND hWnd);
|
||||
std::atomic_bool otf_init = false;
|
||||
|
|
Loading…
Reference in a new issue