We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8700fdf commit 1c27890Copy full SHA for 1c27890
src/sdl2/video.rs
@@ -1429,6 +1429,24 @@ impl Window {
1429
}
1430
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
+
1450
#[doc(alias = "SDL_GetWindowPixelFormat")]
1451
pub fn window_pixel_format(&self) -> PixelFormatEnum {
1452
unsafe {
0 commit comments