PascalGameDevelopment / SDL2-for-Pascal

Unit files for building Free Pascal and Delphi applications using the SDL2 library
https://pascalgamedevelopment.github.io/SDL2-for-Pascal/
Mozilla Public License 2.0
103 stars 20 forks source link

Calling convention modifier missing #141

Closed olatov closed 4 months ago

olatov commented 4 months ago

Hello,

I've noticed that some function declarations (namely, those managing the framerate in sdl2_gfx.pas), are missing the cdecl calling convention modifier - I wonder if there's a reason for that?

I'm having troubles using these with FPC on MacOS (error linking) and Windows (Access Violation in runtime) - unless I add cdecl or apply {$CALLING cdecl} unit-wise.

Thanks.

suve commented 4 months ago

Yeah, this is definitely a mistake on our part. I'll try to take a better look at sdl2_gfx.pas later today. You can also open a PR yourself.

olatov commented 4 months ago

Ok cool, I'll create a PR shortly.