Love2D/LovePotion checking if pressed gamepad button

  • Thread starter Thread starter bebrilovich
  • Start date Start date
  • Views Views 847
  • Replies Replies 0

bebrilovich

Member
Newcomer
Joined
Oct 14, 2023
Messages
11
Reaction score
6
Trophies
0
Age
25
XP
104
Country
Ukraine
how to check it? i tried to found on google but don't found(or i am not trying, idk)

edited : i found on google but when i test it in on windows app it work with my gamepad but when i use citra there is an error

here is a code

function love.load() image = love.graphics.newImage("da.png") player = image da = 200 x = 100 y = 100 local joysticks = love.Joystick.getJoysticks() joystick = joysticks[1] end function love.draw() --love.graphics.print('Hello World!', 0, 0) --love.graphics.applyTransform(transform) love.graphics.draw(player, x, y) end function love.update(dt) if joystick:isGamepadDown("dpleft") then x = x + (100 * dt) end end
 

Attachments

  • clipboard_image_43cb9c61f8822296.jpg
    clipboard_image_43cb9c61f8822296.jpg
    30.2 KB · Views: 72
Last edited by bebrilovich,

Site & Scene News

Popular threads in this forum