Skip to content

Commit

Permalink
Disable modern game controller API on Windows
Browse files Browse the repository at this point in the history
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
  • Loading branch information
WizardCM authored and RytoEX committed Feb 4, 2025
1 parent 082a0a2 commit 663dc38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions browser-app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,16 @@ void BrowserApp::OnBeforeCommandLineProcessing(const CefString &, CefRefPtr<CefC
// Don't override existing, as this can break OSR
std::string disableFeatures = command_line->GetSwitchValue("disable-features");
disableFeatures += ",HardwareMediaKeyHandling";
#ifdef _WIN32
disableFeatures += ",EnableWindowsGamingInputDataFetcher";
#endif
disableFeatures += ",WebBluetooth";
command_line->AppendSwitchWithValue("disable-features", disableFeatures);
} else {
command_line->AppendSwitchWithValue("disable-features", "WebBluetooth,"
#ifdef _WIN32
"EnableWindowsGamingInputDataFetcher,"
#endif
"HardwareMediaKeyHandling");
}

Expand Down

0 comments on commit 663dc38

Please sign in to comment.