oculus2
diff src/main.c @ 22:9ee3ab70ca6b
Backed out changeset 46291bf81d0a
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 02 Apr 2015 05:57:41 +0300 |
parents | 46291bf81d0a |
children | 21067f4802dd |
line diff
1.1 --- a/src/main.c Mon Mar 30 07:27:01 2015 +0300 1.2 +++ b/src/main.c Thu Apr 02 05:57:41 2015 +0300 1.3 @@ -46,8 +46,6 @@ 1.4 static SDL_GLContext ctx; 1.5 static int win_width, win_height; 1.6 1.7 -static int fullscr_pending; 1.8 - 1.9 static unsigned int fbo, fb_tex, fb_depth; 1.10 static int fb_width, fb_height; 1.11 static int fb_tex_width, fb_tex_height; 1.12 @@ -220,7 +218,7 @@ 1.13 1.14 void toggle_hmd_fullscreen(void) 1.15 { 1.16 - static int fullscr, prev_x, prev_y, prev_xsz, prev_ysz; 1.17 + static int fullscr, prev_x, prev_y; 1.18 fullscr = !fullscr; 1.19 1.20 if(fullscr) { 1.21 @@ -228,11 +226,8 @@ 1.22 * to the rift's part of the desktop before going fullscreen 1.23 */ 1.24 SDL_GetWindowPosition(win, &prev_x, &prev_y); 1.25 - SDL_GetWindowSize(win, &prev_xsz, &prev_ysz); 1.26 - SDL_SetWindowSize(win, hmd->Resolution.h, hmd->Resolution.w); 1.27 SDL_SetWindowPosition(win, hmd->WindowsPos.x, hmd->WindowsPos.y); 1.28 - fullscr_pending = 1; 1.29 - /*SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN_DESKTOP);*/ 1.30 + SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN_DESKTOP); 1.31 1.32 #ifdef OVR_OS_LINUX 1.33 /* on linux for now we have to deal with screen rotation during rendering. The docs are promoting 1.34 @@ -248,7 +243,6 @@ 1.35 /* return to windowed mode and move the window back to its original position */ 1.36 SDL_SetWindowFullscreen(win, 0); 1.37 SDL_SetWindowPosition(win, prev_x, prev_y); 1.38 - SDL_SetWindowSize(win, prev_xsz, prev_ysz); 1.39 1.40 #ifdef OVR_OS_LINUX 1.41 glcfg.OGL.Header.BackBufferSize = hmd->Resolution; 1.42 @@ -508,10 +502,6 @@ 1.43 case SDL_WINDOWEVENT: 1.44 if(ev->window.event == SDL_WINDOWEVENT_RESIZED) { 1.45 reshape(ev->window.data1, ev->window.data2); 1.46 - if(fullscr_pending) { 1.47 - SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN); 1.48 - fullscr_pending = 0; 1.49 - } 1.50 } 1.51 break; 1.52