X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrfileman;a=blobdiff_plain;f=src%2Fapp.cc;h=c3f6b3928c57400a9f04490d01cf4f2c0f4b3b0f;hp=aaee8cb6e16d3b149b4e6e9f8af0f8dbdc8574ef;hb=8afeabf06c79c755e5aaffa224e06c4abc92d833;hpb=f19edacadfd124dae0d6666a86fb1b6ca4df8969 diff --git a/src/app.cc b/src/app.cc index aaee8cb..c3f6b39 100644 --- a/src/app.cc +++ b/src/app.cc @@ -143,6 +143,10 @@ void app_reshape(int x, int y) glMatrixMode(GL_PROJECTION); glLoadMatrixf(mat[0]); + + if(opt.vr) { + goatvr_set_fb_size(x, y, 1.0); + } } void app_keyboard(int key, bool pressed) @@ -153,6 +157,17 @@ void app_keyboard(int key, bool pressed) app_quit(); break; + case 'f': + if(!opt.vr || should_swap) { + /* we take the need to swap as a signal that our window is not managed + * by some VR compositor, and therefore it's safe to fullscreen without + * upsetting the VR rendering output + */ + opt.fullscreen = !opt.fullscreen; + app_fullscreen(opt.fullscreen); + } + break; + case ' ': if(opt.vr) { goatvr_recenter();