oculus1

diff src/main.cc @ 22:251bc9e2e4a1

made mouselook only affect horizontal movement in VR mode
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 28 Sep 2013 04:13:09 +0300
parents f3672317e5c2
children 0c76f70fb7e9
line diff
     1.1 --- a/src/main.cc	Sat Sep 21 07:09:48 2013 +0300
     1.2 +++ b/src/main.cc	Sat Sep 28 04:13:09 2013 +0300
     1.3 @@ -400,9 +400,9 @@
     1.4  	}
     1.5  }
     1.6  
     1.7 +static bool fullscreen;
     1.8  static void toggle_fullscreen()
     1.9  {
    1.10 -	static bool fullscreen;
    1.11  	static int prev_x, prev_y;
    1.12  	static int prev_xsz, prev_ysz;
    1.13  
    1.14 @@ -528,6 +528,10 @@
    1.15  	int dx = x - center_x;
    1.16  	int dy = y - center_y;
    1.17  
    1.18 +	if(use_vr && fullscreen) {
    1.19 +		dy = 0;
    1.20 +	}
    1.21 +
    1.22  	if(!dx && !dy) {
    1.23  		return;
    1.24  	}