mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	EmuWindow: Clip mouse input coordinates to emulated screen dimensions.
If the mouse position for a mouse move/drag would take it outside the emulated screen dimensions, clip the coordinates to the emulated screen dimensions. Qt and GLFW will report negative coordinates for mouse positions to the left, or above citra window. Added restriction to mouse coordinates passed to touchmoved by Qt/GLFW to be greater or equal to zero.
This commit is contained in:
		
							parent
							
								
									5b9bbc37d4
								
							
						
					
					
						commit
						b8328593fe
					
				
					 4 changed files with 23 additions and 8 deletions
				
			
		|  | @ -288,7 +288,7 @@ void GRenderWindow::mousePressEvent(QMouseEvent *event) | |||
| void GRenderWindow::mouseMoveEvent(QMouseEvent *event) | ||||
| { | ||||
|     auto pos = event->pos(); | ||||
|     this->TouchMoved(static_cast<unsigned>(pos.x()), static_cast<unsigned>(pos.y())); | ||||
|     this->TouchMoved(static_cast<unsigned>(std::max(pos.x(), 0)), static_cast<unsigned>(std::max(pos.y(), 0))); | ||||
| } | ||||
| 
 | ||||
| void GRenderWindow::mouseReleaseEvent(QMouseEvent *event) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue