Explorar el Código

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

pull/5194/head
Jeffery Myers hace 4 meses
cometido por GitHub
padre
commit
7729727752
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: B5690EEEBB952194
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. +2
    -3
      src/rtextures.c

+ 2
- 3
src/rtextures.c Ver fichero

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

Cargando…
Cancelar
Guardar