mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-10-26 12:27:44 +00:00 
			
		
		
		
	test/testnativecocoa.m: fixed deprecation warnings.
This commit is contained in:
		| @@ -3,8 +3,15 @@ | ||||
|  | ||||
| #ifdef TEST_NATIVE_COCOA | ||||
|  | ||||
| #include <AvailabilityMacros.h> | ||||
| #include <Cocoa/Cocoa.h> | ||||
|  | ||||
| #ifndef MAC_OS_X_VERSION_10_12 | ||||
| static const unsigned int NSWindowStyleMaskTitled = NSTitledWindowMask; | ||||
| static const unsigned int NSWindowStyleMiniaturizableMask = NSMiniaturizableWindowMask; | ||||
| static const unsigned int NSWindowStyleMaskClosable = NSClosableWindowMask; | ||||
| #endif | ||||
|  | ||||
| static void *CreateWindowCocoa(int w, int h); | ||||
| static void DestroyWindowCocoa(void *window); | ||||
|  | ||||
| @@ -29,7 +36,7 @@ static void *CreateWindowCocoa(int w, int h) | ||||
|     rect.size.height = h; | ||||
|     rect.origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - rect.origin.y - rect.size.height; | ||||
|  | ||||
|     style = (NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask); | ||||
|     style = (NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMiniaturizableMask); | ||||
|  | ||||
|     nswindow = [[NSWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:FALSE]; | ||||
|     [nswindow makeKeyAndOrderFront:nil]; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ozkan Sezer
					Ozkan Sezer