Also - this function seems still seems to be defining the ANDROID pre-processor for every platform - with the result when I compile for windows the game is a mess as it thinks its running on android all the time...
The ?DEFINE ANDROID line is executed everytime.
I'm having another problem with a defined Constant string not printing - trying to track that one down as it worked fine in v10.
///////////////////////////////////////
// Get Device Info
///////////////////////////////////////
// This function gets more detailed device info.
// At the end of this function, Global Target$ will contain the text "PC", "IPHONE", "IPOD", "IPAD", "MAC" or "ANDROID", depending on device detected below. On Android, the ANDROID Preprocessor variable will also be created.
FUNCTION GetDeviceInfo:
iPhoneVer = 0 // Reset iPhone specific version flag.
Target$ = PLATFORMINFO$("") // Get the current Platform Info
SELECT Target$
CASE "WIN32"
Target$ = "PC"
CASE "IPHONE" // What type of iOS Device? Will return "iPhone", "iPod Touch", "iPad".
Target$=UCASE$(PLATFORMINFO$("DEVICE")) // Get the Target Device Info. Make sure everything is in capitals for the ZX81 font!
IF Target$="IPOD TOUCH"
Target$="IPOD" // Device name too long so shorten it.
ENDIF
IF Target$<>"IPAD"
iPhoneVer = 1 // Set flag for iPhone or iPod touch models. This allows for onscreen buttons to be moved later etc.
ENDIF
CASE "MACOSX"
Target$="MAC"
CASE "ANDROID"
?DEFINE ANDROID // Define the ANDROID Preprocessor variable.
ENDSELECT
ENDFUNCTION