Procházet zdrojové kódy

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

pull/5194/head
Jeffery Myers před 4 měsíci
odevzdal GitHub
rodič
revize
7729727752
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: B5690EEEBB952194
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. +2
    -3
      src/rtextures.c

+ 2
- 3
src/rtextures.c Zobrazit soubor

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

Načítá se…
Zrušit
Uložit