Fix Desktop support for all platforms.
Credit to MightyPork from stackoverflow and Balinares from reddit.