diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 07acffe26..908aa2aa7 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,15 @@ -August 6, 2009 +August 7, 2009 +- Changed the DWORDs in dobject.h into uint32s, since they were preventing + edit-and-continue from working for the Windows source files. +- When a WM_KEYDOWN message is received with VK_PROCESSKEY, the scan key is + now used to retrieve the real virtual key for the message. This fixes the + previous issue that caused me to completely disable the IME. +- Removed the code that disables the IME, since it also disables the ability + to switch between keyboard layouts that do not use an IME. +- TranslateMessage() is no longer called if GUI capture mode is off, so no + dead key processing is performed until it might be useful. + +August 6, 2009 - Added player MugShotMaxHealth property. Negative values use the player's max health as the mug shot max health, zero uses 100 as the mug shot max health, and positive values used directly as the mug shot max health. diff --git a/src/dobject.h b/src/dobject.h index 0176f587c..39ccbc576 100644 --- a/src/dobject.h +++ b/src/dobject.h @@ -90,11 +90,11 @@ enum EMetaType class FMetaData { private: - FMetaData (EMetaType type, DWORD id) : Type(type), ID(id) {} + FMetaData (EMetaType type, uint32 id) : Type(type), ID(id) {} FMetaData *Next; EMetaType Type; - DWORD ID; + uint32 ID; union { int Int; @@ -113,19 +113,19 @@ public: ~FMetaTable(); FMetaTable &operator = (const FMetaTable &other); - void SetMetaInt (DWORD id, int parm); - void SetMetaFixed (DWORD id, fixed_t parm); - void SetMetaString (DWORD id, const char *parm); // The string is copied + void SetMetaInt (uint32 id, int parm); + void SetMetaFixed (uint32 id, fixed_t parm); + void SetMetaString (uint32 id, const char *parm); // The string is copied - int GetMetaInt (DWORD id, int def=0) const; - fixed_t GetMetaFixed (DWORD id, fixed_t def=0) const; - const char *GetMetaString (DWORD id) const; + int GetMetaInt (uint32 id, int def=0) const; + fixed_t GetMetaFixed (uint32 id, fixed_t def=0) const; + const char *GetMetaString (uint32 id) const; - FMetaData *FindMeta (EMetaType type, DWORD id) const; + FMetaData *FindMeta (EMetaType type, uint32 id) const; private: FMetaData *Meta; - FMetaData *FindMetaDef (EMetaType type, DWORD id); + FMetaData *FindMetaDef (EMetaType type, uint32 id); void FreeMeta (); void CopyMeta (const FMetaTable *other); }; @@ -249,7 +249,7 @@ namespace GC extern DObject *Root; // Current white value for potentially-live objects. - extern DWORD CurrentWhite; + extern uint32 CurrentWhite; // Current collector state. extern EGCState State; @@ -264,7 +264,7 @@ namespace GC extern int StepMul; // Current white value for known-dead objects. - static inline DWORD OtherWhite() + static inline uint32 OtherWhite() { return CurrentWhite ^ OF_WhiteBits; } @@ -446,7 +446,7 @@ private: public: DObject *ObjNext; // Keep track of all allocated objects DObject *GCNext; // Next object in this collection list - DWORD ObjectFlags; // Flags for this object + uint32 ObjectFlags; // Flags for this object public: DObject (); diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp index c77e445ac..48aa2b4d8 100644 --- a/src/win32/i_input.cpp +++ b/src/win32/i_input.cpp @@ -207,6 +207,12 @@ bool GUIWndProcHook(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, LRESU if (GetKeyState(VK_SHIFT) & 0x8000) ev.data3 |= GKM_SHIFT; if (GetKeyState(VK_CONTROL) & 0x8000) ev.data3 |= GKM_CTRL; if (GetKeyState(VK_MENU) & 0x8000) ev.data3 |= GKM_ALT; + if (wParam == VK_PROCESSKEY) + { // Use the scan code to determine the real virtual-key code. + // ImmGetVirtualKey() will supposedly do this, but it just returns + // VK_PROCESSKEY again. + wParam = MapVirtualKey((lParam >> 16) & 255, 1); + } if ( (ev.data1 = MapVirtualKey(wParam, 2)) ) { D_PostEvent(&ev); @@ -702,7 +708,10 @@ void I_GetEvent () exit (mess.wParam); if (EAXEditWindow == 0 || !IsDialogMessage (EAXEditWindow, &mess)) { - TranslateMessage (&mess); + if (GUICapture) + { + TranslateMessage (&mess); + } DispatchMessage (&mess); } } diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index 813769c1f..6bc9e2f5f 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -917,18 +917,6 @@ 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));