Tutorial: an XBOX360 pad Class using GLFW

Started by
6 comments, last by jbadams 9 years, 3 months ago

Hi

I always wanted to get some form of feedback on the only tutorial I've ever written! It's for people who want to use Xbox 360 pads with GLFW (open GL for Windows framework).

Please enjoy

http://www.lloydcrawley.com/reading-input-from-an-xbox-360-pad-using-glfw-pt-1/

Advertisement

I haven't tried to implement this since I'm using XInput myself, but from I see, I like it. smile.png Never thought of using GLFW like this! cool.png

In your article you mention that you'll discuss it another time, but I'm really curious how you separate the triggers without XInput?

As I understood it, robust trigger support is one of the main reason to use XInput.

(For those that don't know: The XBox360 controller L and R triggers share the same Axis, L moving the axis to -100% with R moving to +100%. If you press both at the same time, the two will cancel each other out, and the axis will go back to 0%, which appears like they are both not pressed. XInput separates these two for you, but does it behind the scenes.)

In your article you mention that you'll discuss it another time, but I'm really curious how you separate the triggers without XInput?

When I wrote the article (last summer) I was unaware that the left and right triggers thing was related to the drivers used by the o/s whilst apparently xInput uses some different drivers to most to read the input from the pad.

However you can install a driver from here that helps:

http://www.jonnys-place.com/index.php?topic=10495.0

The negative being every user of your game will need the driver. Unless I become a driver programmer and use such arcane wizardry instead of GLFW.

Is there any advantage to doing it this way over XInput?

My current solution uses XInput, but thanks for the link to those drivers. I'll keep it bookmarked in case there's a need for it down the road.

Well I can't remember clearly but last summer I tried using Xinput with GLFW and thought it was a pain, and found GLFW by itself easier to manage as long as I didn't want to use the shoulder triggers

Hello friends,

The site you have linked to is down. Was it moved to a new location or what?

Harsha...ch

I'm afraid this topic is two years old, and it appears the linked tutorial simply isn't available anywhere any more. The original poster also hasn't been active since 2013.

I'm closing this since it's so old and no longer relevant given the broken link.

- Jason Astle-Adams

This topic is closed to new replies.

Advertisement