mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Merge pull request #43 from alphanu1/master-3
Linux / Windows hz bug fix and Linux low res modeline generator fix
This commit is contained in:
commit
9474b4be74
@ -102,11 +102,11 @@ static void* win32_display_server_init(void)
|
||||
|
||||
static void win32_display_server_destroy(void *data)
|
||||
{
|
||||
dispserv_win32_t *dispserv = (dispserv_win32_t*)data;
|
||||
|
||||
if (win32_orig_width > 0 && win32_orig_height > 0)
|
||||
if (win32_orig_width > 0 && win32_orig_height > 0 )
|
||||
video_display_server_switch_resolution(win32_orig_width, win32_orig_height,
|
||||
0, 60);
|
||||
60, 60);
|
||||
|
||||
dispserv_win32_t *dispserv = (dispserv_win32_t*)data;
|
||||
|
||||
#ifdef HAS_TASKBAR_EXT
|
||||
if (g_taskbarList && win32_taskbar_is_created())
|
||||
@ -200,14 +200,14 @@ static bool win32_set_window_decorations(void *data, bool on)
|
||||
}
|
||||
|
||||
static bool win32_display_server_set_resolution(void *data,
|
||||
unsigned width, unsigned height, int f_restore, float hz)
|
||||
unsigned width, unsigned height, int win_hz, float hz)
|
||||
{
|
||||
LONG res;
|
||||
DEVMODE curDevmode;
|
||||
DEVMODE devmode;
|
||||
|
||||
int iModeNum;
|
||||
int freq = 0;
|
||||
int freq = win_hz;
|
||||
DWORD flags = 0;
|
||||
int depth = 0;
|
||||
dispserv_win32_t *serv = (dispserv_win32_t*)data;
|
||||
@ -215,24 +215,10 @@ static bool win32_display_server_set_resolution(void *data,
|
||||
if (!serv)
|
||||
return false;
|
||||
|
||||
if (win32_orig_width == 0)
|
||||
win32_orig_width = GetSystemMetrics(SM_CXSCREEN);
|
||||
if (win32_orig_height == 0)
|
||||
win32_orig_height = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
/* set hz float to an int for windows switching */
|
||||
if (hz < 53)
|
||||
hz = 50;
|
||||
if (hz >= 53 && hz < 57)
|
||||
hz = 55;
|
||||
if (hz >= 57)
|
||||
hz = 60;
|
||||
|
||||
video_monitor_set_refresh_rate(hz);
|
||||
|
||||
|
||||
if (f_restore == 0)
|
||||
freq = hz;
|
||||
if (orig_width == 0)
|
||||
orig_width = GetSystemMetrics(SM_CXSCREEN);
|
||||
if (orig_height == 0)
|
||||
orig_height = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &curDevmode);
|
||||
|
||||
|
@ -82,7 +82,7 @@ static bool x11_set_window_decorations(void *data, bool on)
|
||||
}
|
||||
|
||||
static bool x11_set_resolution(void *data,
|
||||
unsigned width, unsigned height, int f_restore, float hz)
|
||||
unsigned width, unsigned height, int win_hz, float hz)
|
||||
{
|
||||
int i = 0;
|
||||
int hfp = 0;
|
||||
@ -113,13 +113,13 @@ static bool x11_set_resolution(void *data,
|
||||
if (width > 599 && width < 1919)
|
||||
{
|
||||
hfp = width+16;
|
||||
hbp = width*1.10-8;
|
||||
hbp = width*1.18;
|
||||
}
|
||||
|
||||
if (width > 1919 && width < 2559)
|
||||
{
|
||||
hfp = width+32;
|
||||
hbp = width*1.10;
|
||||
hbp = width*1.20;
|
||||
}
|
||||
|
||||
if (width > 2559)
|
||||
|
Loading…
x
Reference in New Issue
Block a user