Hey, Im using the latest dev build and I’ve noticed when I disconnect my PS3 controller from the plug and use it wirelessly all buttons work but the exit dolphin function does not work?
It does work when I connect it to the controller plug.
I’ve noticed in emu-station the controller when plugged in registers as SHANWAN PS3 gamepad, but when unplugged and connects wirelessly becomes Sony Playstation(R)3 Controller.
The hotkey value I think is different between these 2 controller profiles, which is maybe causing the conflict.
Do you know where the controller code for exiting dolphin is? I think it should be 9 or 16 but not sure need to test.
edit: I think 4.2 EmuElec release doesn’t suffer from this bug as I remember being able to press the Hotkey+Start to exit fine.
It occurs in my 4.2 Release version too. Before I could exit out of dolphin using Hotkey+Start just fine. Off the top of ur head does emuelecRunEmu.sh launch a controller process that listens for the hotkey and exit being pressed. In the dev version it exits if I press hotkey+start just after dolphin has loaded the game.
gptokeyb 1 dolphin (or whatever the dolphin binary is called)
and use your quit combination, if it does not end, then your gamepad is probably not configured correctly
so the output shows in the terminal and found that the first time the controller is paired it works as expected, however running it a second time it does not work, I have to re-plug the controller in and it works. So to re-cap, when it’s plugged in it works, when it’s connected via bluetooth it works only the first time it’s paired.
Hopefully this helps diagnose the issue.
I cannot reproduce this, with all of my gamepads. So it just points to either your gamepad not working correctly with SDL2, or it is not in the gamecontrollerdb.txt file which means is not properly configured. I will suggest you first try with another gamepad just to make sure.
Hmm its not even calling the gamepad events to add the controller when connected wirelessly. Hence why no events are working. I made a more complete gamecontrollerdb.txt. How do I include it into the image?
@emuele I got it semi working. The only issue is when I execute gptokey it does not auto detect the controller when wireless. I have to connect it via the cable and disconnect it for it to get the SDL_CONTROLLERDEVICEADDED event to fire and add the controller. What if the event was manually called on startup of gptokeyb? That may fix the issue.
I also need the following added to gamecontrollerdb.txt see below:
So wait… you mean to tell me that you did not set up your controller while it was wireless? here is how it works:
1.- Connect controller (either by wire or wireless)
2.- Configure your controller on EmulationStation, this is very important You NEED to set up your controller in ES.
3.- Automatically it will get added to the gamecontrollerdb.txt as well as other configurations
Wired controllers and BT controllers usually have different GUID which is why for you it only works wired, since I assume you never configure the controller while wireless, which is why it is not in the gamecontrollerdb.txt
The gamecontrollerdb.txt gets auto populated. But if you wish to add your controller to it, is better to do it upstream on the sdlGameControllerDB Github.
As for the gptokeyb changes I have asked lethal_guitar to review it as he knows a lot more about the code than me.
Oh, well setting up the controller was no issue, as emulationstation auto detects it wirelessly just fine. I did not know you had to re-configure by unplugging the configuring again when it connects via BT.
However when launching gptokeyb it was not auto-detecting as it is pointing to the wrong gamecontrollerbd.txt be default (since it was called after the SDL initialization ). It should point too:
/storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt
AND NOT
/usr/config/SDL-GameControllerDB/gamecontrollerdb.txt
I think the error output window in emulationstation when you get a launch game crash also might have this SDL function call ordering bug too.
I’ve tested the SDL function calls swapped and it makes it work correctly. The reason why the bug has not been picked up before, is most likely not many have used it for dolphin with controllers that werent present in the default gamecontrollerbd.txt that is in /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt which is read-only.
It does not point to the second one you mentioned, at least not here, all the gamepads get added to the first path and they work fine. It even says so in your logs
The SDL initialization gets called before the path is set, thereby breaking the code. Trust me it doesnt look for the users config gamecontrollerdb.txt file by default. Hence why it never worked with my controller even though it was added to the user game controller file.
lethal_guitar mentioned the text viewer also being broken due to ordering which I noted in an earlier post.
I believe you, I guess, altho I cannot reproduce this at all, maybe because I do not have that controller. But if that PR fixes it for you, then its all set