Skip to content

Commit

Permalink
merge fallout: Patched to compile, fixed some compiler warnings, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Nov 1, 2018
1 parent 62494a2 commit 4659e73
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/render/SDL_render.c
Expand Up @@ -2858,6 +2858,7 @@ SDL_RenderCopyF(SDL_Renderer * renderer, SDL_Texture * texture,
}
}

SDL_zero(r);
SDL_RenderGetViewport(renderer, &r);
real_dstrect.x = 0.0f;
real_dstrect.y = 0.0f;
Expand Down Expand Up @@ -2956,6 +2957,7 @@ SDL_RenderCopyExF(SDL_Renderer * renderer, SDL_Texture * texture,
real_dstrect = *dstrect;
} else {
SDL_Rect r;
SDL_zero(r);
SDL_RenderGetViewport(renderer, &r);
real_dstrect.x = 0.0f;
real_dstrect.y = 0.0f;
Expand Down
2 changes: 1 addition & 1 deletion src/render/direct3d/SDL_render_d3d.c
Expand Up @@ -1306,7 +1306,7 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_POINTLIST, first / sizeof (Vertex), count);
} else {
const Vertex *verts = (Vertex *) (((Uint8 *) vertices) + first);
IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_POINTLIST, count, vertices, sizeof (Vertex));
IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_POINTLIST, count, verts, sizeof (Vertex));
}
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/render/metal/SDL_render_metal.m
Expand Up @@ -553,7 +553,7 @@ - (void)dealloc
mtltexdesc.height = (texture->h + 1) / 2;
}

if (yuv || nc12) {
if (yuv || nv12) {
mtltexture_uv = [data.mtldevice newTextureWithDescriptor:mtltexdesc];
if (mtltexture_uv == nil) {
#if !__has_feature(objc_arc)
Expand Down
8 changes: 4 additions & 4 deletions src/render/opengles2/SDL_render_gles2.c
Expand Up @@ -1297,11 +1297,11 @@ GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver
if (SetDrawState(data, cmd, GLES2_IMAGESOURCE_SOLID) == 0) {
if (count > 2 && (verts[0] == verts[(count-1)*2]) && (verts[1] == verts[(count*2)-1])) {
/* GL_LINE_LOOP takes care of the final segment */
data->glDrawArrays(GL_LINE_LOOP, 0, count - 1);
data->glDrawArrays(GL_LINE_LOOP, 0, (GLsizei) (count - 1));
} else {
data->glDrawArrays(GL_LINE_STRIP, 0, count);
data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) count);
/* We need to close the endpoint of the line */
data->glDrawArrays(GL_POINTS, count - 1, 1);
data->glDrawArrays(GL_POINTS, (GLsizei) (count - 1), 1);
}
}
break;
Expand All @@ -1312,7 +1312,7 @@ GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver
size_t offset = 0;
if (SetDrawState(data, cmd, GLES2_IMAGESOURCE_SOLID) == 0) {
for (i = 0; i < count; ++i, offset += 4) {
data->glDrawArrays(GL_TRIANGLE_STRIP, offset, 4);
data->glDrawArrays(GL_TRIANGLE_STRIP, (GLsizei) offset, 4);
}
}
break;
Expand Down
1 change: 0 additions & 1 deletion src/video/windows/SDL_windowsevents.c
Expand Up @@ -962,7 +962,6 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
UINT i;
HDROP drop = (HDROP) wParam;
SDL_bool isstack;
UINT count = DragQueryFile(drop, 0xFFFFFFFF, NULL, 0);
for (i = 0; i < count; ++i) {
SDL_bool isstack;
Expand Down
2 changes: 1 addition & 1 deletion src/video/windows/SDL_windowsmouse.c
Expand Up @@ -113,7 +113,7 @@ WIN_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
bmh.bV4BlueMask = 0x000000FF;

maskbitslen = ((surface->w + (pad - (surface->w % pad))) / 8) * surface->h;
maskbits = SDL_small_alloc(Uint8,maskbitslen);
maskbits = SDL_small_alloc(Uint8, maskbitslen, &isstack);
if (maskbits == NULL) {
SDL_OutOfMemory();
return NULL;
Expand Down

0 comments on commit 4659e73

Please sign in to comment.