Fixed Visual Studio warning 4389

This commit is contained in:
Sam Lantinga
2023-03-30 14:02:04 -07:00
parent d135daad5b
commit 0bd77a5b93
12 changed files with 19 additions and 18 deletions

View File

@@ -1290,7 +1290,7 @@ static int D3D11_UpdateTextureInternal(D3D11_RenderData *rendererData, ID3D11Tex
src = (const Uint8 *)pixels;
dst = textureMemory.pData;
length = w * bpp;
if (length == pitch && length == textureMemory.RowPitch) {
if (length == (UINT)pitch && length == textureMemory.RowPitch) {
SDL_memcpy(dst, src, (size_t)length * h);
} else {
if (length > (UINT)pitch) {

View File

@@ -1579,7 +1579,7 @@ static int GLES2_TexSubImage2D(GLES2_RenderData *data, GLenum target, GLint xoff
/* Reformat the texture data into a tightly packed array */
src_pitch = (size_t)width * bpp;
src = (Uint8 *)pixels;
if (pitch != src_pitch) {
if ((size_t)pitch != src_pitch) {
blob = (Uint8 *)SDL_malloc(src_pitch * height);
if (blob == NULL) {
return SDL_OutOfMemory();