-
Notifications
You must be signed in to change notification settings - Fork 2.4k
SDL Location API #7849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
SDL Location API #7849
Conversation
57b60ce
to
9caffbe
Compare
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? |
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:
Of course, the drawback is to publish an unstable API, not satisfying all back-ends. 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. |
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */ | ||
double latitude; /**< Latitude in degrees */ | ||
double longitude; /**< Longitude in degrees */ | ||
double altitude; /**< Altitude in meters */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add "accuracy". Most apps ignore inaccurate position or display a circle to show accuracy to user.
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). |
Some proposal for SDL Location API. (see #7758)
2 new functions:
SDL_StartLocation() and SDL_StopLocation(),
added:
Platform supported: