diff --git a/docs/rh-log.txt b/docs/rh-log.txt index c7862c39b..d7cca2511 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,9 @@ +February 13, 2008 +- Removed most checks on vid_hw2d/test2d. This now gets checked only once per + frame to avoid the remote possibility that it could change during the middle + of drawing the frame and cause strange things to happen. +- Renamed test2d to vid_hw2d. + February 12, 2008 - Added the ACS script type "return". These are executed by players who return to a map they've previously been to. This is analagous to enter scripts, but diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index 93cee3a34..18c3c4b8a 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -208,7 +208,7 @@ extern cycle_t BlitCycles; // PUBLIC DATA DEFINITIONS ------------------------------------------------- -CUSTOM_CVAR(Bool, test2d, true, CVAR_NOINITCALL) +CUSTOM_CVAR(Bool, vid_hw2d, true, CVAR_NOINITCALL) { BorderNeedRefresh = SB_state = screen->GetPageCount(); } @@ -747,7 +747,8 @@ bool D3DFB::Lock (bool buffered) { return false; } - + assert (!In2D); + Accel2D = vid_hw2d; Buffer = MemBuffer; return false; } @@ -944,7 +945,7 @@ void D3DFB::Draw3DPart(bool copy3d) if (copy3d) { FBVERTEX verts[4]; - CalcFullscreenCoords(verts, test2d, false, FlashColor0, FlashColor1); + CalcFullscreenCoords(verts, Accel2D, false, FlashColor0, FlashColor1); D3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLEFAN, 2, verts, sizeof(FBVERTEX)); } } @@ -1114,7 +1115,7 @@ void D3DFB::GetScreenshotBuffer(const BYTE *&buffer, int &pitch, ESSType &color_ { D3DLOCKED_RECT lrect; - if (!test2d) + if (!Accel2D) { Super::GetScreenshotBuffer(buffer, pitch, color_type); return; @@ -2071,7 +2072,7 @@ bool D3DPal::Update() bool D3DFB::Begin2D(bool copy3d) { - if (!test2d) + if (!Accel2D) { return false; } diff --git a/src/win32/fb_d3d9_wipe.cpp b/src/win32/fb_d3d9_wipe.cpp index 5caa9b297..a6adab9ee 100644 --- a/src/win32/fb_d3d9_wipe.cpp +++ b/src/win32/fb_d3d9_wipe.cpp @@ -108,8 +108,6 @@ private: // EXTERNAL DATA DECLARATIONS ---------------------------------------------- -EXTERN_CVAR(Bool, test2d) - // PRIVATE DATA DEFINITIONS ------------------------------------------------ // PUBLIC DATA DEFINITIONS ------------------------------------------------- @@ -138,7 +136,7 @@ bool D3DFB::WipeStartScreen(int type) IDirect3DSurface9 *tsurf; D3DSURFACE_DESC desc; - if (!test2d) + if (!Accel2D) { return Super::WipeStartScreen(type); } @@ -202,7 +200,7 @@ bool D3DFB::WipeStartScreen(int type) void D3DFB::WipeEndScreen() { - if (!test2d) + if (!Accel2D) { Super::WipeEndScreen(); return; @@ -252,7 +250,7 @@ void D3DFB::WipeEndScreen() bool D3DFB::WipeDo(int ticks) { - if (!test2d) + if (!Accel2D) { return Super::WipeDo(ticks); } @@ -323,7 +321,7 @@ void D3DFB::WipeCleanup() } FinalWipeScreen = NULL; GatheringWipeScreen = false; - if (!test2d) + if (!Accel2D) { Super::WipeCleanup(); return;