mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-28 05:58:30 +00:00
Use the render size not the screen size for screenshots so we use the actual framebuffer size. (#5192)
This commit is contained in:
@@ -592,11 +592,10 @@ Image LoadImageFromTexture(Texture2D texture)
|
||||
// Load image from screen buffer and (screenshot)
|
||||
Image LoadImageFromScreen(void)
|
||||
{
|
||||
Vector2 scale = GetWindowScaleDPI();
|
||||
Image image = { 0 };
|
||||
|
||||
image.width = (int)(GetScreenWidth()*scale.x);
|
||||
image.height = (int)(GetScreenHeight()*scale.y);
|
||||
image.width = (int)(GetRenderWidth());
|
||||
image.height = (int)(GetRenderHeight());
|
||||
image.mipmaps = 1;
|
||||
image.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
|
||||
image.data = rlReadScreenPixels(image.width, image.height);
|
||||
|
Reference in New Issue
Block a user