Added functions for new CRT SwitchRes options

This commit is contained in:
alphanu1 2018-09-23 20:42:31 +01:00 committed by GitHub
parent 0241ddb3ba
commit e6b8dcf5b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -69,6 +69,7 @@ be received by your application before it calls any ITaskbarList3 method.
static unsigned win32_orig_width = 0;
static unsigned win32_orig_height = 0;
static unsigned win32_orig_refresh = 0;
static int crt_center = 0;
static void* win32_display_server_init(void)
{
@ -107,7 +108,7 @@ static void win32_display_server_destroy(void *data)
if (win32_orig_width > 0 && win32_orig_height > 0 )
video_display_server_switch_resolution(win32_orig_width, win32_orig_height,
win32_orig_refresh , (float)win32_orig_refresh );
win32_orig_refresh , (float)win32_orig_refresh, crt_center );
#ifdef HAS_TASKBAR_EXT
if (g_taskbarList && win32_taskbar_is_created())
@ -201,7 +202,7 @@ static bool win32_display_server_set_window_decorations(void *data, bool on)
}
static bool win32_display_server_set_resolution(void *data,
unsigned width, unsigned height, int int_hz, float hz)
unsigned width, unsigned height, int int_hz, float hz, int center)
{
LONG res;
DEVMODE curDevmode;

View File

@ -108,7 +108,7 @@ static bool x11_display_server_set_window_decorations(void *data, bool on)
}
static bool x11_display_server_set_resolution(void *data,
unsigned width, unsigned height, int int_hz, float hz)
unsigned width, unsigned height, int int_hz, float hz, int center)
{
int i = 0;
int hfp = 0;