Sfoglia il codice sorgente

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

pull/5194/head
Jeffery Myers 3 settimane fa
committed by GitHub
parent
commit
7729727752
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: B5690EEEBB952194
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. +2
    -3
      src/rtextures.c

+ 2
- 3
src/rtextures.c Vedi File

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

Caricamento…
Annulla
Salva