Commit 45e075c8 authored by twinaphex's avatar twinaphex
Browse files

Cleanup

parent 62c6d60c
...@@ -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:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment