tapio / rlutil

C and C++ utilities for cross-platform console roguelike game creation.
http://tapio.github.com/rlutil/
229 stars 42 forks source link

fix error when UNICODE defined #49

Open TheKrush opened 8 years ago

TheKrush commented 8 years ago

Code doesn't currently compile if UNICODE is defined, this fixes that

nabijaczleweli commented 8 years ago

Hello Windows my old friend...

sigh :+1:

ardi69 commented 7 years ago

a better choice (i think):

#ifdef UNICODE
        WriteConsoleOutputCharacterA(hConsoleOutput, str, len, csbi.dwCursorPosition, &numberOfCharsWritten);
#else // UNICODE
        WriteConsoleOutputCharacter(hConsoleOutput, str, len, csbi.dwCursorPosition, &numberOfCharsWritten);
#endif // UNICODE
hashar commented 6 years ago

@TheKrush can you amend your commit based on @ardi69 suggestion? Merely add #ifdef UNICODE :)

hashar commented 6 years ago

There is also #48

TheKrush commented 6 years ago

Done.

MangaD commented 5 years ago

There is no reason to use #ifdef UNICODE, because when UNICODE isn't defined, WriteConsoleOutputCharacter simply calls WriteConsoleOutputCharacterA.