Skip to content

Commit

Permalink
Fix Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibrahim778 committed Jan 9, 2022
1 parent 47d8218 commit 1149f19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions src/user/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ bool mainEnd = false;
bool displayed = false;

#ifdef _DEBUG
SceVoid leakTestTask(void)
SceVoid leakTestTask(ScePVoid argp)
{
Allocator *glAlloc = Allocator::GetGlobalAllocator();
SceInt32 sz = glAlloc->GetFreeSize();

SCE_DBG_LOG_INFO("Free heap memory: %d\n", sz);
if(imposePlugin == NULL) return;
print("Free heap memory: %d\n", imposePlugin->memoryPool->GetFreeSize());
}
#endif

Expand All @@ -34,9 +32,6 @@ SceInt32 VblankCallback(SceUID notifyId, SceInt32 notifyCount, SceInt32 notifyAr
//Delay to make sure it displays it at the end
sceKernelDelayThread(1000);

#ifdef _DEBUG
leakTestTask();
#endif
displayed = true;
displayWidgets();

Expand All @@ -52,6 +47,10 @@ int impose_thread(SceSize, void *)
{
//Delay to let shell load properly
sceKernelDelayThread(4 * 1000 * 1000);

#ifdef _DEBUG
common::Utils::AddMainThreadTask(leakTestTask, NULL);
#endif

SceUID CallbackUID = sceKernelCreateCallback("QMR_VblankCB", 0, VblankCallback, NULL);
if (CallbackUID < 0)
Expand Down
2 changes: 1 addition & 1 deletion src/user/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ SceInt32 Utils::CreateTextureFromFile(graphics::Texture *tex, const char *file)
if(err < 0)
return err;

graphics::Texture::CreateFromFile(tex, imposePlugin->memoryPool, &openResult);
graphics::Texture::CreateFromFile(tex, QuickMenuRebornPlugin->memoryPool, &openResult);

openResult.cleanup->cb(openResult.object);
delete openResult.cleanup;
Expand Down

0 comments on commit 1149f19

Please sign in to comment.