Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Switch
RetroArch
RetroArch
Commits
45e075c8
Commit
45e075c8
authored
Nov 24, 2018
by
twinaphex
Browse files
Cleanup
parent
62c6d60c
Changes
1
Hide whitespace changes
Inline
Side-by-side
gfx/display_servers/dispserv_win32.c
View file @
45e075c8
...
@@ -204,13 +204,9 @@ static bool win32_display_server_set_window_decorations(void *data, bool on)
...
@@ -204,13 +204,9 @@ static bool win32_display_server_set_window_decorations(void *data, bool on)
static
bool
win32_display_server_set_resolution
(
void
*
data
,
static
bool
win32_display_server_set_resolution
(
void
*
data
,
unsigned
width
,
unsigned
height
,
int
int_hz
,
float
hz
,
int
center
)
unsigned
width
,
unsigned
height
,
int
int_hz
,
float
hz
,
int
center
)
{
{
LONG
res
;
DEVMODE
curDevmode
;
DEVMODE
curDevmode
;
DEVMODE
devmode
;
int
iModeNum
;
int
iModeNum
;
int
freq
=
int_hz
;
int
freq
=
int_hz
;
DWORD
flags
=
0
;
int
depth
=
0
;
int
depth
=
0
;
dispserv_win32_t
*
serv
=
(
dispserv_win32_t
*
)
data
;
dispserv_win32_t
*
serv
=
(
dispserv_win32_t
*
)
data
;
...
@@ -239,6 +235,9 @@ static bool win32_display_server_set_resolution(void *data,
...
@@ -239,6 +235,9 @@ static bool win32_display_server_set_resolution(void *data,
for
(
iModeNum
=
0
;;
iModeNum
++
)
for
(
iModeNum
=
0
;;
iModeNum
++
)
{
{
LONG
res
;
DEVMODE
devmode
;
if
(
!
EnumDisplaySettings
(
NULL
,
iModeNum
,
&
devmode
))
if
(
!
EnumDisplaySettings
(
NULL
,
iModeNum
,
&
devmode
))
break
;
break
;
...
@@ -262,15 +261,15 @@ static bool win32_display_server_set_resolution(void *data,
...
@@ -262,15 +261,15 @@ static bool win32_display_server_set_resolution(void *data,
switch
(
res
)
switch
(
res
)
{
{
case
DISP_CHANGE_SUCCESSFUL
:
case
DISP_CHANGE_SUCCESSFUL
:
res
=
win32_change_display_settings
(
NULL
,
&
devmode
,
flags
);
res
=
win32_change_display_settings
(
NULL
,
&
devmode
,
0
);
switch
(
res
)
switch
(
res
)
{
{
case
DISP_CHANGE_SUCCESSFUL
:
case
DISP_CHANGE_SUCCESSFUL
:
return
true
;
return
true
;
case
DISP_CHANGE_NOTUPDATED
:
case
DISP_CHANGE_NOTUPDATED
:
return
true
;
return
true
;
default:
default:
break
;
break
;
}
}
break
;
break
;
case
DISP_CHANGE_RESTART
:
case
DISP_CHANGE_RESTART
:
...
...
Write
Preview
Supports
Markdown
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