I have set up a shortcut in Steam to a game to run in Cemu. If I run it in Desktop mode, everything works fine and I have motion control from my Switch Pro Controller. But if I run the same shortcut through Big Picture mode… then the everything works, but the motion controls are stuck. When I focus Steam by pressing the Home button, then I can see in the background that the motion controls temporarily work, but as soon as the steam menu is closed, then the motion controls stop working again.
I’m running with Steam Input disabled for that game. If I enable Steam Input, then the controller detected by Cemu does not have motion support.
With evtest monitoring the IMU device from Switch Pro Controller, I can see that the motion data stops as soon as the options menu is closed, and resumes immediately when the options menu is open. This leads me to believe that Steam is sending signals to the controller that make it stop its IMU unit.
I’ve confirmed the behavior with btmon. Steam is disabling motion reporting on the controller via Bluetooth the moment the game window is focued
So my current workaround it to have a python script that re-enables the motion reporting on the controller and make it run every 1 second. Add these two files somewhere:
pip install pysdl2
sdl-enable.py:
import sys
import sdl2
import sdl2.ext
import time
def enable_motion(controller):
if sdl2.SDL_GameControllerSetSensorEnabled(controller, sdl2.SDL_SENSOR_ACCEL, 1) != 0:
print(f"Failed to enable accelerometer: {sdl2.SDL_GetError().decode()}")
sdl2.SDL_GameControllerClose(controller)
sdl2.SDL_Quit()
def main():
if sdl2.SDL_Init(sdl2.SDL_INIT_GAMECONTROLLER | sdl2.SDL_INIT_EVENTS) != 0:
print(f"SDL_Init error: {sdl2.SDL_GetError().decode()}")
return 1
num_joysticks = sdl2.SDL_NumJoysticks()
for i in range(num_joysticks):
if sdl2.SDL_IsGameController(i):
controller = sdl2.SDL_GameControllerOpen(i)
if controller:
enable_motion(controller)
if __name__ == "__main__":
sys.exit(main())
fix-motion.sh
#!/bin/bash
while true; do python /home/kuba/sdl-enable.py; sleep 1; done &
"$@"
Then, run chmod +x fix-motion.sh and change the steam command to /path/to/fix-motion.sh %command%