Skip to content

Commit e6f25d6

Browse files
committed
cleanup: use GetSyscallHandler to check if _GetGsDxDyOffset exists
1 parent d67992d commit e6f25d6

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

ee/gs/src/gsInit.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,10 @@
2121
#include <kernel.h>
2222
#include <osd_config.h>
2323
#include <rom0_info.h>
24+
#include <syscallnr.h>
2425

2526
#define posixIODriver { open, close, (int (*)(int, void *, int))read, O_RDONLY }
2627

27-
#if F__gsInit_internal
28-
u8 __modelSupportsGetGsDxDyOffset;
29-
#else
30-
extern u8 __modelSupportsGetGsDxDyOffset;
31-
#endif
32-
3328
#if F_gsKit_check_rom
3429
short int gsKit_check_rom(void)
3530
{
@@ -44,7 +39,6 @@ short int gsKit_check_rom(void)
4439

4540
//ROMVER string format: VVVVRTYYYYMMDD
4641
default_signal = (romname[4] == 'E') ? GS_MODE_PAL : GS_MODE_NTSC;
47-
__modelSupportsGetGsDxDyOffset = (20010608 < atoi(&romname[6]));
4842
}
4943

5044
return default_signal;
@@ -220,8 +214,7 @@ static void gsKit_set_buffer_attributes(GSGLOBAL *gsGlobal)
220214
// For other video modes, other than NTSC and PAL: if this model supports the GetGsDxDy syscall, get the board-specific offsets.
221215
if(gsGlobal->Mode != GS_MODE_NTSC && gsGlobal->Mode != GS_MODE_PAL)
222216
{
223-
gsKit_check_rom();
224-
if(__modelSupportsGetGsDxDyOffset)
217+
if(GetSyscallHandler(__NR__GetGsDxDyOffset))
225218
{
226219
_GetGsDxDyOffset(gsGlobal->Mode, &gs_DX, &gs_DY, &gs_DW, &gs_DH);
227220
gsGlobal->StartX += gs_DX;

0 commit comments

Comments
 (0)