diff --git a/Source/player.cpp b/Source/player.cpp index 73d6da155..4d9c832b3 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -2068,7 +2068,7 @@ void StartNewLvl(int pnum, int fom, int lvl) if (pnum == myplr) { plr[pnum]._pmode = PM_NEWLVL; plr[pnum]._pInvincible = TRUE; - PostMessage(ghMainWnd, fom, 0, 0); + PostMessage(fom, 0, 0); if (gbMaxPlayers > 1) { NetSendCmdParam2(TRUE, CMD_NEWLVL, fom, lvl); } @@ -2094,7 +2094,7 @@ void RestartTownLvl(int pnum) if (pnum == myplr) { plr[pnum]._pmode = PM_NEWLVL; plr[pnum]._pInvincible = TRUE; - PostMessage(ghMainWnd, WM_DIABRETOWN, 0, 0); + PostMessage(WM_DIABRETOWN, 0, 0); } } @@ -2114,7 +2114,7 @@ void StartWarpLvl(int pnum, int pidx) SetCurrentPortal(pidx); plr[pnum]._pmode = PM_NEWLVL; plr[pnum]._pInvincible = TRUE; - PostMessage(ghMainWnd, WM_DIABWARPLVL, 0, 0); + PostMessage(WM_DIABWARPLVL, 0, 0); } } diff --git a/SourceS/miniwin/misc.h b/SourceS/miniwin/misc.h index 7180fd083..050506d15 100644 --- a/SourceS/miniwin/misc.h +++ b/SourceS/miniwin/misc.h @@ -113,7 +113,6 @@ typedef struct tagSIZE { } SIZE; typedef struct tagMSG { - HWND hwnd; UINT message; WPARAM wParam; LPARAM lParam; @@ -199,7 +198,7 @@ WINBOOL WINAPI PeekMessageA(LPMSG lpMsg); WINBOOL WINAPI TranslateMessage(const MSG *lpMsg); LRESULT WINAPI DispatchMessageA(const MSG *lpMsg); -WINBOOL WINAPI PostMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +WINBOOL WINAPI PostMessageA(UINT Msg, WPARAM wParam, LPARAM lParam); bool SpawnWindow(LPCSTR lpWindowName, int nWidth, int nHeight); diff --git a/SourceX/miniwin/misc_msg.cpp b/SourceX/miniwin/misc_msg.cpp index 3d2b52802..34c7cff5d 100644 --- a/SourceX/miniwin/misc_msg.cpp +++ b/SourceX/miniwin/misc_msg.cpp @@ -652,7 +652,7 @@ WINBOOL TranslateMessage(const MSG *lpMsg) #endif // XXX: This does not add extended info to lParam - PostMessageA(lpMsg->hwnd, DVL_WM_CHAR, key, 0); + PostMessageA(DVL_WM_CHAR, key, 0); } } @@ -690,15 +690,12 @@ LRESULT DispatchMessageA(const MSG *lpMsg) assert(CurrentProc); // assert(CurrentProc == GM_Game); - return CurrentProc(lpMsg->hwnd, lpMsg->message, lpMsg->wParam, lpMsg->lParam); + return CurrentProc(NULL, lpMsg->message, lpMsg->wParam, lpMsg->lParam); } -WINBOOL PostMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) +WINBOOL PostMessageA(UINT Msg, WPARAM wParam, LPARAM lParam) { - assert(hWnd == 0); - MSG msg; - msg.hwnd = hWnd; msg.message = Msg; msg.wParam = wParam; msg.lParam = lParam;