mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 07:20:34 +00:00
Revert "Add size_t argument to d3d_vertex_buffer_lock"
This reverts commit 4f54dbe9d95ec09533c32aee9c7f32646bcb2e1c.
This commit is contained in:
parent
05b923c929
commit
f996563ada
@ -1032,7 +1032,7 @@ static bool texture_image_render(d3d_video_t *d3d,
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Load the existing vertices */
|
/* Load the existing vertices */
|
||||||
verts = d3d_vertex_buffer_lock(d3dv, sizeof(newVerts));
|
verts = d3d_vertex_buffer_lock(d3dv);
|
||||||
|
|
||||||
if (!verts)
|
if (!verts)
|
||||||
return false;
|
return false;
|
||||||
@ -1242,7 +1242,7 @@ static void d3d_overlay_render(d3d_video_t *d3d, overlay_t *overlay)
|
|||||||
vert[i][1] += 0.5f;
|
vert[i][1] += 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
d3d_vertex_buffer_lock(overlay->vert_buf, sizeof(vert));
|
overlay->vert_buf->Lock(0, sizeof(vert), &verts, 0);
|
||||||
memcpy(verts, vert, sizeof(vert));
|
memcpy(verts, vert, sizeof(vert));
|
||||||
d3d_vertex_buffer_unlock(overlay->vert_buf);
|
d3d_vertex_buffer_unlock(overlay->vert_buf);
|
||||||
|
|
||||||
|
@ -70,7 +70,9 @@ typedef struct
|
|||||||
bool enabled;
|
bool enabled;
|
||||||
float alpha_mod;
|
float alpha_mod;
|
||||||
LPDIRECT3DTEXTURE tex;
|
LPDIRECT3DTEXTURE tex;
|
||||||
|
#ifdef HAVE_D3D9
|
||||||
LPDIRECT3DVERTEXBUFFER vert_buf;
|
LPDIRECT3DVERTEXBUFFER vert_buf;
|
||||||
|
#endif
|
||||||
} overlay_t;
|
} overlay_t;
|
||||||
|
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
|
@ -176,15 +176,16 @@ void d3d_vertex_buffer_unlock(LPDIRECT3DVERTEXBUFFER vertbuf)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void *d3d_vertex_buffer_lock(LPDIRECT3DVERTEXBUFFER vertbuf, size_t len)
|
void *d3d_vertex_buffer_lock(LPDIRECT3DVERTEXBUFFER vertbuf)
|
||||||
{
|
{
|
||||||
void *buf;
|
void *buf;
|
||||||
|
|
||||||
#if defined(_XBOX1)
|
#if defined(_XBOX1)
|
||||||
buf = (void*)D3DVertexBuffer_Lock2(vertbuf, 0);
|
buf = (void*)D3DVertexBuffer_Lock2(vertbuf, 0);
|
||||||
#elif defined(_XBOX360)
|
#elif defined(_XBOX360)
|
||||||
buf = D3DVertexBuffer_Lock(vertbuf, 0, 0, 0);
|
buf = D3DVertexBuffer_Lock(vertbuf, 0, 0, 0);
|
||||||
#else
|
#else
|
||||||
vertbuf->Lock(0, len, &buf, 0);
|
vertbuf->Lock(0, sizeof(buf), &buf, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
|
@ -32,7 +32,7 @@ LPDIRECT3DVERTEXBUFFER d3d_vertex_buffer_new(LPDIRECT3DDEVICE dev,
|
|||||||
unsigned length, unsigned usage, unsigned fvf,
|
unsigned length, unsigned usage, unsigned fvf,
|
||||||
D3DPOOL pool, void *handle);
|
D3DPOOL pool, void *handle);
|
||||||
|
|
||||||
void *d3d_vertex_buffer_lock(LPDIRECT3DVERTEXBUFFER vertbuf, size_t len);
|
void *d3d_vertex_buffer_lock(LPDIRECT3DVERTEXBUFFER vertbuf);
|
||||||
void d3d_vertex_buffer_unlock(LPDIRECT3DVERTEXBUFFER vertbuf);
|
void d3d_vertex_buffer_unlock(LPDIRECT3DVERTEXBUFFER vertbuf);
|
||||||
|
|
||||||
void d3d_vertex_buffer_free(void *vertex_data, void *vertex_declaration);
|
void d3d_vertex_buffer_free(void *vertex_data, void *vertex_declaration);
|
||||||
|
@ -1280,7 +1280,7 @@ static void renderchain_set_vertices(
|
|||||||
vert[i].y += 0.5f;
|
vert[i].y += 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
verts = d3d_vertex_buffer_lock(pass->vertex_buf, sizeof(vert));
|
verts = d3d_vertex_buffer_lock(pass->vertex_buf);
|
||||||
memcpy(verts, vert, sizeof(vert));
|
memcpy(verts, vert, sizeof(vert));
|
||||||
d3d_vertex_buffer_unlock(pass->vertex_buf);
|
d3d_vertex_buffer_unlock(pass->vertex_buf);
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ static void renderchain_set_vertices(void *data, unsigned pass,
|
|||||||
vert[i].y += 0.5f / ((float)chain->tex_h);
|
vert[i].y += 0.5f / ((float)chain->tex_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
verts = d3d_vertex_buffer_lock(chain->vertex_buf, sizeof(vert));
|
verts = d3d_vertex_buffer_lock(chain->vertex_buf);
|
||||||
memcpy(verts, vert, sizeof(vert));
|
memcpy(verts, vert, sizeof(vert));
|
||||||
d3d_vertex_buffer_unlock(chain->vertex_buf);
|
d3d_vertex_buffer_unlock(chain->vertex_buf);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user