瀏覽代碼

[rtextures] Fix LoadImageFromScreen scaling (#3881)

pull/3879/head
proberge-dev 9 月之前
committed by GitHub
父節點
當前提交
b905dafca0
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: B5690EEEBB952194
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. +3
    -2
      src/rtextures.c

+ 3
- 2
src/rtextures.c 查看文件

@ -681,10 +681,11 @@ Image LoadImageFromTexture(Texture2D texture)
// Load image from screen buffer and (screenshot)
Image LoadImageFromScreen(void)
{
Vector2 scale = GetWindowScaleDPI();
Image image = { 0 };
image.width = GetScreenWidth();
image.height = GetScreenHeight();
image.width = GetScreenWidth()o">*scale.x;
image.height = GetScreenHeight()o">*scale.y;
image.mipmaps = 1;
image.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
image.data = rlReadScreenPixels(image.width, image.height);

Loading…
取消
儲存