# HG changeset patch # User John Tsiombikas # Date 1427943461 -10800 # Node ID 9ee3ab70ca6b3c7628e16beb59f03b2a0aad42c8 # Parent 46291bf81d0a6f747d1969624d59032c9d47ea11 Backed out changeset 46291bf81d0a diff -r 46291bf81d0a -r 9ee3ab70ca6b src/main.c --- a/src/main.c Mon Mar 30 07:27:01 2015 +0300 +++ b/src/main.c Thu Apr 02 05:57:41 2015 +0300 @@ -46,8 +46,6 @@ static SDL_GLContext ctx; static int win_width, win_height; -static int fullscr_pending; - static unsigned int fbo, fb_tex, fb_depth; static int fb_width, fb_height; static int fb_tex_width, fb_tex_height; @@ -220,7 +218,7 @@ void toggle_hmd_fullscreen(void) { - static int fullscr, prev_x, prev_y, prev_xsz, prev_ysz; + static int fullscr, prev_x, prev_y; fullscr = !fullscr; if(fullscr) { @@ -228,11 +226,8 @@ * to the rift's part of the desktop before going fullscreen */ SDL_GetWindowPosition(win, &prev_x, &prev_y); - SDL_GetWindowSize(win, &prev_xsz, &prev_ysz); - SDL_SetWindowSize(win, hmd->Resolution.h, hmd->Resolution.w); SDL_SetWindowPosition(win, hmd->WindowsPos.x, hmd->WindowsPos.y); - fullscr_pending = 1; - /*SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN_DESKTOP);*/ + SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN_DESKTOP); #ifdef OVR_OS_LINUX /* on linux for now we have to deal with screen rotation during rendering. The docs are promoting @@ -248,7 +243,6 @@ /* return to windowed mode and move the window back to its original position */ SDL_SetWindowFullscreen(win, 0); SDL_SetWindowPosition(win, prev_x, prev_y); - SDL_SetWindowSize(win, prev_xsz, prev_ysz); #ifdef OVR_OS_LINUX glcfg.OGL.Header.BackBufferSize = hmd->Resolution; @@ -508,10 +502,6 @@ case SDL_WINDOWEVENT: if(ev->window.event == SDL_WINDOWEVENT_RESIZED) { reshape(ev->window.data1, ev->window.data2); - if(fullscr_pending) { - SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN); - fullscr_pending = 0; - } } break;