static void (__cdecl *blitFunction)(void *dst, void *src);
static sw::Routine *blitRoutine;
- static sw::BlitState blitState = {0};
+ static sw::BlitState blitState = {};
sw::BlitState update;
update.width = sourceDescription.Width;
update.height = sourceDescription.Height;
update.sourceFormat = sw::FORMAT_A8R8G8B8;
+ update.sourceStride = source->getExternalPitchB();
update.destFormat = sw::FORMAT_A8R8G8B8;
- update.stride = dest->getExternalPitchB();
+ update.destStride = dest->getExternalPitchB();
update.cursorHeight = 0;
update.cursorWidth = 0;
updateState.width = width;
updateState.height = height;
updateState.destFormat = format;
+ updateState.destStride = stride;
updateState.sourceFormat = sourceFormat;
- updateState.stride = topLeftOrigin ? (int)sourceStride : -(int)sourceStride;
+ updateState.sourceStride = topLeftOrigin ? (int)sourceStride : -(int)sourceStride;
updateState.cursorWidth = cursor.width;
updateState.cursorHeight = cursor.height;
{
const int width = state.width;
const int height = state.height;
- const int width2 = (state.width + 1) & ~1;
const int dBytes = Surface::bytes(state.destFormat);
- const int dStride = state.stride;
+ const int dStride = state.destStride;
const int sBytes = Surface::bytes(state.sourceFormat);
- const int sStride = topLeftOrigin ? (sBytes * width2) : -(sBytes * width2);
+ const int sStride = state.sourceStride;
Function<Void(Pointer<Byte>, Pointer<Byte>, Pointer<Byte>)> function;
{