- Fixed: Polyobjects are serialized before players, which means that a call
to PO_MovePolyobj() from P_SerializePolyobjs() for a crushing polyobject that touches a player actor will not have a valid actor->player->mo chain for P_DamageMobj and crash if it happens to touch the player. Since the polyobject was presumably in a good spot when the game was saved, we can just skip this step entirely and let it take care of itself the next time it moves (by which time, the players will be valid). - Fixed: When transitioning from fullscreen to windowed mode with D3DFB, the window kept the WS_EX_TOPMOST style. - Slight correctness fix: When in fullscreen, the window should have WS_POPUP style. - Added a NULL target check to P_SpawnMissileXYZ(), A_DemonAttack1(), A_DemonAttack2_1(), and A_DemonAttack2_2(). SVN r384 (trunk)
This commit is contained in:
parent
93b18c3bfa
commit
48bb782b19
8 changed files with 77 additions and 41 deletions
|
|
@ -295,9 +295,9 @@ bool D3DFB::CreateResources ()
|
|||
{
|
||||
if (!Windowed)
|
||||
{
|
||||
ShowWindow (Window, SW_SHOW);
|
||||
// Remove the window border in fullscreen mode
|
||||
SetWindowLongPtr (Window, GWL_STYLE, WS_POPUP|WS_VISIBLE|WS_SYSMENU);
|
||||
ShowWindow (Window, SW_SHOW);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -309,10 +309,19 @@ bool D3DFB::CreateResources ()
|
|||
VidResizing = true;
|
||||
// Make sure the window has a border in windowed mode
|
||||
SetWindowLongPtr (Window, GWL_STYLE, WS_VISIBLE|WS_OVERLAPPEDWINDOW);
|
||||
if (!SetWindowPos (Window, NULL, 0, 0, sizew, sizeh,
|
||||
SWP_DRAWFRAME | SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOZORDER))
|
||||
if (GetWindowLong (Window, GWL_EXSTYLE) & WS_EX_TOPMOST)
|
||||
{
|
||||
LOG1 ("SetWindowPos failed because %08lx\n", GetLastError());
|
||||
// Direct3D 9 will apparently add WS_EX_TOPMOST to fullscreen windows,
|
||||
// and removing it is a little tricky. Using SetWindowLongPtr to clear it
|
||||
// will not do the trick, but sending the window behind everything will.
|
||||
SetWindowPos (Window, HWND_BOTTOM, 0, 0, sizew, sizeh,
|
||||
SWP_DRAWFRAME | SWP_NOCOPYBITS | SWP_NOMOVE);
|
||||
SetWindowPos (Window, HWND_TOP, 0, 0, 0, 0, SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOSIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetWindowPos (Window, NULL, 0, 0, sizew, sizeh,
|
||||
SWP_DRAWFRAME | SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOZORDER);
|
||||
}
|
||||
VidResizing = false;
|
||||
ShowWindow (Window, SW_SHOWNORMAL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue