Переглянути джерело

Use the render size not the screen size for screenshots so we use the actual framebuffer size. (#5192)

pull/5194/head
Jeffery Myers 3 тижднів тому
committed by GitHub
джерело
коміт
7729727752
Не вдалося знайти GPG ключ що відповідає даному підпису Ідентифікатор GPG ключа: B5690EEEBB952194
1 змінених файлів з 2 додано та 3 видалено
  1. +2
    -3
      src/rtextures.c

+ 2
- 3
src/rtextures.c Переглянути файл

@ -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);

Завантаження…
Відмінити
Зберегти