Skip to content

Conversation

@suve
Copy link
Collaborator

@suve suve commented May 21, 2022

This patch updates sdlhints.inc to match SDL_hints.h, as of version 2.0.22, with one minor difference: in SDL 2.0.10, SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH has been removed completely. Instead of removing it, this patch marks it as deprecated.

An additional bugfix was made to the definition of TSDL_HintCallback - for SDL to be able to pass arguments to the function correctly, it should use the C calling convention.

@Free-Pascal-meets-SDL-Website
Copy link
Collaborator

Thanks, great work!

Could you update the version tag in sdl2.pas?

Then this is ready for merge. :-)

As a sidenote about the deprecate-marking: I wonder if Delphi isn't supporting the deprecated syntax, too.
From this https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Declarations_and_Statements_(Delphi) I think it is but not sure if the syntax is exactly the same. So for now, it is fine as it is.

@suve
Copy link
Collaborator Author

suve commented May 25, 2022

Does Embarcadero have some trial versions of Delphi? If deprecated is supported by Delphi, then we could get rid of {$IFDEF FPC}. We could then review other files for deprecated functionality and mark it as such (which would also solve issue #34).

@Free-Pascal-meets-SDL-Website
Copy link
Collaborator

I made further research on this. I think it is safe to remove the conditional.

See https://stackoverflow.com/questions/27296111/is-possible-to-mark-an-entire-const-block-as-deprecated for reference. There are variables shown to be deprecated in an identical way for Delphi.

@Free-Pascal-meets-SDL-Website
Copy link
Collaborator

Thanks again! I made two minor changes before merge: I updated the deprecated modifier according to our discussion and the version tag in sdl2.pas.

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants