mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-10-26 12:27:44 +00:00 
			
		
		
		
	 f08ac438ed
			
		
	
	f08ac438ed
	
	
	
		
			
			This helps the compiler warn people when they're doing something like "if (SDL_Init(0) < 0)"
		
			
				
	
	
		
			14 lines
		
	
	
		
			270 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			270 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
| /* Contributed by Piotr Usewicz (https://github.com/pusewicz) */
 | |
| 
 | |
| import SDL3
 | |
| 
 | |
| guard SDL_Init(SDL_INIT_VIDEO) else {
 | |
|   fatalError("SDL_Init error: \(String(cString: SDL_GetError()))")
 | |
| }
 | |
| 
 | |
| var sdlVersion = SDL_GetVersion()
 | |
| 
 | |
| print("SDL version: \(sdlVersion)")
 | |
| 
 | |
| SDL_Quit()
 |