mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Fix dialog rendering (PPGe). Fixes #15954
Was caused by 867eb99
, part of #15950 .
This commit is contained in:
parent
6b1e4806cf
commit
65c016d154
@ -467,6 +467,11 @@ struct PSPPointer
|
||||
PSPPointerNotifyRW(2, (uint32_t)ptr, (uint32_t)sizeof(T), tag, tagLen - 1);
|
||||
}
|
||||
|
||||
size_t ElementSize() const
|
||||
{
|
||||
return sizeof(T);
|
||||
}
|
||||
|
||||
static PSPPointer<T> Create(u32 ptr) {
|
||||
PSPPointer<T> p;
|
||||
p = ptr;
|
||||
|
@ -182,13 +182,13 @@ static void Vertex(float x, float y, float u, float v, int tw, int th, u32 color
|
||||
vtx->x = x; vtx->y = y; vtx->z = 0;
|
||||
vtx->u = u * tw; vtx->v = v * th;
|
||||
vtx->color = color;
|
||||
dataWritePtr += sizeof(vtx);
|
||||
dataWritePtr += (u32)vtx.ElementSize();
|
||||
} else {
|
||||
auto vtx = PSPPointer<PPGeVertex>::Create(dataWritePtr);
|
||||
vtx->x = x; vtx->y = y; vtx->z = 0;
|
||||
vtx->u = u * tw; vtx->v = v * th;
|
||||
vtx->color = color;
|
||||
dataWritePtr += sizeof(vtx);
|
||||
dataWritePtr += (u32)vtx.ElementSize();
|
||||
}
|
||||
_dbg_assert_(dataWritePtr <= dataPtr + dataSize);
|
||||
vertexCount++;
|
||||
|
Loading…
Reference in New Issue
Block a user