Portal 2
Portal 2 > General Discussions > Topic Details
Malidictus Jan 7, 2013 @ 7:00am
Non-Xbox360 Controller
I don't own any consoles, thus I don't own any console controllers, but I did manage to pick up an off-brand game pad for cheap. Is there any way to play Portal 2 with that? I can get the game to recognise it, but I can't seem to get it to work properly. Specifically, it's this one:


I can't get the controller to both move AND look at the same time. I presume one analogue stick is supposed to move and the other to look, but one of them always has other actions bound to it. I removed all binds off the controller setup and the right analogue stick is still bound to shoot portals or jump and duck.

Is there any way to get this bloody thing configured, in or out of the game?
< >
Showing 1-15 of 26 comments
Antkiller1 Jan 7, 2013 @ 7:04am 
Same problem here bro...
-ZeTo- Jan 7, 2013 @ 7:24am 
I think the easiest way is to use x360ce.
Get the lastest version here : http://code.google.com/p/x360ce/downloads/list
Put x360ce.exe in the portal2 folder, with the portal2.exe.
Then start x360ce.exe, it will automaticly put the modified dll in the same directory and you can start configure your pad (just assign the right axis/button to match the 360 controller).
You alose have to delete the xinput***.dll in the /bin/ folder.
Now when you'll start portal 2, your controller will be identified as a 360 controller.

Feel free to contact me via steam chat if you have some trouble.
Malidictus Jan 7, 2013 @ 7:44am 
Ideally, I'd like a solution that doesn't involve modifying the operation of the actual Portal 2 application. I realise that that may not be possible given how the game works and how crappy my no-brand game pad is and how its latest drivers are for XP... Still, isn't there something I can use to "mod" the game pad itself, or is tricking Portal the only way?
-ZeTo- Jan 7, 2013 @ 7:53am 
Actuallty it doesn't modifty anything in portal2. The program is just using a different dll of directX (xinput1_3.dll in portal2), wich allow any gamepad to be recognize as a Xinput device.
There is absolutely no risk using it (I played l4d2 and portal 2 both in coop with this).
Malidictus Jan 7, 2013 @ 11:32am 
Hmm... I see what you mean. Thank you, I'll look into that.
Malidictus Jan 9, 2013 @ 11:12am 
OK, I got it to work. Good LORD was my controller ass backwards! No wonder the game didn't recognise it - its right analogue stick was only bound to up and down, right analogue stick was inverted, buttons were jumbled around. It wasn't even READING some of my options.

Now I have another question, though: I only have ONE controller. How do I force the game to assign it to player 2? By default, it assigns to player 1, which is the same as my keyboard and mouse. How can I make it control Player 2?

And if that weren't bad enough, Portal 2 refuses to accept x360cd's settings. I set my gamepad up just fine in the emu, but Portal still refuses to acknowledge those settings and uses the pad's old settings as they were before I even messed with the emulator.
Last edited by Malidictus; Jan 9, 2013 @ 11:39am
Malidictus Jan 9, 2013 @ 2:13pm 
Even better - I managed to get x360cd to run for Darksiders... And it's terrible to play with a controller, by thumb may never forgive me... But the point is, it works for Darksiders yet NOT for Portal 2. Hmm...
-ZeTo- Jan 10, 2013 @ 10:04am 
I am not sure to understand the problem... You manage to get your pad work on portal 2 without x360ce but it was not fully fonctionnal, then you tried to use the emulator and nothing change ?

2 things you have to know :
- You must delete other xinput1_3.dll (the one in the bin folder, and there may be another one somewhere)
- If the emulator loads at startup you must ear a BEEP sound (it's in the option of the emulator and on by default)

To assign your gamepad to player 2, you have to edit x360ce.ini, find this section :
[Mappings] PAD1= PAD2= PAD3= PAD4=
Then cut and paste PAD1 to PAD2.
Malidictus Jan 10, 2013 @ 12:45pm 
Correct. Portal 2 recognises my controller on its own, but the controls are completely jumbled. The Right Analogue Stick has buttons bound to its axis and the "X" button exists nowhere on my controller. I can fix this in x360cd, but Portal seems to ignore it completely and keeps using the same controls. I got it to work with Darksiders, but not Portal 2.

So are you saying that I need to fish the xinput file out of Portals folders and delete it? Or replace it maybe? Won't that make the game fail to play without the emulator? Does the emulator need to run WHILE the game is running? I tried it both ways and it didn't seem to make a difference.

Also, there is a way to remap a gamepad to the second player from Portal itself. I believr it's joy_remap_player_for_controller1 2, but I'm not entirely sure. That's what the Internet suggests. There are joy_remap_player_for_controller commands for 1, 2, 3 and 4, actually suggesting four-player co-op, which I guess is an option that's generic to Source since Portal 2 doesn't support four players. I've not gotten it to work yet, but that's because I've not gotten my controller to have an X button yet.
Malidictus Jan 10, 2013 @ 12:59pm 
Actually, you were right - replacing the xinput file in the Portal 2 bin file did the trick. The controller now works as it should. It's still complete ass to control Portal with a gamepad, but I can now at least start a two-player split screen game. Well, provided I do the joy_remap_player_for_controller1 2, which basically tells the game to map controller 1 to player 2.

After that, I can use the sv_cheats and the in_forecursor toggle to swap between player 1 and player 2. If I were so inclined, I coud even use the cmd2 command to execute move orders as player 2 and probably bind keyboard shortcuts to that player, but I haven't bothered to try yet.

Thank you kindly! :)
Malidictus Jan 10, 2013 @ 2:08pm 
Here's another funny thing, though - when I replace the xinput DLL the game pad works, but the game's video is now limited to 30 FPS. Everywhere, not just in-game. Normally, Portal 2 gives me between 100-200 FPS in the menus, but with the DLL, I get 31-32. I know it's not a graphics overload issue, so there's something in what I'm doing that puts on a frame-limiter of some kind, and I'm so used to 60+ FPS it's REALLY noticeable.

Any idea what that might be?
-ZeTo- Jan 12, 2013 @ 11:26am 
I have no idea, hever had that kind of bug. Maybe you could try to delete x360ce.ini and make a new one...
Malidictus Jan 12, 2013 @ 12:24pm 
I don't know what was causing this, but I tried renaming my original DLL (I'm not gonna' delete it) and now the game pad reads just fine AND I don't get graphical slowdown. Strange, but it works so I'm not going to question it.

Thank you kindly for the suggestion.

One last thing - is it just me, or can I not play Workshop co-op in split screen? When I try to play regular co-op, I get the "or press X on controller 2" prompt, but I don't get that with Workshop titles. If I try to load up a Workshop title, it goes straight to picking a partner from my friends list...
Akion Jan 12, 2013 @ 1:41pm 
I'm facing the same problem. I've created a support ticket for this, let's see if we can get an official reply on this issue.
Malidictus Jan 13, 2013 @ 9:33am 
I finally realised what was causing my graphical slowdown. With the x360ce DLL in the Portal 2 folder, the game suffers from horrendous framerate UNTIL I plug in my controller. As soon as I do, the framerate returns to normal. I can unplug the controller afterwards, but if I run Portal 2 with the x360ce DLL without a controller plugged in, my framerate is terrible.

I have no idea why this is, but I was able to replicate it every time I tried.
< >
Showing 1-15 of 26 comments
Per page: 15 30 50

Portal 2 > General Discussions > Topic Details
Date Posted: Jan 7, 2013 @ 7:00am
Posts: 26