File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1429,6 +1429,24 @@ impl Window {
1429
1429
}
1430
1430
}
1431
1431
1432
+ #[ doc( alias = "SDL_GetWindowICCProfile" ) ]
1433
+ pub fn icc_profile ( & self ) -> Result < Vec < u8 > , String > {
1434
+ unsafe {
1435
+ let mut size: sys:: size_t = 0 ;
1436
+ let data = sys:: SDL_GetWindowICCProfile (
1437
+ self . context . raw ,
1438
+ & mut size as * const sys:: size_t as * mut _ ,
1439
+ ) ;
1440
+ if data. is_null ( ) {
1441
+ return Err ( get_error ( ) ) ;
1442
+ }
1443
+ let mut result = vec ! [ 0 ; size as usize ] ;
1444
+ result. copy_from_slice ( std:: slice:: from_raw_parts ( data as * const u8 , size as usize ) ) ;
1445
+ sys:: SDL_free ( data) ;
1446
+ Ok ( result)
1447
+ }
1448
+ }
1449
+
1432
1450
#[ doc( alias = "SDL_GetWindowPixelFormat" ) ]
1433
1451
pub fn window_pixel_format ( & self ) -> PixelFormatEnum {
1434
1452
unsafe {
You can’t perform that action at this time.
0 commit comments