mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 06:40:48 +00:00
Start hooking up more resolution functions - not working properly yet
This commit is contained in:
parent
365cfd22ee
commit
dccc9711d9
@ -30,6 +30,9 @@
|
|||||||
#include "../../tasks/tasks_internal.h"
|
#include "../../tasks/tasks_internal.h"
|
||||||
#include "../../core_info.h"
|
#include "../../core_info.h"
|
||||||
|
|
||||||
|
static unsigned current_window_width = 0;
|
||||||
|
static unsigned current_window_height = 0;
|
||||||
|
|
||||||
#if !defined(_XBOX)
|
#if !defined(_XBOX)
|
||||||
|
|
||||||
#define IDI_ICON 1
|
#define IDI_ICON 1
|
||||||
@ -752,8 +755,8 @@ static bool win32_monitor_set_fullscreen(unsigned width, unsigned height,
|
|||||||
|
|
||||||
memset(&devmode, 0, sizeof(devmode));
|
memset(&devmode, 0, sizeof(devmode));
|
||||||
devmode.dmSize = sizeof(DEVMODE);
|
devmode.dmSize = sizeof(DEVMODE);
|
||||||
devmode.dmPelsWidth = width;
|
devmode.dmPelsWidth = (current_window_width == 0) ? width : current_window_width;
|
||||||
devmode.dmPelsHeight = height;
|
devmode.dmPelsHeight = (current_window_height == 0) ? height : current_window_height;
|
||||||
devmode.dmDisplayFrequency = refresh;
|
devmode.dmDisplayFrequency = refresh;
|
||||||
devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
|
devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
|
||||||
|
|
||||||
@ -1051,7 +1054,7 @@ void win32_destroy_window(void)
|
|||||||
#ifndef _XBOX
|
#ifndef _XBOX
|
||||||
UnregisterClass("RetroArch", GetModuleHandle(NULL));
|
UnregisterClass("RetroArch", GetModuleHandle(NULL));
|
||||||
#endif
|
#endif
|
||||||
main_window.hwnd = NULL;
|
main_window.hwnd = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void win32_get_video_output_prev(
|
void win32_get_video_output_prev(
|
||||||
@ -1087,8 +1090,10 @@ void win32_get_video_output_prev(
|
|||||||
|
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
*width = prev_width;
|
*width = prev_width;
|
||||||
*height = prev_height;
|
*height = prev_height;
|
||||||
|
current_window_width = prev_width;
|
||||||
|
current_window_height = prev_height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1110,8 +1115,10 @@ void win32_get_video_output_next(
|
|||||||
{
|
{
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
*width = dm.dmPelsWidth;
|
*width = dm.dmPelsWidth;
|
||||||
*height = dm.dmPelsHeight;
|
*height = dm.dmPelsHeight;
|
||||||
|
current_window_width = *width;
|
||||||
|
current_window_height = *height;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1126,7 +1133,12 @@ void win32_get_video_output_size(unsigned *width, unsigned *height)
|
|||||||
memset(&dm, 0, sizeof(dm));
|
memset(&dm, 0, sizeof(dm));
|
||||||
dm.dmSize = sizeof(dm);
|
dm.dmSize = sizeof(dm);
|
||||||
|
|
||||||
if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm) != 0)
|
if (current_window_width != 0 && current_window_height != 0)
|
||||||
|
{
|
||||||
|
*width = current_window_width;
|
||||||
|
*height = current_window_height;
|
||||||
|
}
|
||||||
|
else if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm) != 0)
|
||||||
{
|
{
|
||||||
*width = dm.dmPelsWidth;
|
*width = dm.dmPelsWidth;
|
||||||
*height = dm.dmPelsHeight;
|
*height = dm.dmPelsHeight;
|
||||||
|
@ -710,10 +710,16 @@ static void gfx_ctx_wgl_get_video_output_size(void *data,
|
|||||||
|
|
||||||
static void gfx_ctx_wgl_get_video_output_prev(void *data)
|
static void gfx_ctx_wgl_get_video_output_prev(void *data)
|
||||||
{
|
{
|
||||||
|
unsigned width = 0;
|
||||||
|
unsigned height = 0;
|
||||||
|
win32_get_video_output_prev(&width, &height);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx_ctx_wgl_get_video_output_next(void *data)
|
static void gfx_ctx_wgl_get_video_output_next(void *data)
|
||||||
{
|
{
|
||||||
|
unsigned width = 0;
|
||||||
|
unsigned height = 0;
|
||||||
|
win32_get_video_output_next(&width, &height);
|
||||||
}
|
}
|
||||||
|
|
||||||
const gfx_ctx_driver_t gfx_ctx_wgl = {
|
const gfx_ctx_driver_t gfx_ctx_wgl = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user