DXGL r648 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r647‎ | r648 | r649 >
Date:00:19, 25 January 2016
Author:admin
Status:new
Tags:
Comment:
Add hWnd check in clippers.
Add no clip list check in Blt
Better explain exclusive and borderless modes in help file.
Modified paths:
  • /Help/configuration.htm (modified) (history)
  • /ddraw/glDirectDrawClipper.cpp (modified) (history)
  • /ddraw/glDirectDrawSurface.cpp (modified) (history)

Diff [purge]

Index: Help/configuration.htm
@@ -88,9 +88,10 @@
8989 <h2><a name="fullmode">Fullscreen window mode</a></h2>
9090 Sets the mode to be used when creating a window for fullscreen mode.
9191 <h3>Exclusive fullscreen</h3>
92 - Sets the display to fullscreen mode. For Windows Vista and greater, causes the Windows graphics to be temporarily suspended, giving the GPU exclusive control of the screen. This mode is the default.
 92+ Sets the display to fullscreen mode. For Windows Vista and greater, causes the Windows graphics to be temporarily suspended, giving the GPU exclusive control of the screen. This mode is the default and may have the best fullscreen performance.
9393 <h3>Non-exclusive fullscreen</h3>
9494 Creates a window that fills the screen but tells the display driver not to take exclusive control of the screen. This is also known as borderless windowed mode. Try this mode if the application mixes DirectDraw with GDI and some graphics elements are missing.
 95+ In Windows Vista and greater, this mode may have reduced performance, increased lag, or choppy graphics.
9596 <h3>Non-resizable window</h3>
9697 Forces the fullscreen application to display in a floating window. Please note that some applications may capture the mouse and thus may cause compatibility issues.
9798 <h3>Resizable window</h3>
Index: ddraw/glDirectDrawClipper.cpp
@@ -133,7 +133,7 @@
134134 TRACE_ENTER(4,14,This,26,lpRect,14,lpClipList,14,lpdwSize);
135135 if(!This) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
136136 if (!lpdwSize) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
137 - if (!This->clipsize)
 137+ if (!This->clipsize || This->hWnd)
138138 {
139139 if (!This->hWnd) TRACE_RET(HRESULT, 23, DDERR_NOCLIPLIST);
140140 hdc = GetDC(This->hWnd);
Index: ddraw/glDirectDrawSurface.cpp
@@ -826,6 +826,7 @@
827827 {
828828 if (!clipper->hWnd)
829829 {
 830+ if (!clipper->clipsize) TRACE_RET(HRESULT, 23, DDERR_NOCLIPLIST);
830831 if (!stencil)
831832 {
832833 stencil = (glTexture*)malloc(sizeof(glTexture));