mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Merge pull request #6962 from alphanu1/master
Resolution refresh rate restore bugfix for windows.
This commit is contained in:
commit
e4a8ef409a
@ -68,6 +68,7 @@ be received by your application before it calls any ITaskbarList3 method.
|
|||||||
|
|
||||||
static unsigned win32_orig_width = 0;
|
static unsigned win32_orig_width = 0;
|
||||||
static unsigned win32_orig_height = 0;
|
static unsigned win32_orig_height = 0;
|
||||||
|
static unsigned win32_orig_refresh = 0;
|
||||||
|
|
||||||
static void* win32_display_server_init(void)
|
static void* win32_display_server_init(void)
|
||||||
{
|
{
|
||||||
@ -106,7 +107,7 @@ static void win32_display_server_destroy(void *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,
|
video_display_server_switch_resolution(win32_orig_width, win32_orig_height,
|
||||||
60, 60);
|
win32_orig_refresh , win32_orig_refresh );
|
||||||
|
|
||||||
#ifdef HAS_TASKBAR_EXT
|
#ifdef HAS_TASKBAR_EXT
|
||||||
if (g_taskbarList && win32_taskbar_is_created())
|
if (g_taskbarList && win32_taskbar_is_created())
|
||||||
@ -214,14 +215,15 @@ static bool win32_display_server_set_resolution(void *data,
|
|||||||
|
|
||||||
if (!serv)
|
if (!serv)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &curDevmode);
|
||||||
|
|
||||||
if (win32_orig_width == 0)
|
if (win32_orig_width == 0)
|
||||||
win32_orig_width = GetSystemMetrics(SM_CXSCREEN);
|
win32_orig_width = GetSystemMetrics(SM_CXSCREEN);
|
||||||
|
win32_orig_refresh = curDevmode.dmDisplayFrequency;
|
||||||
if (win32_orig_height == 0)
|
if (win32_orig_height == 0)
|
||||||
win32_orig_height = GetSystemMetrics(SM_CYSCREEN);
|
win32_orig_height = GetSystemMetrics(SM_CYSCREEN);
|
||||||
|
|
||||||
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &curDevmode);
|
|
||||||
|
|
||||||
/* Used to stop super resolution bug */
|
/* Used to stop super resolution bug */
|
||||||
if (width == curDevmode.dmPelsWidth)
|
if (width == curDevmode.dmPelsWidth)
|
||||||
width = 0;
|
width = 0;
|
||||||
|
@ -109,11 +109,6 @@ static bool x11_set_resolution(void *data,
|
|||||||
video_monitor_set_refresh_rate(hz);
|
video_monitor_set_refresh_rate(hz);
|
||||||
|
|
||||||
/* following code is the mode line genorator */
|
/* following code is the mode line genorator */
|
||||||
if (width < 300)
|
|
||||||
{
|
|
||||||
width = width*2;
|
|
||||||
crt_aspect_ratio_switch(width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
hfp = width+8;
|
hfp = width+8;
|
||||||
hbp = width*1.32;
|
hbp = width*1.32;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user