SDL Location API
Some proposal for SDL Location API. (see #7758)
2 new functions: SDL_StartLocation() and SDL_StopLocation(),
- SDL_EVENT_LOCATION, that would transmit periodically Latitude/Longitude/Altitude
added:
- testlocation.c
Platform supported:
- linux using DBus portal location interface
As well as this fits code-wise into SDL, I'm not sure that it fits the goal of SDL as a cross-platform game/media development library. What's the use case for this?
What's the use case for this?
Pokemon Go.
Yep, some app could mix game concept and real location !
I don't really need this, but if we want it for SDL3, maybe we would merge before have all back-ends.
Then, this is a more global suggestion about workflow for new API that needs multiple back-end: We could merge them before having all the back-end implemented.
- because different back-end implementation tends to come for different developers and so different PRs.
- it allows testing earlier / and feedback
- easier not to have to continuously resolve merge for the PR
Of course, the drawback is to publish an unstable API, not satisfying all back-ends. but we can maintain some file "pending_api" to remember those API, and review them before release (eventually commenting them out).
or some header macro / SDL_UNSTABLE: that would comment out those API
I think any API that is in the exploratory phase and has incomplete implementations should be worked on in a fork. This is especially important once we release SDL 3.0 and we have committed to ABI compatibility - we don't want to release an API that isn't done and have to change it or remove it later.
I meant this as a generic thing, for some other PR (like SDL_notification), not necessary SDL location. If someone want to explore those API and provide back-end when this isn't really available yet
Something like SDLCALL, adding something SDL_API_UNSTABLE which wouldn't publish the API when releasing. Eg, API wouldn't be part of the released ABI. I think that would ease.
I'm putting this into the 3.2.0 milestone, in case it makes sense to make it into the initial release, but this can safely be added as a new API later, so I won't be offended if this bounces out to 3.x for not being ready in time.
(But I do think this would be a fun feature to include for mobile games.)
This looks good and i can implement that for vita (and probably psp).
But i don't think src/misc/SDL_url.c (or even src/misc ) is the right place for that.
Considering there a "local" location tracking / positioning things for "special computing", eg VR games etc. , I think it would make sense to add something like "Geo" to the naming here.