In Lua there's playdate.metadata.pdxversion
, which is the SDK version the game was compiled with, and playdate.systemInfo.pdxversion
, which is the SDK version the game is running under. We don't have matching C functions right now, but I'm filing that.
One thing about pdxversion
that we might want to change is that we only bump it up on API changes, which since we're using semantic versioning means the last two digits will always be 00 and you can't tell which patch version the game is running under. It makes sense that systemInfo.pdxversion
should include the patch version so your game knows, e.g., whether to use a workaround for a bug that existed in 1.x.1 but was fixed in 1.x.2.