isle
isle copied to clipboard
Calls to A variants should be agnostic instead
I see lots of calls that are point to the ASCII variant of WinAPI methods, in the actual source they would likely have been for the generic version, the Windows headers have defines that will pick either the Unicode or ASCII variant at build time depending on the target. Cleaning this up will:
- likely make it closer to the original
- make it more portable
- easier to implement a substitution
See for an example: https://github.com/isledecomp/isle/blob/fff2021bb552de98630670c538062dd98565d4d3/LEGO1/lego/legoomni/src/video/legovideomanager.cpp#L401
This is roughly what the windows header that sorts this out looks like, meaning that you can't tell from the compiled binary if the source had CreateFontA or CreateFont:
#ifdef WIN_NT
#define CreateFont CreateFontW
#else
#define CreateFont CreateFontA
#endif