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
4ef92519
Commit
4ef92519
authored
Feb 05, 1999
by
Lionel Ulmer
Committed by
Alexandre Julliard
Feb 05, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added a dump of the palette creation flags
- changed palette creation code in vga.c to prevent useless error message
parent
e3728cd2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
ddraw.c
graphics/ddraw.c
+29
-0
vga.c
graphics/vga.c
+1
-1
ddraw.h
include/ddraw.h
+1
-0
No files found.
graphics/ddraw.c
View file @
4ef92519
...
@@ -232,6 +232,7 @@ static void _dump_DDBLT(DWORD flagmask) {
...
@@ -232,6 +232,7 @@ static void _dump_DDBLT(DWORD flagmask) {
for
(
i
=
0
;
i
<
sizeof
(
flags
)
/
sizeof
(
flags
[
0
]);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
flags
)
/
sizeof
(
flags
[
0
]);
i
++
)
if
(
flags
[
i
].
mask
&
flagmask
)
if
(
flags
[
i
].
mask
&
flagmask
)
DUMP
(
"%s "
,
flags
[
i
].
name
);
DUMP
(
"%s "
,
flags
[
i
].
name
);
DUMP
(
"
\n
"
);
}
}
static
void
_dump_DDSCAPS
(
DWORD
flagmask
)
{
static
void
_dump_DDSCAPS
(
DWORD
flagmask
)
{
...
@@ -335,6 +336,31 @@ static void _dump_DDCOLORKEY(DWORD flagmask) {
...
@@ -335,6 +336,31 @@ static void _dump_DDCOLORKEY(DWORD flagmask) {
DUMP
(
"
\n
"
);
DUMP
(
"
\n
"
);
}
}
static
void
_dump_paletteformat
(
DWORD
dwFlags
)
{
int
i
;
const
struct
{
DWORD
mask
;
char
*
name
;
}
flags
[]
=
{
#define FE(x) { x, #x},
FE
(
DDPCAPS_4BIT
)
FE
(
DDPCAPS_8BITENTRIES
)
FE
(
DDPCAPS_8BIT
)
FE
(
DDPCAPS_INITIALIZE
)
FE
(
DDPCAPS_PRIMARYSURFACE
)
FE
(
DDPCAPS_PRIMARYSURFACELEFT
)
FE
(
DDPCAPS_ALLOW256
)
FE
(
DDPCAPS_VSYNC
)
FE
(
DDPCAPS_1BIT
)
FE
(
DDPCAPS_2BIT
)
FE
(
DDPCAPS_ALPHA
)
};
for
(
i
=
0
;
i
<
sizeof
(
flags
)
/
sizeof
(
flags
[
0
]);
i
++
)
if
(
flags
[
i
].
mask
&
dwFlags
)
DUMP
(
"%s "
,
flags
[
i
].
name
);
DUMP
(
"
\n
"
);
}
static
void
_dump_pixelformat
(
LPDDPIXELFORMAT
pf
)
{
static
void
_dump_pixelformat
(
LPDDPIXELFORMAT
pf
)
{
DUMP
(
"Size : %ld
\n
"
,
pf
->
dwSize
);
DUMP
(
"Size : %ld
\n
"
,
pf
->
dwSize
);
if
(
pf
->
dwFlags
)
if
(
pf
->
dwFlags
)
...
@@ -2792,6 +2818,9 @@ static HRESULT WINAPI common_IDirectDraw2_CreatePalette(
...
@@ -2792,6 +2818,9 @@ static HRESULT WINAPI common_IDirectDraw2_CreatePalette(
)
{
)
{
int
size
=
0
;
int
size
=
0
;
if
(
TRACE_ON
(
ddraw
))
_dump_paletteformat
(
dwFlags
);
*
lpddpal
=
(
LPDIRECTDRAWPALETTE
)
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectDrawPalette
));
*
lpddpal
=
(
LPDIRECTDRAWPALETTE
)
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectDrawPalette
));
if
(
*
lpddpal
==
NULL
)
return
E_OUTOFMEMORY
;
if
(
*
lpddpal
==
NULL
)
return
E_OUTOFMEMORY
;
(
*
lpddpal
)
->
ref
=
1
;
(
*
lpddpal
)
->
ref
=
1
;
...
...
graphics/vga.c
View file @
4ef92519
...
@@ -36,7 +36,7 @@ int VGA_SetMode(unsigned Xres,unsigned Yres,unsigned Depth)
...
@@ -36,7 +36,7 @@ int VGA_SetMode(unsigned Xres,unsigned Yres,unsigned Depth)
lpddraw
=
NULL
;
lpddraw
=
NULL
;
return
1
;
return
1
;
}
}
lpddraw
->
lpvtbl
->
fnCreatePalette
(
lpddraw
,
0
,
NULL
,
&
lpddpal
,
NULL
);
lpddraw
->
lpvtbl
->
fnCreatePalette
(
lpddraw
,
DDPCAPS_8BIT
,
NULL
,
&
lpddpal
,
NULL
);
memset
(
&
sdesc
,
0
,
sizeof
(
sdesc
));
memset
(
&
sdesc
,
0
,
sizeof
(
sdesc
));
sdesc
.
dwSize
=
sizeof
(
sdesc
);
sdesc
.
dwSize
=
sizeof
(
sdesc
);
sdesc
.
dwFlags
=
DDSD_CAPS
;
sdesc
.
dwFlags
=
DDSD_CAPS
;
...
...
include/ddraw.h
View file @
4ef92519
...
@@ -557,6 +557,7 @@ typedef struct _DDPIXELFORMAT {
...
@@ -557,6 +557,7 @@ typedef struct _DDPIXELFORMAT {
#define DDPCAPS_VSYNC 0x00000080
#define DDPCAPS_VSYNC 0x00000080
#define DDPCAPS_1BIT 0x00000100
#define DDPCAPS_1BIT 0x00000100
#define DDPCAPS_2BIT 0x00000200
#define DDPCAPS_2BIT 0x00000200
#define DDPCAPS_ALPHA 0x00000400
/* DDCAPS.dwSVCaps */
/* DDCAPS.dwSVCaps */
#define DDSVCAPS_ENIGMA 0x00000001l
#define DDSVCAPS_ENIGMA 0x00000001l
...
...
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