mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-08 23:04:13 +08:00
log
This commit is contained in:
parent
2a7a5d82b2
commit
e40a728a4b
@ -157,7 +157,7 @@ static int32_t bin_search( FHandle fd, acl_text_t game )
|
|||||||
|
|
||||||
int start = 0, end = gblcht.serc - 1;
|
int start = 0, end = gblcht.serc - 1;
|
||||||
size = ACL_SERIAL_LEN(1);
|
size = ACL_SERIAL_LEN(1);
|
||||||
int found = -1; log("1");
|
int found = -1;
|
||||||
while( start <= end )
|
while( start <= end )
|
||||||
{
|
{
|
||||||
int mid = (start+end) >> 1;
|
int mid = (start+end) >> 1;
|
||||||
@ -172,8 +172,8 @@ static int32_t bin_search( FHandle fd, acl_text_t game )
|
|||||||
start = mid + 1;
|
start = mid + 1;
|
||||||
}
|
}
|
||||||
else end = mid - 1;
|
else end = mid - 1;
|
||||||
}log("4");
|
}log("1");
|
||||||
free( serials );
|
free( serials );log("2");
|
||||||
|
|
||||||
return found < 0 ? -ACHTLIB_NOT_FOUND : found;
|
return found < 0 ? -ACHTLIB_NOT_FOUND : found;
|
||||||
}
|
}
|
||||||
@ -181,6 +181,7 @@ static int32_t bin_search( FHandle fd, acl_text_t game )
|
|||||||
#define config_type(n) ( (n) & 0xff )
|
#define config_type(n) ( (n) & 0xff )
|
||||||
acl_error_t acl_select_game( acl_text_t game, acl_boolean_t filter, acl_count_t *n )
|
acl_error_t acl_select_game( acl_text_t game, acl_boolean_t filter, acl_count_t *n )
|
||||||
{
|
{
|
||||||
|
extern void log( const char * );
|
||||||
CheatLib *inst = (CheatLib*)&gblcht;
|
CheatLib *inst = (CheatLib*)&gblcht;
|
||||||
FHandle fd;
|
FHandle fd;
|
||||||
if( inst->serc == 0 ) return ACHTLIB_NOT_OPEN;
|
if( inst->serc == 0 ) return ACHTLIB_NOT_OPEN;
|
||||||
@ -194,10 +195,10 @@ acl_error_t acl_select_game( acl_text_t game, acl_boolean_t filter, acl_count_t
|
|||||||
fClose( fd );
|
fClose( fd );
|
||||||
return index * -1;
|
return index * -1;
|
||||||
}
|
}
|
||||||
|
log("3");
|
||||||
uint32_t offset = ACL_HEADER_LEN + ACL_SERIAL_LEN(inst->serc);
|
uint32_t offset = ACL_HEADER_LEN + ACL_SERIAL_LEN(inst->serc);
|
||||||
offset += ACL_INDEX_OFFSET(index);
|
offset += ACL_INDEX_OFFSET(index);
|
||||||
|
log("4");
|
||||||
uint32_t readed;
|
uint32_t readed;
|
||||||
uint16_t groups[2];
|
uint16_t groups[2];
|
||||||
if( RES_OK != fLseek(fd, offset) )
|
if( RES_OK != fLseek(fd, offset) )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user