EThread: Map mouse buttons 8,9 onto X1,X2
This makes the thumb button on my mouse usable under Linux, still have to check what button code they map to under Windows.
This commit is contained in:
		
							parent
							
								
									d71919c2c3
								
							
						
					
					
						commit
						3c6bc765c6
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -215,6 +215,9 @@ void EventThread::process(RGSSThreadData &rtData)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		case SDL_MOUSEBUTTONDOWN :
 | 
							case SDL_MOUSEBUTTONDOWN :
 | 
				
			||||||
		case SDL_MOUSEBUTTONUP :
 | 
							case SDL_MOUSEBUTTONUP :
 | 
				
			||||||
 | 
								if (event.button.button == 8 || event.button.button == 9)
 | 
				
			||||||
 | 
									event.button.button -= (8 - SDL_BUTTON_X1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		case SDL_MOUSEMOTION :
 | 
							case SDL_MOUSEMOTION :
 | 
				
			||||||
			if (event.button.which == SDL_TOUCH_MOUSEID)
 | 
								if (event.button.which == SDL_TOUCH_MOUSEID)
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue