Skip to content

Commit

Permalink
change: feature check GetMemoryMode call instead of using IsDESRMachine
Browse files Browse the repository at this point in the history
  • Loading branch information
uyjulian committed Jan 24, 2025
1 parent b3916e5 commit f1c1aa8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ee/libcglue/samples/mem_test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <assert.h>

#include <kernel.h>
#include <syscallnr.h>
#include <rom0_info.h>

#if defined(SCREEN_DEBUG)
Expand Down Expand Up @@ -52,7 +53,7 @@ void _libcglue_rtc_update() {}
// "weak" function called by crt0.o
void _ps2sdk_memory_init()
{
if (GetMemorySize() == (32 * 1024 * 1024) && IsDESRMachine() == 1) {
if (GetMemorySize() == (32 * 1024 * 1024) && GetSyscallHandler(__NR_GetMemoryMode) && GetMemoryMode() == 1) {
// Switch to 64MiB mode
SetMemoryMode(0);
_InitTLB();
Expand Down

0 comments on commit f1c1aa8

Please sign in to comment.