GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 Script Submission » Check if running on steamdeck » 2023-02-25 08:30:24

FollowTheFun
Replies: 1

My game got marked as 'not supported on steam deck' on my steam storepage, so I had to buy a steamdeck to get that fixed.

Now I have one, I use the following script to enter into 'deck mode' which basically just hides the cursor and uses device_mouse instead of mouse_check:

Expand///running_on_steamdeck()
/*
Returns true [boolean] if we're running on steamdeck

environment_get_variable("Steameck") returns "1" for steamdeck (string) and "" for not.

Special thanks to @YellowAfterlife for discovering you can do this. 

(Tested in gms1.4 windows export, not tested for gms2 or linux).
*/

return environment_get_variable("SteamDeck") == "1"; 

It works on the windows (both yyc and not) export (Steam deck uses Proton, which pretends to be windows 10). I have not tested this on linux or game maker 2. But it probably still works.

Board footer

Powered by FluxBB