Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0948ed70
Commit
0948ed70
authored
Nov 19, 2004
by
Christian Costa
Committed by
Alexandre Julliard
Nov 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed colorkey conversion.
Handle null surface pointer when creating surface.
parent
fa4036eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
main.c
dlls/ddraw/ddraw/main.c
+6
-0
mesa.c
dlls/ddraw/mesa.c
+2
-2
No files found.
dlls/ddraw/ddraw/main.c
View file @
0948ed70
...
...
@@ -658,6 +658,12 @@ Main_DirectDraw_CreateSurface(LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD,
pDDSD
->
dwFlags
&=
~
DDSD_LPSURFACE
;
}
if
((
pDDSD
->
dwFlags
&
DDSD_LPSURFACE
)
&&
(
pDDSD
->
lpSurface
==
NULL
))
{
/* Frank Herbert's Dune specifies a null pointer for the surface, ignore the LPSURFACE field */
WARN
(
"Null surface pointer specified, ignore it!
\n
"
);
pDDSD
->
dwFlags
&=
~
DDSD_LPSURFACE
;
}
if
(
ppSurf
==
NULL
)
{
FIXME
(
"You want to get back a surface? Don't give NULL ptrs!
\n
"
);
return
E_POINTER
;
/* unchecked */
...
...
dlls/ddraw/mesa.c
View file @
0948ed70
...
...
@@ -1195,7 +1195,7 @@ HRESULT upload_surface_to_tex_memory(RECT *rect, DWORD xoffset, DWORD yoffset, v
unsigned
int
x
,
y
;
BYTE
*
src
=
(
BYTE
*
)
(((
BYTE
*
)
src_d
->
lpSurface
)
+
(
bpp
*
rect
->
left
)
+
(
src_d
->
u1
.
lPitch
*
rect
->
top
));
DWORD
*
dst
;
if
(
*
temp_buffer
==
NULL
)
*
temp_buffer
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
current_tex_width
*
current_tex_height
*
sizeof
(
DWORD
));
...
...
@@ -1205,7 +1205,7 @@ HRESULT upload_surface_to_tex_memory(RECT *rect, DWORD xoffset, DWORD yoffset, v
for
(
x
=
0
;
x
<
width
;
x
++
)
{
DWORD
color
=
*
((
DWORD
*
)
src
)
&
0x00FFFFFF
;
src
+=
3
;
*
dst
=
*
src
++
<<
8
;
*
dst
=
color
<<
8
;
if
((
color
<
src_d
->
ddckCKSrcBlt
.
dwColorSpaceLowValue
)
||
(
color
>
src_d
->
ddckCKSrcBlt
.
dwColorSpaceHighValue
))
*
dst
|=
0xFF
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment