Original Post
🔒 Locked
DIRECTINPUT_VERSION?
Advertisement
Hi,
Yes, its perfectly fine to not define your DIRECTINPUT_VERSION, the compiler just defaults to whatever''s defined in the dinput.h header...
This is whats in there that causes the warning... This is my DirectX 8 version...
#define DIRECTINPUT_HEADER_VERSION 0x0800
#ifndef DIRECTINPUT_VERSION
#define DIRECTINPUT_VERSION DIRECTINPUT_HEADER_VERSION
#pragma message(__FILE__ ": DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800")
#endif
Breifly translated, if you don''t define it (#ifndef) it will define it for you to version 0x0800. Then there''s the little #pragma message thats spits out the warning message, giving you the file name and all...
Thats all it is.
If you want to use a different version, define DIRECTINPUT_VERSION differently...
Hope it helps.
Destroyer
Yes, its perfectly fine to not define your DIRECTINPUT_VERSION, the compiler just defaults to whatever''s defined in the dinput.h header...
This is whats in there that causes the warning... This is my DirectX 8 version...
#define DIRECTINPUT_HEADER_VERSION 0x0800
#ifndef DIRECTINPUT_VERSION
#define DIRECTINPUT_VERSION DIRECTINPUT_HEADER_VERSION
#pragma message(__FILE__ ": DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800")
#endif
Breifly translated, if you don''t define it (#ifndef) it will define it for you to version 0x0800. Then there''s the little #pragma message thats spits out the warning message, giving you the file name and all...
Thats all it is.
If you want to use a different version, define DIRECTINPUT_VERSION differently...
Hope it helps.
Destroyer
quote:
Original post by TroneX
I don''t remember where I once read it, but MS explicitly says, that you should define the version of DI you want to use before you include the dinput.h the first time.
Buy BomberFUN online now for only EUR/USD 19,95 at http://www.bomberfun.com
Yes. The reason is that an upgrade to DirectX might include a new version of DirectInput. If you don''t explicitly define the version you want, you will automatically get the new one on recompile. This could result in lots of broken code. Explicitly defining the version ensures that, regardless of the DirectX version currently installed, you will get the interface version your code expects.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement