Merge pull request #17727 from hrydgard/switch-back-to-rcheevos-upstream

Switch back to rcheevos upstream
This commit is contained in:
Henrik Rydgård 2023-07-16 17:52:07 +02:00 committed by GitHub
commit eaa131db48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 34 deletions

2
.gitmodules vendored
View File

@ -46,4 +46,4 @@
url = https://github.com/google/cpu_features.git
[submodule "ext/rcheevos"]
path = ext/rcheevos
url = https://github.com/hrydgard/rcheevos.git
url = https://github.com/RetroAchievements/rcheevos.git

View File

@ -161,12 +161,8 @@ static uint32_t read_memory_callback(uint32_t address, uint8_t *buffer, uint32_t
WARN_LOG(G3D, "RetroAchievements PeekMemory: Bad address %08x (%d bytes) (%08x was passed in)", address, num_bytes, orig_address);
}
// TEMPORARY HACK: rcheevos' handling of bad memory accesses causes a LOT of extra work, since
// for some reason these invalid accesses keeps happening. So we'll temporarily to back to the previous
// behavior of simply returning 0. This is fixed in a PR upstream, not yet merged.
uint32_t temp = 0;
memcpy(buffer, &temp, num_bytes);
return num_bytes;
// This tells rcheevos that the access was bad, which should now be handled properly.
return 0;
}
Memory::MemcpyUnchecked(buffer, address, num_bytes);

View File

@ -2604,13 +2604,6 @@ void FramebufferManagerCommon::NotifyRenderResized(int msaaLevel) {
// No drawing is allowed here. This includes anything that might potentially touch a command buffer, like creating images!
// So we need to defer the post processing initialization.
updatePostShaders_ = true;
#ifdef _WIN32
// Seems related - if you're ok with numbers all the time, show some more :)
if (g_Config.iShowStatusFlags != 0) {
ShowScreenResolution();
}
#endif
}
void FramebufferManagerCommon::NotifyConfigChanged() {
@ -2700,24 +2693,6 @@ void FramebufferManagerCommon::UpdateFramebufUsage(VirtualFramebuffer *vfb) {
checkFlag(FB_USAGE_CLUT, vfb->last_frame_clut);
}
void FramebufferManagerCommon::ShowScreenResolution() {
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
std::ostringstream messageStream;
messageStream << gr->T("Internal Resolution") << ": ";
messageStream << PSP_CoreParameter().renderWidth << "x" << PSP_CoreParameter().renderHeight << " ";
if (postShaderIsUpscalingFilter_) {
messageStream << gr->T("(upscaling)") << " ";
} else if (postShaderIsSupersampling_) {
messageStream << gr->T("(supersampling)") << " ";
}
messageStream << gr->T("Window Size") << ": ";
messageStream << PSP_CoreParameter().pixelWidth << "x" << PSP_CoreParameter().pixelHeight;
g_OSD.Show(OSDType::MESSAGE_INFO, messageStream.str(), 0.0f, "resize");
INFO_LOG(SYSTEM, "%s", messageStream.str().c_str());
}
void FramebufferManagerCommon::ClearAllDepthBuffers() {
for (auto vfb : vfbs_) {
vfb->usageFlags |= FB_USAGE_INVALIDATE_DEPTH;

View File

@ -509,7 +509,6 @@ protected:
void BlitFramebufferDepth(VirtualFramebuffer *src, VirtualFramebuffer *dst);
void ResizeFramebufFBO(VirtualFramebuffer *vfb, int w, int h, bool force = false, bool skipCopy = false);
void ShowScreenResolution();
bool ShouldDownloadFramebufferColor(const VirtualFramebuffer *vfb) const;
bool ShouldDownloadFramebufferDepth(const VirtualFramebuffer *vfb) const;

@ -1 +1 @@
Subproject commit 223df0761313c5c9d9f4d4dc4b5897cf41e7e036
Subproject commit aa6324e886e12da0cf24dee1cf4e873571f39191