From 3786ced96e8df95fce0ebafd8fa64c93fde2e92a Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 4 Jul 2009 01:47:28 +0000 Subject: [PATCH] - ZDoom now disables the input method editor, since it has no east-Asian support, and having it open a composition window when you're only expecting a single keypress is not so good. SVN r1705 (trunk) --- docs/rh-log.txt | 3 +++ src/win32/i_main.cpp | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 5a7ba1163..15f610f24 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ July 3, 2009 +- ZDoom now disables the input method editor, since it has no east-Asian + support, and having it open a composition window when you're only expecting + a single keypress is not so good. - Fixed: Setting intermissioncounter to false in gameinfo drew all the stats at once, instead of revealing them one line at a time. - Fixed: The border definition in MAPINFO's gameinfo block used extra braces. diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index a1264c000..813769c1f 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -3,7 +3,7 @@ ** System-specific startup code. Eventually calls D_DoomMain. ** **--------------------------------------------------------------------------- -** Copyright 1998-2007 Randy Heit +** Copyright 1998-2009 Randy Heit ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without @@ -917,6 +917,18 @@ void DoMain (HINSTANCE hInstance) width = 512; height = 384; + // Disable the input method editor (not present in Win95/NT4) + HMODULE imm32 = LoadLibrary("imm32.dll"); + if (imm32 != NULL) + { + BOOL (WINAPI *DisableIME)(DWORD) = (BOOL(WINAPI *)(DWORD))GetProcAddress(imm32, "ImmDisableIME"); + if (DisableIME != NULL) + { + DisableIME(0); + } + FreeLibrary(imm32); + } + // Many Windows structures that specify their size do so with the first // element. DEVMODE is not one of those structures. memset (&displaysettings, 0, sizeof(displaysettings));