Legacy GM gamepad_set_colour

trentallain

Member
Hi, I am using PS4 controller input for gamepad slot 4 (DirectInput).
When using gamepad_set_colour(4,c_blue) it will not change the colour. I have windows as my target. I know the controller colour can be changed through windows because games like broforce can change it. Is this just a problem with GameMaker or am I doing something wrong?

Also in the compile, it says: setting pad color to 0x10000ff (if this helps). I don't know what that means though.
 
Last edited:
When are you calling gamepad_set_colour()? I assume you call it after you've confirmed the gamepad is connected?

Haven't used this function before, so that's all I can think of.

Those numbers in the compile message are the hex codes for the colour blue.
 

trentallain

Member
When are you calling gamepad_set_colour()? I assume you call it after you've confirmed the gamepad is connected?

Haven't used this function before, so that's all I can think of.

Those numbers in the compile message are the hex codes for the colour blue.
Yeah, I'm doing all that. Also tried on a key press. Still doesn't work.
 

TheouAegis

Member
the hexadecimal number you posted would be a 4 bytes ARGB value. The 1 is the alpha value. c_blue is 000000ff, with 0 for alpha.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Shouldn't it only be available on the ps4 version of game maker then?
Not necessarily. There are a number of functions in GML that are exclusive to specific platforms (like HTML5 or Android/iOS), so there is a precedent for functions being unique like this for one export only. However it SHOULD be labelled as PS4 only in the manual if I am correct... So I'll ask the devs and see what they say then update the manual as appropriate (and let you know here too).
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Oh, sorry! I forgot to get back to you about this. Yes, the colour function is only valid when using the PS4 export. On all other platforms it will do nothing. I'll update the docs to reflect this.
 
Top