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
b2380986
Commit
b2380986
authored
Sep 11, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Get the total amount of video memory from wined3d.
Instead of hoping that what's available at ddraw_init() time is the total.
parent
aa5590b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
ddraw.c
dlls/ddraw/ddraw.c
+9
-6
ddraw_private.h
dlls/ddraw/ddraw_private.h
+0
-1
No files found.
dlls/ddraw/ddraw.c
View file @
b2380986
...
...
@@ -1593,6 +1593,7 @@ static HRESULT WINAPI ddraw7_GetAvailableVidMem(IDirectDraw7 *iface, DDSCAPS2 *C
DWORD
*
free
)
{
IDirectDrawImpl
*
This
=
impl_from_IDirectDraw7
(
iface
);
HRESULT
hr
=
DD_OK
;
TRACE
(
"iface %p, caps %p, total %p, free %p.
\n
"
,
iface
,
Caps
,
total
,
free
);
...
...
@@ -1614,13 +1615,18 @@ static HRESULT WINAPI ddraw7_GetAvailableVidMem(IDirectDraw7 *iface, DDSCAPS2 *C
return
DDERR_INVALIDPARAMS
;
}
if
(
total
)
*
total
=
This
->
total_vidmem
;
if
(
free
)
*
free
=
wined3d_device_get_available_texture_mem
(
This
->
wined3d_device
);
if
(
total
)
{
WINED3DADAPTER_IDENTIFIER
desc
=
{
0
};
hr
=
wined3d_get_adapter_identifier
(
This
->
wineD3D
,
WINED3DADAPTER_DEFAULT
,
0
,
&
desc
);
*
total
=
desc
.
video_memory
;
}
LeaveCriticalSection
(
&
ddraw_cs
);
return
DD_OK
;
return
hr
;
}
static
HRESULT
WINAPI
ddraw4_GetAvailableVidMem
(
IDirectDraw4
*
iface
,
...
...
@@ -5841,9 +5847,6 @@ HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type)
return
hr
;
}
/* Get the amount of video memory */
ddraw
->
total_vidmem
=
wined3d_device_get_available_texture_mem
(
ddraw
->
wined3d_device
);
list_init
(
&
ddraw
->
surface_list
);
return
DD_OK
;
...
...
dlls/ddraw/ddraw_private.h
View file @
b2380986
...
...
@@ -89,7 +89,6 @@ struct IDirectDrawImpl
BOOL
d3d_initialized
;
/* Misc ddraw fields */
UINT
total_vidmem
;
DWORD
cur_scanline
;
BOOL
fake_vblank
;
BOOL
initialized
;
...
...
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