Welcome, Guest. Please login or register.

Author Topic: check "desktop" or "mobile"  (Read 2271 times)


  • Guest
check "desktop" or "mobile"
« on: 20 Jun 2018, 01:27 (5 years and 8 months ago) »

I was wondering, if there is a way to check if the device used to play a love2d-game is either a desktop(or laptop) or a mobile device (phone or tablet)Now this question may seem stupid. After all Mac and Linux are desktop and Android and iOS are mobile, but Windows can offer a little problem here, since Windows can run on both desktop and mobiles. (As far as I know Windows 10 can).The reason I ask is: The game concept I have in mind can be played for 100% with the mouse or touch screen (so for the game itself it doesn't matter), it's rather that I intend to include the achievement API sites like Game Jolt use to log achievements and stuff and then entering a username + token will be required. On desktop, no prob. Keyboard is used, but on mobile devices, no keyboard present (well, that is, I cannot assume everybody has a bluetooth keyboard 'connected'). Now I already have a setup to "fake" a keyboard, but is it needed to show that "fake-keyboard" on desktops as well?

Info Teddy

  • Ultra Captain
  • ********
  • Posts: 3121
    • View Profile


  • Administrator
  • Hyper Captain
  • *
  • Posts: 1606
    • View Profile
Re: check "desktop" or "mobile"
« Reply #2 on: 20 Jun 2018, 10:20 (5 years and 8 months ago) »


  • Crewmate
  • *
  • Posts: 2
    • View Profile
Re: check "desktop" or "mobile"
« Reply #3 on: 10 Dec 2018, 04:50 (5 years and 2 months ago) »
Thanks for the link, Teddy!