ui/sdl2: pass horizontal scroll information to the device code
Signed-off-by: Dmitry Petrov <dpetroff@gmail.com> Message-Id: <20220108153947.171861-5-dpetroff@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
		
							parent
							
								
									13cb360f6e
								
							
						
					
					
						commit
						ed80f503a1
					
				@ -33,6 +33,7 @@
 | 
				
			|||||||
#include "sysemu/runstate-action.h"
 | 
					#include "sysemu/runstate-action.h"
 | 
				
			||||||
#include "sysemu/sysemu.h"
 | 
					#include "sysemu/sysemu.h"
 | 
				
			||||||
#include "ui/win32-kbd-hook.h"
 | 
					#include "ui/win32-kbd-hook.h"
 | 
				
			||||||
 | 
					#include "qemu/log.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int sdl2_num_outputs;
 | 
					static int sdl2_num_outputs;
 | 
				
			||||||
static struct sdl2_console *sdl2_console;
 | 
					static struct sdl2_console *sdl2_console;
 | 
				
			||||||
@ -535,6 +536,10 @@ static void handle_mousewheel(SDL_Event *ev)
 | 
				
			|||||||
        btn = INPUT_BUTTON_WHEEL_UP;
 | 
					        btn = INPUT_BUTTON_WHEEL_UP;
 | 
				
			||||||
    } else if (wev->y < 0) {
 | 
					    } else if (wev->y < 0) {
 | 
				
			||||||
        btn = INPUT_BUTTON_WHEEL_DOWN;
 | 
					        btn = INPUT_BUTTON_WHEEL_DOWN;
 | 
				
			||||||
 | 
					    } else if (wev->x < 0) {
 | 
				
			||||||
 | 
					        btn = INPUT_BUTTON_WHEEL_RIGHT;
 | 
				
			||||||
 | 
					    } else if (wev->x > 0) {
 | 
				
			||||||
 | 
					        btn = INPUT_BUTTON_WHEEL_LEFT;
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user