- switched the Windows backend to use the Windows Unicode API.
With localization for non-Latin languages on the support list the multibyte API doesn't cut it anymore. It neither can handle system text output outside the local code page nor can an ANSI window receive text input outside its own code page. Similar problems exist for file names. With the multibyte API it is impossible to handle any file containing characters outside the active local code page. So as of now, everything that may pass along some Unicode text will use the Unicode API with some text conversion functions. The only places where calls to the multibyte API were left are those where known string literals are passed or where the information is not used for anything but comparing it to other return values from the same API.
This commit is contained in:
parent
8efc3188b9
commit
868ac5adf8
30 changed files with 325 additions and 228 deletions
|
|
@ -553,7 +553,7 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
if (message == WM_WTSSESSION_CHANGE && lParam == (LPARAM)SessionID)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
OutputDebugString ("SessionID matched\n");
|
||||
OutputDebugStringA ("SessionID matched\n");
|
||||
#endif
|
||||
// When using fast user switching, XP will lock a session before
|
||||
// disconnecting it, and the session will be unlocked before reconnecting it.
|
||||
|
|
@ -601,7 +601,7 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
#ifdef _DEBUG
|
||||
char foo[256];
|
||||
mysnprintf (foo, countof(foo), "Session Change: %ld %d\n", lParam, wParam);
|
||||
OutputDebugString (foo);
|
||||
OutputDebugStringA (foo);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
|
@ -640,7 +640,7 @@ bool I_InitInput (void *hwnd)
|
|||
FindRawInputFunctions();
|
||||
|
||||
// Try for DirectInput 8 first, then DirectInput 3 for NT 4's benefit.
|
||||
DInputDLL = LoadLibrary("dinput8.dll");
|
||||
DInputDLL = LoadLibraryA("dinput8.dll");
|
||||
if (DInputDLL != NULL)
|
||||
{
|
||||
typedef HRESULT (WINAPI *blah)(HINSTANCE, DWORD, REFIID, LPVOID *, LPUNKNOWN);
|
||||
|
|
@ -666,7 +666,7 @@ bool I_InitInput (void *hwnd)
|
|||
{
|
||||
FreeLibrary(DInputDLL);
|
||||
}
|
||||
DInputDLL = LoadLibrary ("dinput.dll");
|
||||
DInputDLL = LoadLibraryA ("dinput.dll");
|
||||
if (DInputDLL == NULL)
|
||||
{
|
||||
I_FatalError ("Could not load dinput.dll: %08lx", GetLastError());
|
||||
|
|
@ -967,7 +967,7 @@ static void FindRawInputFunctions()
|
|||
{
|
||||
if (!norawinput)
|
||||
{
|
||||
HMODULE user32 = GetModuleHandle("user32.dll");
|
||||
HMODULE user32 = GetModuleHandleA("user32.dll");
|
||||
|
||||
if (user32 == NULL)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue