Forum Replies Created
-
AuthorPosts
-
Thanks Mark, you’ve helped this along far more than can be expected, so feel free to let it go here.
I’m not expecting you can fix errors you can’t reproduce.
Your GameController addition is absolutely GREAT, because mapping of buttons/axis is now a breeze with the gamepad tool.
I’ll be looking forward to the SDL 2.0.7 fixes, and might try them out myself as you suggest, because there ARE some joystick glitches in SDL (or Windows)
My conclusions (with two trouble makin’ controllers) for now are:
Remove one of two controllers and SDL will send an instanceid for removal, then sometimes immediately after a “SDL_JOYSTICKADDED”
If you faithfully react on these events, you’ll end up with two “controllers” though only one device is plugged in.
You can also end up with 3 “controllers” for two devices, where one physical device is mapped to two players.
It all leads down to that SDL is not to be trusted 100% , so some sanitizing is to be expected.
I’ll makle sure to check for NULL events, as I am going to have a go at this approch : http://blog.5pmcasual.com/game-controller-api-in-sdl2.html and make the whole thing event based, instead of polling.
Thanks again for your dedication and hard work!
This is as close as I’ve gotton to a reasonable crash detection. Note that this is on my own code, but I had the same error with one of the develop versions. Tell me if I need to do a different type of log/screenshot If it happens again.
In this case I have this in my App class: App.SdlEventFilter = MySdlEventFilter , and then
Monkey123Method MySdlEventFilter:Void( event:SDL_Event Ptr )GameController.SendEvent(event)End MethodAttachments:
Thanks!
@scurty: As you can see I’m looking for a more accurate way.
What “Sound Extension” are you using ( and what is it? )
Ohh!, I see, but I’m not sure Monkey should behave like that.
Self in a Method should always return an object IMO.
Why the “If Self” ?
Thanks, but that does not solve the issue: channel.PlayheadSample returns bufferposition not song position.
Buffer is much shorter than the music.
Thanks Pakz, but I need better accuracy.
Soundcards and devices drift (in time), so especially when playing long files, we need sampleposition to know how far along playback is.
@adamstrange : probably just being slow here, but could you explain a bit more?
Added JoystickDevice.Close() needed for hotplugging here : https://github.com/blitz-research/monkey2/issues/259
Those lists are great, but GUIDs returned on Android is in another format, and there are many Name/GUID variations out there.
I made a GameController module, but I’m not happy with the many issues yet.
Hot pluggin/unplugging seems to be an issue too.
November 1, 2017 at 9:44 pm in reply to: Is SDL_GetPrefPath the best place to store settings? #11422I think I’m looking for Monkey 1’s SaveSettings().
That was great because I did not have to think about paths and stuff.
If somebody gets on with this, there are some comunity efforts to maintain lists of mappings here:
https://github.com/p-groarke/SDL_GameControllerDB (where you can also find a link to http://www.generalarcade.com/gamepadtool/
https://github.com/balthamos/SDL_GameControllerDB
1.1.08 fix works !
Ok, thanks for explaining, I was assuming it was a wrapper for SDL_GameController.
One benefit of wrapping that would be the “database” it as of know controllers.
-
AuthorPosts
