The max value of a INT16 is 32768, which is less than the 36000 required for a full rotation angle. Change type to INT32 as that is what the underlying SDL paramerter is.
Rotate by +270 instead of -90 to eliminate negative value fixup too.
Supersedes !8780