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
12788f6f
Commit
12788f6f
authored
Jul 16, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jul 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Do not fail if the adapter info can't be initialized.
parent
59efd5c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
device.c
dlls/wined3d/device.c
+7
-1
directx.c
dlls/wined3d/directx.c
+5
-3
wined3d_main.c
dlls/wined3d/wined3d_main.c
+5
-2
No files found.
dlls/wined3d/device.c
View file @
12788f6f
...
@@ -716,7 +716,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
...
@@ -716,7 +716,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
/* Look at the implementation and set the correct Vtable */
/* Look at the implementation and set the correct Vtable */
switch
(
Impl
)
{
switch
(
Impl
)
{
case
SURFACE_OPENGL
:
case
SURFACE_OPENGL
:
/* Nothing to do, it's set already */
/* Check if a 3D adapter is available when creating gl surfaces */
if
(
!
This
->
adapter
)
{
ERR
(
"OpenGL surfaces are not available without opengl
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
object
->
resource
.
allocatedMemory
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
WINED3DERR_NOTAVAILABLE
;
}
break
;
break
;
case
SURFACE_GDI
:
case
SURFACE_GDI
:
...
...
dlls/wined3d/directx.c
View file @
12788f6f
...
@@ -2418,8 +2418,10 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
...
@@ -2418,8 +2418,10 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
HDC
hDC
;
HDC
hDC
;
int
i
;
int
i
;
/* Validate the adapter number */
/* Validate the adapter number. If no adapters are available(no GL), ignore the adapter
if
(
Adapter
>=
IWineD3D_GetAdapterCount
(
iface
))
{
* number and create a device without a 3D adapter for 2D only operation.
*/
if
(
IWineD3D_GetAdapterCount
(
iface
)
&&
Adapter
>=
IWineD3D_GetAdapterCount
(
iface
))
{
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
}
}
...
@@ -2435,7 +2437,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
...
@@ -2435,7 +2437,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
object
->
lpVtbl
=
&
IWineD3DDevice_Vtbl
;
object
->
lpVtbl
=
&
IWineD3DDevice_Vtbl
;
object
->
ref
=
1
;
object
->
ref
=
1
;
object
->
wineD3D
=
iface
;
object
->
wineD3D
=
iface
;
object
->
adapter
=
&
Adapters
[
Adapter
]
;
object
->
adapter
=
numAdapters
?
&
Adapters
[
Adapter
]
:
NULL
;
IWineD3D_AddRef
(
object
->
wineD3D
);
IWineD3D_AddRef
(
object
->
wineD3D
);
object
->
parent
=
parent
;
object
->
parent
=
parent
;
...
...
dlls/wined3d/wined3d_main.c
View file @
12788f6f
...
@@ -62,8 +62,11 @@ IWineD3D* WINAPI WineDirect3DCreate(UINT SDKVersion, UINT dxVersion, IUnknown *p
...
@@ -62,8 +62,11 @@ IWineD3D* WINAPI WineDirect3DCreate(UINT SDKVersion, UINT dxVersion, IUnknown *p
IWineD3DImpl
*
object
;
IWineD3DImpl
*
object
;
if
(
!
InitAdapters
())
{
if
(
!
InitAdapters
())
{
ERR
(
"Failed to initialize direct3d adapters
\n
"
);
WARN
(
"Failed to initialize direct3d adapters, Direct3D will not be available
\n
"
);
return
NULL
;
if
(
dxVersion
>
7
)
{
ERR
(
"Direct3D%d is not available without opengl
\n
"
,
dxVersion
);
return
NULL
;
}
}
}
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IWineD3DImpl
));
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IWineD3DImpl
));
...
...
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