Gamepad Input Globally
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv Information
mpv v0.41.0-601-gce71cd8ae Copyright © 2000-2026 mpv/MPlayer/mplayer2 projects
built on May 3 2026 10:05:49
libplacebo version: v7.364.0 (v7.360.0-34-gd5ef02c-dirty)
FFmpeg version: N-124318-g702b0784b
FFmpeg library versions:
libavcodec 62.30.100
libavdevice 62.4.100
libavfilter 11.17.100
libavformat 62.13.102
libavutil 60.30.100
libswresample 6.4.100
libswscale 9.7.100
Other Information
- Windows version: 10 22H2 [10.0.19045.5487]
- GPU model, driver and version: DS4Windows (Xbox 360 Controller driver)
- Source of mpv: [github.com/zhongfly/mpv-winbuild/](https://github.com/zhongfly/mpv-winbuild/)
- Latest known working version:
mpv v0.40.0-341-gdb2b4362c Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
built on Sep 27 2025 21:05:13
libplacebo version: v7.354.0 (v7.351.0-69-g5592d88-dirty)
FFmpeg version: N-121254-g635cb4543
FFmpeg library versions:
libavcodec 62.16.100
libavdevice 62.2.100
libavfilter 11.9.100
libavformat 62.6.100
libavutil 60.13.100
libswresample 6.2.100
libswscale 9.3.100
- Issue started after the following happened: Updated to the latest available build of mpv 0.41 (May 3, 2026).
Description
With --input-gamepad=yes and any game running, gamepad inputs in mpv were only captured when the mpv window was active. This allowed the gamepad to be set as a media controller without interfering with the running game.
After updating to mpv v0.41.0, gamepad inputs are now captured globally, even with games running (with mpv not in focus). This makes background/secondary use of mpv impossible during gaming, as button presses intended for the game are also registered in mpv.
(Note: Global capture with non-game applications was already present before, but this was not an issue since they don’t use the gamepad.)
Downgrading to v0.40.0 restores the previous behavior.
Reproduction Steps
Set up the gamepad, example: GAMEPAD_ACTION_DOWN cycle pause
Launch mpv with --input-gamepad=yes
Open a media file in mpv.
Switch focus to a game.
Use the gamepad in the game.
Expected Behavior
(Previous behavior)
During a game, gamepad inputs should only be captured when the mpv window is active.
Actual Behavior
Gamepad input is captured globally by mpv during a game, even when the window is not active. This causes unwanted input in mpv.
Log File
v0.41 no:
output41.txt
v0.40 ok:
output40.txt
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
- I tested and confirmed that the issue exists with the latest release version or newer.
- I provided all required information including system and mpv version.
- I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- I attached the full, untruncated log file.
- I attached the backtrace in the case of a crash.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the --input-gamepad=yes entry point and compare output41.txt with output40.txt, then inspect the changes between the reported v0.40 and v0.41 builds that affect gamepad focus handling. Done means gamepad input is captured by mpv only while its window is active, while the reproduction steps continue to work with a game focused.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 66/100