cdvdgigaherz: Move lba_to_msf to header

Also use proper inline keyword.
This commit is contained in:
Jonathan Li 2016-10-26 17:32:47 +01:00
parent ae0577bc16
commit 1573f513ce
2 changed files with 10 additions and 10 deletions

View File

@ -79,12 +79,12 @@ u32 CALLBACK PS2EgetLibVersion2(u32 type)
///////////////////////////////////////////////////////////////////////////////
// Utility Functions //
u8 __inline dec_to_bcd(u8 dec)
inline u8 dec_to_bcd(u8 dec)
{
return ((dec / 10) << 4) | (dec % 10);
}
void __inline lsn_to_msf(u8 *minute, u8 *second, u8 *frame, u32 lsn)
inline void lsn_to_msf(u8 *minute, u8 *second, u8 *frame, u32 lsn)
{
*frame = dec_to_bcd(lsn % 75);
lsn /= 75;
@ -93,14 +93,6 @@ void __inline lsn_to_msf(u8 *minute, u8 *second, u8 *frame, u32 lsn)
*minute = dec_to_bcd(lsn % 100);
}
void __inline lba_to_msf(s32 lba, u8 *m, u8 *s, u8 *f)
{
lba += 150;
*m = (u8)(lba / (60 * 75));
*s = (u8)((lba / 75) % 60);
*f = (u8)(lba % 75);
}
void ReadSettings()
{
g_settings.Load(s_config_file);

View File

@ -109,4 +109,12 @@ s32 cdvdGetMediaType();
s32 cdvdRefreshData();
void cdvdParseTOC();
inline void lba_to_msf(s32 lba, u8 *m, u8 *s, u8 *f)
{
lba += 150;
*m = static_cast<u8>(lba / (60 * 75));
*s = static_cast<u8>((lba / 75) % 60);
*f = static_cast<u8>(lba % 75);
}
#endif /* __CDVD_H__ */