Added AddScreenshotToLibrary

Added AddScreenshotToLibrary(filename, thumbnailFilename, width, height); 
and AddScreenshotToLibrary(filename, width, height); 

We use Application.TakeScreenshot(path, superSize) in some of our in-game tools (like the camera) to allow for higher-res screenshots, and this feels like a much faster way of doing it then loading the PNG back into a texture2D, converting it into a correct format, and using Write.
This commit is contained in:
Sean L 2018-01-26 03:05:10 +01:00 committed by GitHub
parent 5991839c27
commit b7195adc89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,5 +66,15 @@ public unsafe void Write( byte[] rgbData, int width, int height )
client.native.screenshots.WriteScreenshot( (IntPtr) ptr, (uint) rgbData.Length, width, height ); client.native.screenshots.WriteScreenshot( (IntPtr) ptr, (uint) rgbData.Length, width, height );
} }
} }
public unsafe void AddScreenshotToLibrary( string filename, string thumbnailFilename, int width, int height)
{
client.native.screenshots.AddScreenshotToLibrary(filename, thumbnailFilename, width, height);
}
public unsafe void AddScreenshotToLibrary( string filename, int width, int height)
{
client.native.screenshots.AddScreenshotToLibrary(filename, null, width, height);
}
} }
} }