Add untested windowed fullscreen in WGL.

This commit is contained in:
Themaister 2012-10-07 00:21:39 +02:00
parent 0241b463fc
commit 716f37f8bf

View File

@ -230,7 +230,12 @@ static bool gfx_ctx_set_video_mode(
g_resize_width = width; g_resize_width = width;
g_resize_height = height; g_resize_height = height;
bool windowed_full = g_settings.video.windowed_fullscreen;
if (fullscreen) if (fullscreen)
{
if (windowed_full)
style = WS_EX_TOPMOST | WS_POPUP;
else
{ {
style = WS_POPUP | WS_VISIBLE; style = WS_POPUP | WS_VISIBLE;
@ -243,6 +248,7 @@ static bool gfx_ctx_set_video_mode(
g_restore_desktop = true; g_restore_desktop = true;
} }
}
else else
{ {
style = WS_OVERLAPPEDWINDOW; style = WS_OVERLAPPEDWINDOW;
@ -255,7 +261,8 @@ static bool gfx_ctx_set_video_mode(
} }
g_hwnd = CreateWindowEx(0, "RetroArch", "RetroArch", style, g_hwnd = CreateWindowEx(0, "RetroArch", "RetroArch", style,
CW_USEDEFAULT, CW_USEDEFAULT, width, height, windowed_full ? 0 : CW_USEDEFAULT, windowed_full ? 0 : CW_USEDEFAULT,
width, height,
NULL, NULL, NULL, NULL); NULL, NULL, NULL, NULL);
if (!g_hwnd) if (!g_hwnd)
@ -263,7 +270,7 @@ static bool gfx_ctx_set_video_mode(
gfx_ctx_update_window_title(true); gfx_ctx_update_window_title(true);
if (!fullscreen) if (!fullscreen || windowed_full)
{ {
ShowCursor(FALSE); ShowCursor(FALSE);
ShowWindow(g_hwnd, SW_RESTORE); ShowWindow(g_hwnd, SW_RESTORE);