1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.36 Bug Reporting thread
    Solutions and more information may already be available.

Gamepad doesn't stay bound to game window when it loses focus

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by krisp, Apr 21, 2016.

  1. krisp

    krisp
    Expand Collapse

    Joined:
    Apr 21, 2016
    Messages:
    5
    Hello! First off, great game. Not sure if this is a bug or a feature request but when running the game in window mode on a second display, and then switching focus to a different window, the gamepad does not stay bound to the game. Instead button presses appear to register for a few seconds after focus is lost then it won't take input from the controller until the window has focus again. It would be great if the game "locked" or bound the input device so that it took input even if the window is not in focus (the simulation already runs when not in focus)

    I apologize in advance if this is a config setting that I have missed.
     
  2. Funky7Monkey

    Funky7Monkey
    Expand Collapse

    Joined:
    Oct 12, 2014
    Messages:
    977
    AFAIK, this isn't possible due to Windows limitations.
     
  3. krisp

    krisp
    Expand Collapse

    Joined:
    Apr 21, 2016
    Messages:
    5
    While it certainly isn't possible to bind the keyboard and mouse, it should be possible to lock a game controller to the application by properly setting the dxinput cooperative level to DISCL_EXCLUSIVE | DISCL_BACKGROUND. I can think of a couple of examples such as the higan nes/snes emulator that can lock on to a game controller regardless of windows focus.

    https://msdn.microsoft.com/en-us/library/windows/desktop/ee416848(v=vs.85).aspx
     
    #3 krisp, Apr 21, 2016
    Last edited: Apr 21, 2016
  4. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    2,021
    There was code that intentionally ignored these input events when the window had lost focus, but to be honest I'm not sure why that code was inplace. Might have been in response to complaints, or it may have been there since forever. So, the next update will bring back the ability to use controllers in those situations (also including force feedback and vibration). We'll see if there are any complaints after that, and then act based on the feedback we receive.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice