mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	HID: Complete refactor of pad/touch input to fix threading issues.
This commit is contained in:
		
							parent
							
								
									953e09ddb5
								
							
						
					
					
						commit
						d61b26b79f
					
				
					 7 changed files with 109 additions and 204 deletions
				
			
		|  | @ -268,39 +268,33 @@ QByteArray GRenderWindow::saveGeometry() | |||
| 
 | ||||
| void GRenderWindow::keyPressEvent(QKeyEvent* event) | ||||
| { | ||||
|     EmuWindow::KeyPressed({event->key(), keyboard_id}); | ||||
|     Service::HID::PadUpdateComplete(); | ||||
|     this->KeyPressed({event->key(), keyboard_id}); | ||||
| } | ||||
| 
 | ||||
| void GRenderWindow::keyReleaseEvent(QKeyEvent* event) | ||||
| { | ||||
|     EmuWindow::KeyReleased({event->key(), keyboard_id}); | ||||
|     Service::HID::PadUpdateComplete(); | ||||
|     this->KeyReleased({event->key(), keyboard_id}); | ||||
| } | ||||
| 
 | ||||
| void GRenderWindow::mousePressEvent(QMouseEvent *event) | ||||
| { | ||||
|     if (event->button() == Qt::LeftButton)  { | ||||
|     if (event->button() == Qt::LeftButton) | ||||
|     { | ||||
|         auto pos = event->pos(); | ||||
|         EmuWindow::TouchPressed(GetFramebufferLayout(), static_cast<u16>(pos.x()), | ||||
|             static_cast<u16>(pos.y())); | ||||
|         this->TouchPressed(static_cast<unsigned>(pos.x()), static_cast<unsigned>(pos.y())); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void GRenderWindow::mouseMoveEvent(QMouseEvent *event) | ||||
| { | ||||
|     auto pos = event->pos(); | ||||
|     EmuWindow::TouchMoved(GetFramebufferLayout(), static_cast<u16>(pos.x()), | ||||
|         static_cast<u16>(pos.y())); | ||||
|     this->TouchMoved(static_cast<unsigned>(pos.x()), static_cast<unsigned>(pos.y())); | ||||
| } | ||||
| 
 | ||||
| void GRenderWindow::mouseReleaseEvent(QMouseEvent *event) | ||||
| { | ||||
|     if (event->button() == Qt::LeftButton)  { | ||||
|         auto pos = event->pos(); | ||||
|         EmuWindow::TouchReleased(GetFramebufferLayout(), static_cast<u16>(pos.x()), | ||||
|             static_cast<u16>(pos.y())); | ||||
|     } | ||||
|     if (event->button() == Qt::LeftButton) | ||||
|         this->TouchReleased(); | ||||
| } | ||||
| 
 | ||||
| void GRenderWindow::ReloadSetKeymaps() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue