mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 15:34:58 +00:00 
			
		
		
		
	Temporary hack to address performance issues in https://github.com/libsdl-org/SDL/issues/6581#issuecomment-1327987916 (thanks @icculus!)
(cherry picked from commit 9c8369e097b229997875c0aeb4dc9cfdcde0e2b2)
This commit is contained in:
		
							parent
							
								
									3f5593d613
								
							
						
					
					
						commit
						8fddf146bf
					
				
							
								
								
									
										10
									
								
								src/SDL.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/SDL.c
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -519,13 +519,21 @@ SDL_Quit(void)
 | 
			
		|||
void
 | 
			
		||||
SDL_GetVersion(SDL_version * ver)
 | 
			
		||||
{
 | 
			
		||||
    static SDL_bool check_hint = SDL_TRUE;
 | 
			
		||||
    static SDL_bool legacy_version = SDL_FALSE;
 | 
			
		||||
 | 
			
		||||
    if (!ver) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    SDL_VERSION(ver);
 | 
			
		||||
 | 
			
		||||
    if (SDL_GetHintBoolean("SDL_LEGACY_VERSION", SDL_FALSE)) {
 | 
			
		||||
    if (check_hint) {
 | 
			
		||||
        check_hint = SDL_FALSE;
 | 
			
		||||
        legacy_version = SDL_GetHintBoolean("SDL_LEGACY_VERSION", SDL_FALSE);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (legacy_version) {
 | 
			
		||||
        /* Prior to SDL 2.24.0, the patch version was incremented with every release */
 | 
			
		||||
        ver->patch = ver->minor;
 | 
			
		||||
        ver->minor = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue