Original Post
🔒 Locked
directinput - release mode
Advertisement
This is a problem which is appearing quite frequently on these pages. Basically, you will be storing the input data in a ''char'' datatype instead of an ''unsigned char''. This means the most significant bit is being interpreted as a sign-bit, giving you the wrong value (a negative value) when it is set.
So, changing the variable/array the data is written to into an unsigned char will fix it.
Cheers,
John
So, changing the variable/array the data is written to into an unsigned char will fix it.
Cheers,
John
thanks!
I noticed there where something wrong since I got a compile warning, but I just changed the char to int..does it matter? is char 32bit? (I may just have been miss informed but I thought I should always try to use 32bits datatypes for (maybe a very minor) increase in speed)
I noticed there where something wrong since I got a compile warning, but I just changed the char to int..does it matter? is char 32bit? (I may just have been miss informed but I thought I should always try to use 32bits datatypes for (maybe a very minor) increase in speed)
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement