adjusted the touchscreen coordinate system again to match the driver
This commit is contained in:
		
							parent
							
								
									f436cf9200
								
							
						
					
					
						commit
						e15bd3ab90
					
				@ -150,12 +150,11 @@ static BOOL poll_touchscreen(void)
 | 
			
		||||
    		break;
 | 
			
		||||
 | 
			
		||||
      case EV_ABS:
 | 
			
		||||
        /* The screen driver thinks the screen is horizontal with origin at lower left and max at upper right. */
 | 
			
		||||
        /* Remap coordinates so origin is at upper left and max is lower right. */
 | 
			
		||||
        /* The screen driver thinks the screen is horizontal with origin at upper left and max at lower right. */
 | 
			
		||||
    		if (buffer[i].code == ABS_X)
 | 
			
		||||
    		  touch_x = buffer[i].value;
 | 
			
		||||
    		else if (buffer[i].code == ABS_Y)
 | 
			
		||||
    		  touch_y = Fb_Info->height - buffer[i].value;
 | 
			
		||||
    		  touch_y = buffer[i].value;
 | 
			
		||||
    		break;
 | 
			
		||||
 | 
			
		||||
      case EV_KEY:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user