janwas
58360a629c
- use helper functions to reduce occurrences of BLOCK_SIZE and SECTOR_SIZE - wmi: provide for shutting it down (gets rid of its two threads); only initialize if actually needed (costs 200ms) - ogl_tex: don't complain if there's no gfx_card info (due to not having used wmi) This was SVN commit r5572.
24 lines
397 B
C++
24 lines
397 B
C++
#include "precompiled.h"
|
|
#include "io_align.h"
|
|
|
|
|
|
bool IsAligned_Offset(off_t ofs)
|
|
{
|
|
return IsAligned(ofs, BLOCK_SIZE);
|
|
}
|
|
|
|
off_t AlignedOffset(off_t ofs)
|
|
{
|
|
return round_down(ofs, BLOCK_SIZE);
|
|
}
|
|
|
|
off_t AlignedSize(off_t size)
|
|
{
|
|
return round_up(size, BLOCK_SIZE);
|
|
}
|
|
|
|
off_t PaddedSize(off_t size, off_t ofs)
|
|
{
|
|
return round_up(size + ofs - AlignedOffset(ofs), BLOCK_SIZE);
|
|
}
|