Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML joystick problem?  (Read 13135 times)

0 Members and 2 Guests are viewing this topic.

Glocke

  • Sr. Member
  • ****
  • Posts: 289
  • Hobby Dev/GameDev
    • View Profile
Re: SFML joystick problem?
« Reply #15 on: March 28, 2015, 03:24:39 pm »
It will always stay on that branch until it's merged ;).
Great! My netbook is compiling the source. I'll edit this post when I have testing results :)

/EDIT: My demo application passed with 100% expected behavior. I'll test my actual project now ;)
/EDIT 2: Also my project passed sf::Joystick: Multiplayer gameplay via gamepad is working great!

Thanks a lot for your help :-*
« Last Edit: March 28, 2015, 04:04:25 pm by Glocke »
Current project: Racod's Lair - Rogue-inspired Coop Action RPG

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFML joystick problem?
« Reply #16 on: March 28, 2015, 04:51:15 pm »
Just pushed a final version that fixed a small issue that zsbzsb still had with vendor/product id retrieval when unplugging and replugging multiple times. Should be ready for final testing and merge now ;).
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Glocke

  • Sr. Member
  • ****
  • Posts: 289
  • Hobby Dev/GameDev
    • View Profile
Re: SFML joystick problem?
« Reply #17 on: March 28, 2015, 05:28:59 pm »
I'm compiling :)
But I faced a totally different problem since I'm using your bugfix branch: resizing the window is broken. The window itself is resized but the rendering screen remains unchanged referring to size  :( Shall I open a seperate thread for this? The problem haven't occured with the official release build. So maybe some changes has been made to resizing since you created the branch ...? maybe xD I'm not sure.

/EDIT: The gamepad can now be disconnected and reconnected multiple times without problems. But two things also changed: There's an OpenGL warning on startup and die framelimit is quite huge. On my machine the framerate was locked around 60 by my graphics driver .. I'm not sure what's going on here Oo

(click to show/hide)

But sf::Joystick works fine for me  8)
« Last Edit: March 28, 2015, 05:40:23 pm by Glocke »
Current project: Racod's Lair - Rogue-inspired Coop Action RPG

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFML joystick problem?
« Reply #18 on: March 28, 2015, 06:00:25 pm »
You are using the master version (which is what this branch is sitting on), which will become SFML 2.3 at some point. This is the reason why people should continuously test the master branch ::)

The issue you are facing now is related to the fact that SFML is now using XCB instead of Xlib for window management on Unix systems. There were many problems with it after it got merged right after 2.2 was released, many of which I have fixed in another branch. Once that gets merged, this will be rebased on top of that one and the problems should disappear.

It would be nice if you could test that branch and report in its associated pull request as well, since you seem to have the problems that should have been fixed.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

zmertens

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: SFML joystick problem?
« Reply #19 on: March 28, 2015, 07:03:04 pm »
I'm not sure if its still needed but here's the output from
Code: [Select]
find /dev/input/* -not -path "/dev/input/by-path*" -exec udevadm info -q all '{}' \;
(click to show/hide)

And the output from
Code: [Select]
udevadm monitor --property
(click to show/hide)

I also checked out the ca7776b branch and everything seems to work swell.

On a side note, I was wondering what it would take to get more functionality from my XBox 360 controller? I basically would hope to be able to use the 'A' button and D-pad for my games.

If you need any more help testing I will try to be useful. I'll make sure to build the right libraries when I test (instead of building the release and then testing the debug libraries from master ... hehe).
The truth will set you free but first it will piss you off.

Glocke

  • Sr. Member
  • ****
  • Posts: 289
  • Hobby Dev/GameDev
    • View Profile
Re: SFML joystick problem?
« Reply #20 on: March 28, 2015, 07:12:02 pm »
It would be nice if you could test that branch and report in its associated pull request as well, since you seem to have the problems that should have been fixed.
Thats the branch about the "resize issue" I'm facing, right?

You are using the master version (which is what this branch is sitting on), which will become SFML 2.3 at some point. This is the reason why people should continuously test the master branch ::)
Ah, right: upcomming 2.3 ... so yeah, testing is great if done ^^
Is it possible to fetch the diff referring to the joystick implementation and apply it to the release source of SFML 2.2? I guess this would work best for me... Or does the implementation rely on other things from the upcomming 2.3 release? I haven't looked at your branch in that detail - I just cloned and compiled it :D
Current project: Racod's Lair - Rogue-inspired Coop Action RPG

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFML joystick problem?
« Reply #21 on: March 28, 2015, 07:25:33 pm »
On a side note, I was wondering what it would take to get more functionality from my XBox 360 controller? I basically would hope to be able to use the 'A' button and D-pad for my games.
SFML uses the Linux joystick API, so to SFML, everything looks like a joystick. If the 'A' button and/or D-pad don't work with SFML, it might be because the joystick API isn't able to map them to a "virtual joystick" somehow. I'm not sure, maybe it already works for other people, you'll have to ask around.

Thats the branch about the "resize issue" I'm facing, right?
That's the branch about "all the stuff that broke during the XCB rewrite" which includes your resize issue I presume ;D.

Is it possible to fetch the diff referring to the joystick implementation and apply it to the release source of SFML 2.2?
If you are willing to make use of git a bit, then you can just cherry-pick the 2 commits you want onto 2.2.

Or does the implementation rely on other things from the upcomming 2.3 release?
No... they are completely independent and can be used separately. I just felt like rebasing it onto master since that would make it easier to test everything together and spot any bugs that might only become visible after we would have merged it.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).