Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glfw
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pirvi-public
glfw
Commits
d8551b73
Commit
d8551b73
authored
Aug 27, 2017
by
Camilla Löwy
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup
parent
45ca8b8d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/win32_monitor.c
+15
-16
15 additions, 16 deletions
src/win32_monitor.c
src/win32_window.c
+1
-1
1 addition, 1 deletion
src/win32_window.c
with
16 additions
and
17 deletions
src/win32_monitor.c
+
15
−
16
View file @
d8551b73
...
...
@@ -142,8 +142,8 @@ void _glfwPollMonitorsWin32(void)
{
int
type
=
_GLFW_INSERT_LAST
;
ZeroMemory
(
&
adapter
,
sizeof
(
DISPLAY_DEVICEW
));
adapter
.
cb
=
sizeof
(
DISPLAY_DEVICEW
);
ZeroMemory
(
&
adapter
,
sizeof
(
adapter
));
adapter
.
cb
=
sizeof
(
adapter
);
if
(
!
EnumDisplayDevicesW
(
NULL
,
adapterIndex
,
&
adapter
,
0
))
break
;
...
...
@@ -156,8 +156,8 @@ void _glfwPollMonitorsWin32(void)
for
(
displayIndex
=
0
;
;
displayIndex
++
)
{
ZeroMemory
(
&
display
,
sizeof
(
DISPLAY_DEVICEW
));
display
.
cb
=
sizeof
(
DISPLAY_DEVICEW
);
ZeroMemory
(
&
display
,
sizeof
(
display
));
display
.
cb
=
sizeof
(
display
);
if
(
!
EnumDisplayDevicesW
(
adapter
.
DeviceName
,
displayIndex
,
&
display
,
0
))
break
;
...
...
@@ -244,7 +244,7 @@ GLFWbool _glfwSetVideoModeWin32(_GLFWmonitor* monitor, const GLFWvidmode* desire
return
GLFW_TRUE
;
ZeroMemory
(
&
dm
,
sizeof
(
dm
));
dm
.
dmSize
=
sizeof
(
DEVMODEW
);
dm
.
dmSize
=
sizeof
(
dm
);
dm
.
dmFields
=
DM_PELSWIDTH
|
DM_PELSHEIGHT
|
DM_BITSPERPEL
|
DM_DISPLAYFREQUENCY
;
dm
.
dmPelsWidth
=
best
->
width
;
...
...
@@ -309,19 +309,19 @@ void _glfwRestoreVideoModeWin32(_GLFWmonitor* monitor)
void
_glfwPlatformGetMonitorPos
(
_GLFWmonitor
*
monitor
,
int
*
xpos
,
int
*
ypos
)
{
DEVMODEW
settings
;
ZeroMemory
(
&
settings
,
sizeof
(
DEVMODEW
));
settings
.
dmSize
=
sizeof
(
DEVMODEW
);
DEVMODEW
dm
;
ZeroMemory
(
&
dm
,
sizeof
(
dm
));
dm
.
dmSize
=
sizeof
(
dm
);
EnumDisplaySettingsExW
(
monitor
->
win32
.
adapterName
,
ENUM_CURRENT_SETTINGS
,
&
settings
,
&
dm
,
EDS_ROTATEDMODE
);
if
(
xpos
)
*
xpos
=
settings
.
dmPosition
.
x
;
*
xpos
=
dm
.
dmPosition
.
x
;
if
(
ypos
)
*
ypos
=
settings
.
dmPosition
.
y
;
*
ypos
=
dm
.
dmPosition
.
y
;
}
GLFWvidmode
*
_glfwPlatformGetVideoModes
(
_GLFWmonitor
*
monitor
,
int
*
count
)
...
...
@@ -337,8 +337,8 @@ GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
GLFWvidmode
mode
;
DEVMODEW
dm
;
ZeroMemory
(
&
dm
,
sizeof
(
DEVMODEW
));
dm
.
dmSize
=
sizeof
(
DEVMODEW
);
ZeroMemory
(
&
dm
,
sizeof
(
dm
));
dm
.
dmSize
=
sizeof
(
dm
);
if
(
!
EnumDisplaySettingsW
(
monitor
->
win32
.
adapterName
,
modeIndex
,
&
dm
))
break
;
...
...
@@ -404,9 +404,8 @@ GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
void
_glfwPlatformGetVideoMode
(
_GLFWmonitor
*
monitor
,
GLFWvidmode
*
mode
)
{
DEVMODEW
dm
;
ZeroMemory
(
&
dm
,
sizeof
(
DEVMODEW
));
dm
.
dmSize
=
sizeof
(
DEVMODEW
);
ZeroMemory
(
&
dm
,
sizeof
(
dm
));
dm
.
dmSize
=
sizeof
(
dm
);
EnumDisplaySettingsW
(
monitor
->
win32
.
adapterName
,
ENUM_CURRENT_SETTINGS
,
&
dm
);
...
...
This diff is collapsed.
Click to expand it.
src/win32_window.c
+
1
−
1
View file @
d8551b73
...
...
@@ -111,7 +111,7 @@ static HICON createIcon(const GLFWimage* image,
unsigned
char
*
source
=
image
->
pixels
;
ZeroMemory
(
&
bi
,
sizeof
(
bi
));
bi
.
bV5Size
=
sizeof
(
BITMAPV5HEADER
);
bi
.
bV5Size
=
sizeof
(
bi
);
bi
.
bV5Width
=
image
->
width
;
bi
.
bV5Height
=
-
image
->
height
;
bi
.
bV5Planes
=
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment