mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-18 01:08:16 +00:00
Fixed Visual Studio warning 4389
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user