Sign in to follow this  
BloodLust666

Release mode

Recommended Posts

How come whenever i compile my project in release mode, none of my arrow keys work. the space bar and esc key work though. it seesm like the DirectInput just doesn't acquire them or something...

Share this post


Link to post
Share on other sites
Yeah that's a good first thing to try.

Putting important code inside a #ifdef _DEBUG statement is also a bad idea, but that's unlikely to be the cause ;)

Share this post


Link to post
Share on other sites
I have the exact same problem. Strange. I've learned that it's not very fun to debug release code.

Please let me know if you find a solution. Thanks.

Share this post


Link to post
Share on other sites
When debuging in release mode in VC you can enable "Generate debug info", if you set it to use a program database you executable will not be affected (the debug information is put in a separate file).

Share this post


Link to post
Share on other sites
Have you come up with a solution yet?

I'm still having this problem, and I don't have anything input-related inside a #ifdef _DEBUG statment or anything like that :)

Share this post


Link to post
Share on other sites
Quote:
Original post by EvilKnuckles666
oh and i just checked, i never define "_DEBUG".. so i don't know y i keep getting errors or whatever..

Hi Evil,
Depending on how you generate your base project, "_DEBUG" can be defined for you using a "Debug build".
For Instance if you are using Visual Studio 2003 and you have debug build selected then look at:
Select "project" on main menu bar, then "project name" properties.
In the properties dialog, go to
Configuration properties->C\C++->preprocessor.
In that section, check to see if _DEBUG is defined in "Preprocessor definitions".

At the moment, I would go with John Bolton's statement: "The usual reason for different behavior between release and debug configurations is uninitialized variables."

Could you post your code which reads key state, and any code which initializes any variables used in that code?

HTH,
Cambo_frog

Share this post


Link to post
Share on other sites
Another possible cause might be having side-effects in an assert. So:

assert( pollKeyBoardEvents() != false );
will not be compiled in a release build, and give you weird behaviour.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this