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
d8a0da9d
Commit
d8a0da9d
authored
Dec 20, 2012
by
Ken Thomases
Committed by
Alexandre Julliard
Dec 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac.drv: Implement GetMonitorInfo.
parent
21c4fc33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
display.c
dlls/winemac.drv/display.c
+51
-0
winemac.drv.spec
dlls/winemac.drv/winemac.drv.spec
+1
-0
No files found.
dlls/winemac.drv/display.c
View file @
d8a0da9d
...
...
@@ -105,3 +105,54 @@ BOOL CDECL macdrv_EnumDisplayMonitors(HDC hdc, LPRECT rect, MONITORENUMPROC proc
return
ret
;
}
/***********************************************************************
* GetMonitorInfo (MACDRV.@)
*/
BOOL
CDECL
macdrv_GetMonitorInfo
(
HMONITOR
monitor
,
LPMONITORINFO
info
)
{
static
const
WCHAR
adapter_name
[]
=
{
'\\'
,
'\\'
,
'.'
,
'\\'
,
'D'
,
'I'
,
'S'
,
'P'
,
'L'
,
'A'
,
'Y'
,
'1'
,
0
};
struct
macdrv_display
*
displays
;
int
num_displays
;
CGDirectDisplayID
display_id
;
int
i
;
TRACE
(
"%p, %p
\n
"
,
monitor
,
info
);
if
(
macdrv_get_displays
(
&
displays
,
&
num_displays
))
{
ERR
(
"couldn't get display list
\n
"
);
SetLastError
(
ERROR_GEN_FAILURE
);
return
FALSE
;
}
display_id
=
monitor_to_display_id
(
monitor
);
for
(
i
=
0
;
i
<
num_displays
;
i
++
)
{
if
(
displays
[
i
].
displayID
==
display_id
)
break
;
}
if
(
i
<
num_displays
)
{
info
->
rcMonitor
=
rect_from_cgrect
(
displays
[
i
].
frame
);
info
->
rcWork
=
rect_from_cgrect
(
displays
[
i
].
work_frame
);
info
->
dwFlags
=
(
i
==
0
)
?
MONITORINFOF_PRIMARY
:
0
;
if
(
info
->
cbSize
>=
sizeof
(
MONITORINFOEXW
))
lstrcpyW
(((
MONITORINFOEXW
*
)
info
)
->
szDevice
,
adapter_name
);
TRACE
(
" -> rcMonitor %s rcWork %s dwFlags %08x
\n
"
,
wine_dbgstr_rect
(
&
info
->
rcMonitor
),
wine_dbgstr_rect
(
&
info
->
rcWork
),
info
->
dwFlags
);
}
else
{
ERR
(
"invalid monitor handle
\n
"
);
SetLastError
(
ERROR_INVALID_HANDLE
);
}
macdrv_free_displays
(
displays
);
return
(
i
<
num_displays
);
}
dlls/winemac.drv/winemac.drv.spec
View file @
d8a0da9d
...
...
@@ -5,3 +5,4 @@
# USER driver
@ cdecl EnumDisplayMonitors(long ptr ptr long) macdrv_EnumDisplayMonitors
@ cdecl GetMonitorInfo(long ptr) macdrv_GetMonitorInfo
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