Skip to content

Commit 30cfbf0

Browse files
committed
Disable DEBUG properly
1 parent be56727 commit 30cfbf0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

fix_scrollbug.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ SHORT WINAPI Mine_GetKeyState(int nVirtKey)
104104
{
105105
SHORT ret;
106106
ret = Real_GetKeyState(nVirtKey);
107-
#ifdef DEBUG
107+
#if DEBUG
108108
printf("getkeystate(%d) - detoured - result 0x%04x\r\n", nVirtKey, ret);
109109
#endif
110110
if (ret & ~0x8001) {
111-
#ifdef DEBUG
111+
#if DEBUG
112112
printf("bad flags are set in GetKeyState(%d): 0x%04x, fixing them for you to save you!!!111111111111111111111\r\n", nVirtKey, ret);
113113
#endif
114114
ret &= 0x8001;
@@ -123,25 +123,25 @@ BOOL WINAPI Mine_GetKeyboardState(PBYTE lpKeyState)
123123
BOOL ret;
124124
int i;
125125
ret = Real_GetKeyboardState(lpKeyState);
126-
#ifdef DEBUG
126+
#if DEBUG
127127
printf("GetKeyboardState() - detoured\r\n");
128128
#endif
129129
if (lpKeyState == NULL) {
130-
#ifdef DEBUG
130+
#if DEBUG
131131
printf("GetKeyboardState() - buffer is nullptr\r\n");
132132
#endif
133133
return ret;
134134
}
135135
if (ret == FALSE) {
136-
#ifdef DEBUG
136+
#if DEBUG
137137
printf("GetKeyboardState() - failed\r\n");
138138
#endif
139139
return ret;
140140
}
141141

142142
for (i = 255; i >= 0; i--) {
143143
if (lpKeyState[i] & ~0x81) {
144-
#ifdef DEBUG
144+
#if DEBUG
145145
printf("GetKeyboardState(): bad flag in lpKeyState[%d]: 0x%02x, fixing it for you to save you!!1111111\r\n", i, lpKeyState[i] & 0xff);
146146
#endif
147147
lpKeyState[i] &= 0x81;

0 commit comments

Comments
 (0)