Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6d395fcc
Commit
6d395fcc
authored
Aug 22, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fall back to GetSystemMetrics() for the screen size.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f49227db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
driver.c
dlls/gdi32/driver.c
+11
-3
No files found.
dlls/gdi32/driver.c
View file @
6d395fcc
...
...
@@ -30,6 +30,7 @@
#include "winbase.h"
#include "ddrawgdi.h"
#include "wine/winbase16.h"
#include "winuser.h"
#include "winternl.h"
#include "gdi_private.h"
...
...
@@ -60,6 +61,9 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
};
static
CRITICAL_SECTION
driver_section
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
typeof
(
GetDesktopWindow
)
*
pGetDesktopWindow
;
static
typeof
(
GetSystemMetrics
)
*
pGetSystemMetrics
;
/**********************************************************************
* create_driver
*
...
...
@@ -97,7 +101,7 @@ static const struct gdi_dc_funcs *get_display_driver(void)
if
(
!
display_driver
)
{
HMODULE
user32
=
LoadLibraryA
(
"user32.dll"
);
HWND
(
WINAPI
*
pGetDesktopWindow
)(
void
)
=
(
void
*
)
GetProcAddress
(
user32
,
"GetDesktopWindow"
);
pGetDesktopWindow
=
(
void
*
)
GetProcAddress
(
user32
,
"GetDesktopWindow"
);
if
(
!
pGetDesktopWindow
()
||
!
display_driver
)
{
...
...
@@ -166,6 +170,7 @@ done:
void
CDECL
__wine_set_display_driver
(
HMODULE
module
)
{
struct
graphics_driver
*
driver
;
HMODULE
user32
;
if
(
!
(
driver
=
create_driver
(
module
)))
{
...
...
@@ -174,6 +179,9 @@ void CDECL __wine_set_display_driver( HMODULE module )
}
if
(
InterlockedCompareExchangePointer
(
(
void
**
)
&
display_driver
,
driver
,
NULL
))
HeapFree
(
GetProcessHeap
(),
0
,
driver
);
user32
=
LoadLibraryA
(
"user32.dll"
);
pGetSystemMetrics
=
(
void
*
)
GetProcAddress
(
user32
,
"GetSystemMetrics"
);
}
...
...
@@ -308,8 +316,8 @@ static INT nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
GetDeviceCaps
(
dev
->
hdc
,
LOGPIXELSX
)
*
10
);
case
VERTSIZE
:
return
MulDiv
(
GetDeviceCaps
(
dev
->
hdc
,
VERTRES
),
254
,
GetDeviceCaps
(
dev
->
hdc
,
LOGPIXELSY
)
*
10
);
case
HORZRES
:
return
640
;
case
VERTRES
:
return
480
;
case
HORZRES
:
return
pGetSystemMetrics
?
pGetSystemMetrics
(
SM_CXSCREEN
)
:
640
;
case
VERTRES
:
return
pGetSystemMetrics
?
pGetSystemMetrics
(
SM_CYSCREEN
)
:
480
;
case
BITSPIXEL
:
return
32
;
case
PLANES
:
return
1
;
case
NUMBRUSHES
:
return
-
1
;
...
...
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