From 86ac4d1ef7fcdd59f16aeb10e3802c33ead0827d Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 12 Jan 2026 15:41:47 -0800
Subject: [PATCH] Update src/IMG_gpu.c
---
examples/showgpuimage.c | 4 ++--
src/IMG_gpu.c | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/examples/showgpuimage.c b/examples/showgpuimage.c
index f01c8e24..7bdbb363 100644
--- a/examples/showgpuimage.c
+++ b/examples/showgpuimage.c
@@ -26,8 +26,8 @@
static SDL_Window *window;
static SDL_GPUDevice *device;
static SDL_GPUTexture *texture;
-static Uint32 texture_width;
-static Uint32 texture_height;
+static int texture_width;
+static int texture_height;
static const char *get_file_path(const char *file)
{
diff --git a/src/IMG_gpu.c b/src/IMG_gpu.c
index e002b0fd..e0ae2333 100644
--- a/src/IMG_gpu.c
+++ b/src/IMG_gpu.c
@@ -21,7 +21,7 @@
#include <SDL3_image/SDL_image.h>
-static SDL_GPUTexture * LoadGPUTexture(SDL_GPUDevice *device, SDL_GPUCopyPass *copy_pass, SDL_Surface *surface, Uint32 *width, Uint32 *height)
+static SDL_GPUTexture * LoadGPUTexture(SDL_GPUDevice *device, SDL_GPUCopyPass *copy_pass, SDL_Surface *surface, int *width, int *height)
{
if (width) {
*width = 0;
@@ -77,8 +77,7 @@ static SDL_GPUTexture * LoadGPUTexture(SDL_GPUDevice *device, SDL_GPUCopyPass *c
const int row_bytes = surface->w * 4;
if (row_bytes == surface->pitch) {
SDL_memcpy(dst, src, row_bytes * surface->h);
- }
- else {
+ } else {
for (int y = 0; y < surface->h; y++) {
SDL_memcpy(dst + y * row_bytes, src + y * surface->pitch, row_bytes);
}