r=mkaply, a=blizzard
Code from jkobal to fix strange random timer trap
This commit is contained in:
mkaply%us.ibm.com 2000-11-30 15:52:24 +00:00
Родитель ab948d4512
Коммит fab4ad2b34
2 изменённых файлов: 2 добавлений и 8 удалений

Просмотреть файл

@ -153,13 +153,7 @@ UINT os2TimerGlue::SetTimer(HWND hWnd, UINT timerID, UINT aDelay)
// of what ID's we've used and what is still open. Hopefully these id's
// will be unique enough. IBM-AKR
ULONG ulTimerID = ((ULONG)timerID & TID_USERMAX);
// Doing this fixer stuff since most values will be double word aligned.
// This will help make it a little more unique by potentially giving us
// 3 times as many values. IBM-AKR
ULONG fixer = ((ULONG)timerID & 0x00018000) >> 15;
ulTimerID = (ulTimerID | fixer);
ULONG ulTimerID = ((ULONG)timerID % (TID_USERMAX - 1)) + 1;
ULONG newTimerID = WinStartTimer(NULLHANDLE, timerHWND, ulTimerID, aDelay);
return (UINT)newTimerID;

Просмотреть файл

@ -60,7 +60,7 @@ extern TID QueryCurrentTID(void);
typedef ULONG DWORD;
#define HEARTBEATTIMEOUT 50
#define HEARTBEATTIMERID 0x7ffe
#define HEARTBEATTIMERID TID_USERMAX
struct TIDKey : public nsVoidKey
{