mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-11-04 01:34:38 +00:00 
			
		
		
		
	Fixed crash when switching a window from using OpenGL to Metal
This commit is contained in:
		@@ -120,6 +120,8 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
 | 
				
			|||||||
        [data.uiwindow layoutIfNeeded];
 | 
					        [data.uiwindow layoutIfNeeded];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    sdlwindow = window;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Add ourself to the new window. */
 | 
					    /* Add ourself to the new window. */
 | 
				
			||||||
    if (window) {
 | 
					    if (window) {
 | 
				
			||||||
        data = (__bridge SDL_UIKitWindowData *)window->internal;
 | 
					        data = (__bridge SDL_UIKitWindowData *)window->internal;
 | 
				
			||||||
@@ -144,8 +146,6 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
 | 
				
			|||||||
         * layout now to immediately update the bounds. */
 | 
					         * layout now to immediately update the bounds. */
 | 
				
			||||||
        [data.uiwindow layoutIfNeeded];
 | 
					        [data.uiwindow layoutIfNeeded];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    sdlwindow = window;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- (SDL_Window *)getSDLWindow
 | 
					- (SDL_Window *)getSDLWindow
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user