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
f44e3e90
Commit
f44e3e90
authored
Mar 27, 1999
by
Francois Gouget
Committed by
Alexandre Julliard
Mar 27, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed direct access to the virtual table
parent
81de59a7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
vga.c
graphics/vga.c
+13
-13
No files found.
graphics/vga.c
View file @
f44e3e90
...
...
@@ -31,20 +31,20 @@ int VGA_SetMode(unsigned Xres,unsigned Yres,unsigned Depth)
ERR
(
ddraw
,
"DirectDraw is not available
\n
"
);
return
1
;
}
if
(
lpddraw
->
lpvtbl
->
fn
SetDisplayMode
(
lpddraw
,
Xres
,
Yres
,
Depth
))
{
if
(
IDirectDraw_
SetDisplayMode
(
lpddraw
,
Xres
,
Yres
,
Depth
))
{
ERR
(
ddraw
,
"DirectDraw does not support requested display mode
\n
"
);
lpddraw
->
lpvtbl
->
fn
Release
(
lpddraw
);
IDirectDraw_
Release
(
lpddraw
);
lpddraw
=
NULL
;
return
1
;
}
lpddraw
->
lpvtbl
->
fn
CreatePalette
(
lpddraw
,
DDPCAPS_8BIT
,
NULL
,
&
lpddpal
,
NULL
);
IDirectDraw_
CreatePalette
(
lpddraw
,
DDPCAPS_8BIT
,
NULL
,
&
lpddpal
,
NULL
);
memset
(
&
sdesc
,
0
,
sizeof
(
sdesc
));
sdesc
.
dwSize
=
sizeof
(
sdesc
);
sdesc
.
dwFlags
=
DDSD_CAPS
;
sdesc
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
;
if
(
lpddraw
->
lpvtbl
->
fn
CreateSurface
(
lpddraw
,
&
sdesc
,
&
lpddsurf
,
NULL
)
||
(
!
lpddsurf
))
{
if
(
IDirectDraw_
CreateSurface
(
lpddraw
,
&
sdesc
,
&
lpddsurf
,
NULL
)
||
(
!
lpddsurf
))
{
ERR
(
ddraw
,
"DirectDraw surface is not available
\n
"
);
lpddraw
->
lpvtbl
->
fn
Release
(
lpddraw
);
IDirectDraw_
Release
(
lpddraw
);
lpddraw
=
NULL
;
return
1
;
}
...
...
@@ -72,9 +72,9 @@ void VGA_Exit(void)
if
(
lpddraw
)
{
SYSTEM_KillSystemTimer
(
poll_timer
);
DeleteCriticalSection
(
&
vga_crit
);
lpddsurf
->
lpvtbl
->
fn
Release
(
lpddsurf
);
IDirectDrawSurface_
Release
(
lpddsurf
);
lpddsurf
=
NULL
;
lpddraw
->
lpvtbl
->
fn
Release
(
lpddraw
);
IDirectDraw_
Release
(
lpddraw
);
lpddraw
=
NULL
;
}
}
...
...
@@ -82,8 +82,8 @@ void VGA_Exit(void)
void
VGA_SetPalette
(
PALETTEENTRY
*
pal
,
int
start
,
int
len
)
{
if
(
!
lpddraw
)
return
;
lpddpal
->
lpvtbl
->
fn
SetEntries
(
lpddpal
,
0
,
start
,
len
,
pal
);
lpddsurf
->
lpvtbl
->
fn
SetPalette
(
lpddsurf
,
lpddpal
);
IDirectDrawPalette_
SetEntries
(
lpddpal
,
0
,
start
,
len
,
pal
);
IDirectDrawSurface_
SetPalette
(
lpddsurf
,
lpddpal
);
}
void
VGA_SetQuadPalette
(
RGBQUAD
*
color
,
int
start
,
int
len
)
...
...
@@ -98,15 +98,15 @@ void VGA_SetQuadPalette(RGBQUAD*color,int start,int len)
pal
[
c
].
peBlue
=
color
[
c
].
rgbBlue
;
pal
[
c
].
peFlags
=
0
;
}
lpddpal
->
lpvtbl
->
fn
SetEntries
(
lpddpal
,
0
,
start
,
len
,
pal
);
lpddsurf
->
lpvtbl
->
fn
SetPalette
(
lpddsurf
,
lpddpal
);
IDirectDrawPalette_
SetEntries
(
lpddpal
,
0
,
start
,
len
,
pal
);
IDirectDrawSurface_
SetPalette
(
lpddsurf
,
lpddpal
);
}
LPSTR
VGA_Lock
(
unsigned
*
Pitch
,
unsigned
*
Height
,
unsigned
*
Width
,
unsigned
*
Depth
)
{
if
(
!
lpddraw
)
return
NULL
;
if
(
!
lpddsurf
)
return
NULL
;
if
(
lpddsurf
->
lpvtbl
->
fn
Lock
(
lpddsurf
,
NULL
,
&
sdesc
,
0
,
0
))
{
if
(
IDirectDrawSurface_
Lock
(
lpddsurf
,
NULL
,
&
sdesc
,
0
,
0
))
{
ERR
(
ddraw
,
"could not lock surface!
\n
"
);
return
NULL
;
}
...
...
@@ -119,7 +119,7 @@ LPSTR VGA_Lock(unsigned*Pitch,unsigned*Height,unsigned*Width,unsigned*Depth)
void
VGA_Unlock
(
void
)
{
lpddsurf
->
lpvtbl
->
fn
Unlock
(
lpddsurf
,
sdesc
.
y
.
lpSurface
);
IDirectDrawSurface_
Unlock
(
lpddsurf
,
sdesc
.
y
.
lpSurface
);
}
/* We are called from SIGALRM, aren't we? We should _NOT_ do synchronization
...
...
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