Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: [Solved] mDirectInput pointer is NULL  (Read 422 times)

Kalith

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 5
    • View Profile
[Solved] mDirectInput pointer is NULL
« on: September 09, 2010, 05:20:18 PM »

Hi !

I've been experiencing a strange problem these days, and I'm not sure what caused it...
OIS used to work perfectly, but now I can't seem to be able to initialize it. When I pass the window handle etc to the InputManager, I get a crash. Debugging leads to :
Code: [Select]
void Win32InputManager::_enumerateDevices()... where mDirectInput is NULL :o
With further investigation, it seems that DirectInput8Create fails silently : the returned HRESULT doesn't indicate failure, but the mDirectInput pointer is not updated.

I've tried both the "old" OIS version I had on my computer for a time (1.2.0 still), and the latest SVN version.
I've tried both my project and the provided demos.

Everything fails.

I'm using MinGW's GCC 4.4.0 on Windows XP Pro.

Do you know what can be causing this ?
« Last Edit: September 10, 2010, 05:33:08 AM by Kalith »
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Re: mDirectInput pointer is NULL
« Reply #1 on: September 09, 2010, 05:37:08 PM »

Perhaps it is a buffer issue on your client side app that just leads to errors when you call into OIS. Such as null pointer accesses, double free's etc.

Logged

Kalith

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 5
    • View Profile
Re: mDirectInput pointer is NULL
« Reply #2 on: September 10, 2010, 04:19:24 AM »

That's what I first thought, but how comes the OIS Console demo crashes as well ?
Logged

Kalith

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 5
    • View Profile
Re: mDirectInput pointer is NULL
« Reply #3 on: September 10, 2010, 05:32:57 AM »

I tried to link with dinput8.lib and xguid.lib from the DX SDK (instead of using .a libs files from MinGW), and it works like a charm.
Why did it stop working, I still don't know...
Problem solved :)
Logged