Skip to content

Commit 663dc38

Browse files
WizardCMRytoEX
authored andcommitted
Disable modern game controller API on Windows
Chromium 117 and above uses Windows.Gaming.Input, which states > A Windows application must have focus to receive input from a controller. This is not useful, as users will have the game focused, not OBS. https://issues.chromium.org/issues/392661398 https://chromiumdash.appspot.com/commit/aeb76145fe766a359f2e2b7432c207cc135113b6
1 parent 082a0a2 commit 663dc38

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

browser-app.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,16 @@ void BrowserApp::OnBeforeCommandLineProcessing(const CefString &, CefRefPtr<CefC
7878
// Don't override existing, as this can break OSR
7979
std::string disableFeatures = command_line->GetSwitchValue("disable-features");
8080
disableFeatures += ",HardwareMediaKeyHandling";
81+
#ifdef _WIN32
82+
disableFeatures += ",EnableWindowsGamingInputDataFetcher";
83+
#endif
8184
disableFeatures += ",WebBluetooth";
8285
command_line->AppendSwitchWithValue("disable-features", disableFeatures);
8386
} else {
8487
command_line->AppendSwitchWithValue("disable-features", "WebBluetooth,"
88+
#ifdef _WIN32
89+
"EnableWindowsGamingInputDataFetcher,"
90+
#endif
8591
"HardwareMediaKeyHandling");
8692
}
8793

0 commit comments

Comments
 (0)