EventThread: Discard fake mouse events on mobile
This commit is contained in:
		
							parent
							
								
									7cbf81c83a
								
							
						
					
					
						commit
						9122446b23
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
					@ -300,14 +300,23 @@ void EventThread::process(RGSSThreadData &rtData)
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		case SDL_MOUSEBUTTONDOWN :
 | 
							case SDL_MOUSEBUTTONDOWN :
 | 
				
			||||||
 | 
								if (event.button.which == SDL_TOUCH_MOUSEID)
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			mouseState.buttons[event.button.button] = true;
 | 
								mouseState.buttons[event.button.button] = true;
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		case SDL_MOUSEBUTTONUP :
 | 
							case SDL_MOUSEBUTTONUP :
 | 
				
			||||||
 | 
								if (event.button.which == SDL_TOUCH_MOUSEID)
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			mouseState.buttons[event.button.button] = false;
 | 
								mouseState.buttons[event.button.button] = false;
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		case SDL_MOUSEMOTION :
 | 
							case SDL_MOUSEMOTION :
 | 
				
			||||||
 | 
								if (event.button.which == SDL_TOUCH_MOUSEID)
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			mouseState.x = event.motion.x;
 | 
								mouseState.x = event.motion.x;
 | 
				
			||||||
			mouseState.y = event.motion.y;
 | 
								mouseState.y = event.motion.y;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue