oculus1

diff src/main.cc @ 28:cedf581048c7

merged with removal of the shaderless crap
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 26 Oct 2013 04:24:16 +0300
parents 9f783284a503 75ab0d4ce2bb
children 9a973ef0e2a3
line diff
     1.1 --- a/src/main.cc	Sat Oct 26 03:54:35 2013 +0300
     1.2 +++ b/src/main.cc	Sat Oct 26 04:24:16 2013 +0300
     1.3 @@ -431,9 +431,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 @@ -515,13 +515,6 @@
    1.15  	case 'f':
    1.16  		toggle_fullscreen();
    1.17  		break;
    1.18 -
    1.19 -	case '\\':
    1.20 -		{
    1.21 -			extern bool dbg_enable;
    1.22 -			dbg_enable = !dbg_enable;
    1.23 -		}
    1.24 -		break;
    1.25  	}
    1.26  
    1.27  	keystate[key] = true;
    1.28 @@ -559,7 +552,11 @@
    1.29  	int center_y = height / 2;
    1.30  
    1.31  	int dx = x - center_x;
    1.32 -	int dy = use_vr ? 0 : y - center_y;
    1.33 +	int dy = y - center_y;
    1.34 +
    1.35 +	if(use_vr && fullscreen) {
    1.36 +		dy = 0;
    1.37 +	}
    1.38  
    1.39  	if(!dx && !dy) {
    1.40  		return;