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
342ce213
Commit
342ce213
authored
Sep 24, 2012
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Sep 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Avoid division by zero.
Based on patch by Eduard - Gabriel Munteanu.
parent
d9ce33bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
factory.c
dlls/dxgi/factory.c
+9
-1
No files found.
dlls/dxgi/factory.c
View file @
342ce213
...
...
@@ -161,6 +161,14 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_GetWindowAssociation(IWineDXGIFact
return
E_NOTIMPL
;
}
static
UINT
dxgi_rational_to_uint
(
const
DXGI_RATIONAL
*
rational
)
{
if
(
rational
->
Denominator
)
return
rational
->
Numerator
/
rational
->
Denominator
;
else
return
rational
->
Numerator
;
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_CreateSwapChain
(
IWineDXGIFactory
*
iface
,
IUnknown
*
device
,
DXGI_SWAP_CHAIN_DESC
*
desc
,
IDXGISwapChain
**
swapchain
)
{
...
...
@@ -218,7 +226,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IWineDXGIFactory *
wined3d_desc
.
enable_auto_depth_stencil
=
FALSE
;
wined3d_desc
.
auto_depth_stencil_format
=
0
;
wined3d_desc
.
flags
=
0
;
/* WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL? */
wined3d_desc
.
refresh_rate
=
d
esc
->
BufferDesc
.
RefreshRate
.
Numerator
/
desc
->
BufferDesc
.
RefreshRate
.
Denominator
;
wined3d_desc
.
refresh_rate
=
d
xgi_rational_to_uint
(
&
desc
->
BufferDesc
.
RefreshRate
)
;
wined3d_desc
.
swap_interval
=
WINED3DPRESENT_INTERVAL_DEFAULT
;
hr
=
wined3d_device_init_3d
(
wined3d_device
,
&
wined3d_desc
);
...
...
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