DXGL r258 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r257‎ | r258 | r259 >
Date:00:20, 6 September 2012
Author:admin
Status:new
Tags:
Comment:
Fix AddAttachedSurface.
Release 0.4.0
Modified paths:
  • /ReadMe.txt (modified) (history)
  • /common/releasever.h (modified) (history)
  • /ddraw/glDirectDrawSurface.cpp (modified) (history)

Diff [purge]

Index: ReadMe.txt
@@ -1,4 +1,4 @@
2 -DXGL 0.3.2
 2+DXGL 0.4.0
33 http://www.williamfeely.info/wiki/DXGL
44
55 == Introduction ==
Index: common/releasever.h
@@ -3,8 +3,8 @@
44 #define __VERSION_H
55
66 #define DXGLMAJORVER 0
7 -#define DXGLMINORVER 3
8 -#define DXGLPOINTVER 2
 7+#define DXGLMINORVER 4
 8+#define DXGLPOINTVER 0
99
1010 #define STR2(x) #x
1111 #define STR(x) STR2(x)
Index: ddraw/glDirectDrawSurface.cpp
@@ -1213,6 +1213,7 @@
12141214 HRESULT WINAPI glDirectDrawSurface1::AddAttachedSurface(LPDIRECTDRAWSURFACE lpDDSAttachedSurface)
12151215 {
12161216 if(!this) return DDERR_INVALIDOBJECT;
 1217+ if(!lpDDSAttachedSurface) return DDERR_INVALIDPARAMS;
12171218 return glDDS7->AddAttachedSurface(((glDirectDrawSurface1*)lpDDSAttachedSurface)->GetDDS7());
12181219 }
12191220 HRESULT WINAPI glDirectDrawSurface1::AddOverlayDirtyRect(LPRECT lpRect)
@@ -1439,6 +1440,7 @@
14401441 HRESULT WINAPI glDirectDrawSurface2::AddAttachedSurface(LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface)
14411442 {
14421443 if(!this) return DDERR_INVALIDOBJECT;
 1444+ if(!lpDDSAttachedSurface) return DDERR_INVALIDPARAMS;
14431445 return glDDS7->AddAttachedSurface(((glDirectDrawSurface2*)lpDDSAttachedSurface)->GetDDS7());
14441446 }
14451447 HRESULT WINAPI glDirectDrawSurface2::AddOverlayDirtyRect(LPRECT lpRect)
@@ -1684,6 +1686,7 @@
16851687 HRESULT WINAPI glDirectDrawSurface3::AddAttachedSurface(LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface)
16861688 {
16871689 if(!this) return DDERR_INVALIDOBJECT;
 1690+ if(!lpDDSAttachedSurface) return DDERR_INVALIDPARAMS;
16881691 return glDDS7->AddAttachedSurface(((glDirectDrawSurface3*)lpDDSAttachedSurface)->GetDDS7());
16891692 }
16901693 HRESULT WINAPI glDirectDrawSurface3::AddOverlayDirtyRect(LPRECT lpRect)