sdl: Avoid redundant scaling deactivation
Prevents screen flickering. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
		
							parent
							
								
									91ada98084
								
							
						
					
					
						commit
						97ad1c260c
					
				
							
								
								
									
										2
									
								
								ui/sdl.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								ui/sdl.c
									
									
									
									
									
								
							@ -583,10 +583,12 @@ static void sdl_refresh(DisplayState *ds)
 | 
				
			|||||||
                        gui_keysym = 1;
 | 
					                        gui_keysym = 1;
 | 
				
			||||||
                        break;
 | 
					                        break;
 | 
				
			||||||
                    case 0x16: /* 'u' key on US keyboard */
 | 
					                    case 0x16: /* 'u' key on US keyboard */
 | 
				
			||||||
 | 
					                        if (scaling_active) {
 | 
				
			||||||
                            scaling_active = 0;
 | 
					                            scaling_active = 0;
 | 
				
			||||||
                            sdl_resize(ds);
 | 
					                            sdl_resize(ds);
 | 
				
			||||||
                            vga_hw_invalidate();
 | 
					                            vga_hw_invalidate();
 | 
				
			||||||
                            vga_hw_update();
 | 
					                            vga_hw_update();
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
                        break;
 | 
					                        break;
 | 
				
			||||||
                    case 0x02 ... 0x0a: /* '1' to '9' keys */
 | 
					                    case 0x02 ... 0x0a: /* '1' to '9' keys */
 | 
				
			||||||
                        /* Reset the modifiers sent to the current console */
 | 
					                        /* Reset the modifiers sent to the current console */
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user