mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-11-04 09:44:35 +00:00 
			
		
		
		
	testgles2.c: refresh cached SDL_GL_GetDrawableSize() on SDL_WINDOWEVENT_SIZE_CHANGED, not SDL_WINDOWEVENT_RESIZED
Fixes bug with viewport not updating when moving window between monitors with different scale factors on Windows (this should also fix the same issue on other OS'es, though untested)
This commit is contained in:
		
				
					committed by
					
						
						Sam Lantinga
					
				
			
			
				
	
			
			
			
						parent
						
							ab81a559f4
						
					
				
				
					commit
					2830895740
				
			@@ -454,7 +454,7 @@ void loop()
 | 
			
		||||
        switch (event.type) {
 | 
			
		||||
        case SDL_WINDOWEVENT:
 | 
			
		||||
            switch (event.window.event) {
 | 
			
		||||
                case SDL_WINDOWEVENT_RESIZED:
 | 
			
		||||
                case SDL_WINDOWEVENT_SIZE_CHANGED:
 | 
			
		||||
                    for (i = 0; i < state->num_windows; ++i) {
 | 
			
		||||
                        if (event.window.windowID == SDL_GetWindowID(state->windows[i])) {
 | 
			
		||||
                            int w, h;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user