i'm accessing the back framebuffer directly and modify a pixel by the following code:
the code works fine for my ipaq (both PocketFrog and PocketHal).
i always assumed that pitch is calculated as:
but is this assumption correct? and will the code above still work for other devices?
- Code:
pixel_t *pDest=(pixel_t*)((byte*)buffer.pixels + ((x * sizeof(pixel_t)) + (y * buffer.pitch)));
*pDest=color;
the code works fine for my ipaq (both PocketFrog and PocketHal).
i always assumed that pitch is calculated as:
- Code:
pitch=sizeof(pixel_t)*width;
but is this assumption correct? and will the code above still work for other devices?