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
83bca757
Commit
83bca757
authored
Oct 20, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Fix device creation error handling.
parent
d4275e87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
directx.c
dlls/d3d8/directx.c
+17
-10
No files found.
dlls/d3d8/directx.c
View file @
83bca757
...
...
@@ -413,6 +413,10 @@ static HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapte
hr
=
IWineD3DDevice_Init3D
(
object
->
WineD3DDevice
,
&
localParameters
);
wined3d_mutex_unlock
();
if
(
hr
!=
D3D_OK
)
{
FIXME
(
"(%p) D3D Initialization failed for WineD3DDevice %p
\n
"
,
This
,
object
->
WineD3DDevice
);
goto
err
;
}
pPresentationParameters
->
BackBufferWidth
=
localParameters
.
BackBufferWidth
;
pPresentationParameters
->
BackBufferHeight
=
localParameters
.
BackBufferHeight
;
...
...
@@ -428,25 +432,28 @@ static HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapte
pPresentationParameters
->
FullScreen_RefreshRateInHz
=
localParameters
.
FullScreen_RefreshRateInHz
;
pPresentationParameters
->
FullScreen_PresentationInterval
=
localParameters
.
PresentationInterval
;
if
(
hr
!=
D3D_OK
)
{
FIXME
(
"(%p) D3D Initialization failed for WineD3DDevice %p
\n
"
,
This
,
object
->
WineD3DDevice
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppReturnedDeviceInterface
=
NULL
;
}
object
->
declArraySize
=
16
;
object
->
decls
=
HeapAlloc
(
GetProcessHeap
(),
0
,
object
->
declArraySize
*
sizeof
(
*
object
->
decls
));
if
(
!
object
->
decls
)
{
ERR
(
"Out of memory
\n
"
);
hr
=
E_OUTOFMEMORY
;
goto
err
;
}
return
D3D_OK
;
err:
*
ppReturnedDeviceInterface
=
NULL
;
if
(
!
object
)
return
hr
;
HeapFree
(
GetProcessHeap
(),
0
,
object
->
decls
);
if
(
object
->
WineD3DDevice
)
{
wined3d_mutex_lock
();
IWineD3DDevice_Uninit3D
(
object
->
WineD3DDevice
,
D3D8CB_DestroySwapChain
);
IWineD3DDevice_Release
(
object
->
WineD3DDevice
);
wined3d_mutex_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppReturnedDeviceInterface
=
NULL
;
hr
=
E_OUTOFMEMORY
;
}
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
...
...
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