Hello i you wanted to ask someone knows how to make love to be able to get keyboard/gamepad input without focus?
My means to ask this is beacause i managed to make 2 player minecraft in one pc
the trick was that one instance had a mod called "Controllabe" that was able to pick up the gamepad while the
other instance was on focus using it with the good 'ol keyboard
My question is someone knows to replicate this effect on love (maybe gettin' dirty touching sdl or something?)
Out of focus Gamepad hook
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Citizen
- Posts: 67
- Joined: Sat May 08, 2021 9:45 pm
Out of focus Gamepad hook
Code: Select all
target = boardIndex.getWhosPeekingThisLine()
target:setObey(true)
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Out of focus Gamepad hook
I believe that gamepad should already work even if the game is unfocused, but keyboard and mouse won't.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
- BrotSagtMist
- Party member
- Posts: 665
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Out of focus Gamepad hook
No it wont work as default.
It can be turned on using two different methods for gamepad only.
This is one https://github.com/love2d/love/issues/970
The other is directly setting it as evironment variable so no code change is required:
export SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS=1
It can be turned on using two different methods for gamepad only.
This is one https://github.com/love2d/love/issues/970
The other is directly setting it as evironment variable so no code change is required:
export SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS=1
obey
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests