Jump to content
  • Advertisement
Sign in to follow this  
ProgrammerZ

Raw input blues

This topic is 3797 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello.... Anyway, I was coding an input module for my engine, and I was trying to add support for raw input. However, the compiler said that the identifier RAWINPUTDEVICE was not defined. After a little poking around, I found the definition of the RAWINPUTDEVICE struct in Winuser.h. I also noticed that there was a section: #if (_WIN32_WINNT >= 0x0501) ... #endif All the raw input stuff was within this #if. However, the text was gray (I'm using Visual C++, by the way), which means the #if failed. Does this mean that I'd have to upgrade my computer to use raw input? Please help! --ProgrammerZ

Share this post


Link to post
Share on other sites
Advertisement
So, would I code something like this?

#define _WIN32_WINNT 0x0501

#include <windows.h>
#include <windowsx.h>

Thanks for the advice, by the way.

Share this post


Link to post
Share on other sites
You'd probably want to toss it in your project settings -- you'd have to #define it before every #include otherwise, including those #includes made by other libraries in headers you're using.

But yes, you've got the idea.

Share this post


Link to post
Share on other sites
Quote:
Original post by MaulingMonkey
You'd probably want to toss it in your project settings

Um, not to sound totally decadent, but how exactly would I do this? (I'm still learning all the ins and outs of Visual C++.)

Share this post


Link to post
Share on other sites
Right click on your project -> properties -> C++ settings -> Preprocessor settings
(can't remember the exact names, but something like that)

You can make project-wide #defines there

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!