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
d0579649
Commit
d0579649
authored
Aug 22, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fall back to GetSystemMetrics() for the virtual desktop size.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6d395fcc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
driver.c
dlls/gdi32/driver.c
+24
-2
No files found.
dlls/gdi32/driver.c
View file @
d0579649
...
...
@@ -63,6 +63,7 @@ static CRITICAL_SECTION driver_section = { &critsect_debug, -1, 0, 0, 0, 0 };
static
typeof
(
GetDesktopWindow
)
*
pGetDesktopWindow
;
static
typeof
(
GetSystemMetrics
)
*
pGetSystemMetrics
;
static
typeof
(
SetThreadDpiAwarenessContext
)
*
pSetThreadDpiAwarenessContext
;
/**********************************************************************
* create_driver
...
...
@@ -182,6 +183,7 @@ void CDECL __wine_set_display_driver( HMODULE module )
user32
=
LoadLibraryA
(
"user32.dll"
);
pGetSystemMetrics
=
(
void
*
)
GetProcAddress
(
user32
,
"GetSystemMetrics"
);
pSetThreadDpiAwarenessContext
=
(
void
*
)
GetProcAddress
(
user32
,
"SetThreadDpiAwarenessContext"
);
}
...
...
@@ -352,8 +354,28 @@ static INT nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
case
SCALINGFACTORX
:
return
0
;
case
SCALINGFACTORY
:
return
0
;
case
VREFRESH
:
return
GetDeviceCaps
(
dev
->
hdc
,
TECHNOLOGY
)
==
DT_RASDISPLAY
?
1
:
0
;
case
DESKTOPVERTRES
:
return
GetDeviceCaps
(
dev
->
hdc
,
VERTRES
);
case
DESKTOPHORZRES
:
return
GetDeviceCaps
(
dev
->
hdc
,
HORZRES
);
case
DESKTOPHORZRES
:
if
(
pGetSystemMetrics
)
{
DPI_AWARENESS_CONTEXT
context
;
UINT
ret
;
context
=
pSetThreadDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE
);
ret
=
pGetSystemMetrics
(
SM_CXVIRTUALSCREEN
);
pSetThreadDpiAwarenessContext
(
context
);
return
ret
;
}
return
GetDeviceCaps
(
dev
->
hdc
,
HORZRES
);
case
DESKTOPVERTRES
:
if
(
pGetSystemMetrics
)
{
DPI_AWARENESS_CONTEXT
context
;
UINT
ret
;
context
=
pSetThreadDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE
);
ret
=
pGetSystemMetrics
(
SM_CYVIRTUALSCREEN
);
pSetThreadDpiAwarenessContext
(
context
);
return
ret
;
}
return
GetDeviceCaps
(
dev
->
hdc
,
VERTRES
);
case
BLTALIGNMENT
:
return
0
;
case
SHADEBLENDCAPS
:
return
0
;
case
COLORMGMTCAPS
:
return
0
;
...
...
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