Howto add support of joystick/gamepad.

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
xterminhate
Posts: 206
Joined: Thu Sep 01, 2005 9:26 pm
Location: France

Howto add support of joystick/gamepad.

Post by xterminhate »

Before coding my own wrapper Direct Input to Irrlicht, let me know if someone already succeed in adding joy/pad support.
Return to Irrlicht after years... I'm lovin it.
It's hard to be a Man !
Si vis pacem para belum
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Guest

Post by Guest »

Thanks. That's exactly what I was looking for. I will have to enhance the code....
Fice
Posts: 5
Joined: Tue Jun 20, 2006 7:01 pm

Well

Post by Fice »

Ok, this site helped me alot, but i have a big problem!

Is there any way to have fullscreen mode and joystick support?

If so, how can i do that?
NextDesign
Posts: 12
Joined: Mon Mar 20, 2006 11:10 pm
Contact:

Post by NextDesign »

Fice wrote:Is there any way to have fullscreen mode and joystick support?
Yes, change this variable to true:

Code: Select all

param.Fullscreen = false;
Fice
Posts: 5
Joined: Tue Jun 20, 2006 7:01 pm

Post by Fice »

No, i already have

Code: Select all

param.Fullscreen = true;
but the program is running in window mode.

I don't know where, but i read, that Irrlicht is ignoring this parameter if a window handle is set. That's why I'm asking.


Is there anyway to get the window handle, when irrlicht created the window? Which class creates the handle, perhaps I can change it, so i can have access to the handle
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Yes, the fullscreen member is ignored if you specify a window handle. You don't need to specify a window handle when you create the Irrlicht device. You can get the HWND from the SExposedVideoData that is returned by IVideoDriver::getExposedVideoData()...

Code: Select all

IrrlichtDevice* device = createDevice(video::EDT_DIRECT3D9, ...);
if (!device)
   return 0;

video::IVideoDriver* driver = device->getVideoDriver();
HWND hWnd = (HWND)driver->getExposedVideoData().D3D9.HWnd;
Travis
Post Reply