DXGL r34 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r33
|
r34
|
r35
>
Date:
02:44, 22 December 2011
Author:
admin
Status:
new
Tags:
Comment:
Fix IDirectDraw::PageLock and PageUnlock functions. Set DDCAPS2_NOPAGELOCKREQUIRED
Modified paths:
/ddraw/glDirectDraw.cpp
(modified) (
history
)
/ddraw/glDirectDrawSurface.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirectDraw.cpp
—
—
@@ -776,7 +776,7 @@
777
777
else ERR(DDERR_INVALIDPARAMS);
778
778
ddCaps.dwCaps = DDCAPS_BLT | DDCAPS_BLTCOLORFILL | DDCAPS_BLTSTRETCH |
779
779
DDCAPS_GDI | DDCAPS_PALETTE;
780
- ddCaps.dwCaps2 = DDCAPS2_CANRENDERWINDOWED | DDCAPS2_WIDESURFACES;
780
+ ddCaps.dwCaps2 = DDCAPS2_CANRENDERWINDOWED | DDCAPS2_WIDESURFACES | DDCAPS2_NOPAGELOCKREQUIRED;
781
781
ddCaps.dwFXCaps = DDFXCAPS_BLTSHRINKX | DDFXCAPS_BLTSHRINKY |
782
782
DDFXCAPS_BLTSTRETCHX | DDFXCAPS_BLTSTRETCHY;
783
783
ddCaps.dwPalCaps = DDPCAPS_8BIT | DDPCAPS_PRIMARYSURFACE;
Index: ddraw/glDirectDrawSurface.cpp
—
—
@@ -1131,22 +1131,14 @@
1132
1132
}
1133
1133
HRESULT WINAPI glDirectDrawSurface7::PageLock(DWORD dwFlags)
1134
1134
{
1135
- if(surfacetype == 1)
1136
- {
1137
- pagelocked++;
1138
- return DD_OK;
1139
- }
1140
- else ERR(DDERR_CANTPAGELOCK);
1135
+ pagelocked++;
1136
+ return DD_OK;
1141
1137
}
1142
1138
HRESULT WINAPI glDirectDrawSurface7::PageUnlock(DWORD dwFlags)
1143
1139
{
1144
- if(surfacetype == 1)
1145
- {
1146
- if(!pagelocked) ERR(DDERR_NOTPAGELOCKED);
1147
- pagelocked--;
1148
- return DD_OK;
1149
- }
1150
- else ERR(DDERR_CANTPAGEUNLOCK);
1140
+ if(!pagelocked) ERR(DDERR_NOTPAGELOCKED);
1141
+ pagelocked--;
1142
+ return DD_OK;
1151
1143
}
1152
1144
// ddraw 3+ api
1153
1145
HRESULT WINAPI glDirectDrawSurface7::SetSurfaceDesc(LPDDSURFACEDESC2 lpddsd2, DWORD dwFlags)
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version