Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hack Vram_alloc_4956C0 to never fail to not de-sync abi_break #1581

Merged
merged 2 commits into from
Oct 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Source/AliveLibAE/VRam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "PsxDisplay.hpp"
#include <gmock/gmock.h>
#include "Renderer/IRenderer.hpp"
#include "BaseGameAutoPlayer.hpp"

const s32 kMaxAllocs = 512;

Expand Down Expand Up @@ -166,6 +167,15 @@ EXPORT s16 CC Vram_alloc_4956C0(u16 width, s16 height, u16 colourDepth, PSX_RECT

if (sVramNumberOfAllocations_5CC888 >= kMaxAllocs || !Vram_alloc_block_4957B0(&rect, depth))
{
if (GetGameAutoPlayer().IsRecording() || GetGameAutoPlayer().IsPlaying())
{
LOG_WARNING("Fat vram alloc hax");
pRect->w = 1;
pRect->h = 1;
pRect->x = 1024 - 1;
pRect->y = 512 - 1;
return 1;
}
return 0;
}

Expand Down