mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
A bit more GetPointer cleanup.
Probably not worth it for performance reasons, but some semantic cleanup is good, especially the accidental GetPointer -> writable casts without using GetPointerWrite. Using Unchecked on already checked pointers, or when we'd crash anyway if it returned nullptr, is good for clarity.
This commit is contained in:
1 parent
70e149e3ca
commit
e1a48d74c4
11 files changed
+42
-26
No files matched your search
@@ -1103,7 +1103,7 @@ void FramebufferManagerCommon::UpdateFromMemory(u32 addr, int size) {
|
||||
// TODO: This doesn't seem quite right anymore.
|
||||
fmt = displayFormat_;
|
||||
}
|
||||
DrawPixels(vfb, 0, 0, Memory::GetPointer(addr), fmt, vfb->fb_stride, vfb->width, vfb->height, RASTER_COLOR, "UpdateFromMemory_DrawPixels");
|
||||
DrawPixels(vfb, 0, 0, Memory::GetPointerUnchecked(addr), fmt, vfb->fb_stride, vfb->width, vfb->height, RASTER_COLOR, "UpdateFromMemory_DrawPixels");
|
||||
SetColorUpdated(vfb, gstate_c.skipDrawReason);
|
||||
} else {
|
||||
INFO_LOG(FRAMEBUF, "Invalidating FBO for %08x (%dx%d %s)", vfb->fb_address, vfb->width, vfb->height, GeBufferFormatToString(vfb->fb_format));
|
||||
@@ -1474,7 +1474,7 @@ void FramebufferManagerCommon::CopyDisplayToOutput(bool reallyDirty) {
|
||||
if (Memory::IsValidAddress(fbaddr)) {
|
||||
// The game is displaying something directly from RAM. In GTA, it's decoded video.
|
||||
if (!vfb) {
|
||||
DrawFramebufferToOutput(Memory::GetPointer(fbaddr), displayStride_, displayFormat_);
|
||||
DrawFramebufferToOutput(Memory::GetPointerUnchecked(fbaddr), displayStride_, displayFormat_);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user