Skip to content

Commit

Permalink
Merge pull request #1 from Beyley/main
Browse files Browse the repository at this point in the history
Fix rendering of non zero src rect
  • Loading branch information
ultra0000 authored Feb 3, 2024
2 parents 2edb69e + 6995a84 commit 5e0874f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/render/psl1ght/SDL_PSL1GHTrender.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,12 @@ PSL1GHT_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
scale.outY = final_rect.y;
scale.outW = final_rect.w;
scale.outH = final_rect.h;
scale.ratioX = (srcrect->w << 20) / final_rect.w;
scale.ratioY = (srcrect->h << 20) / final_rect.h;
scale.inX = srcrect->x;
scale.inY = srcrect->y;
scale.inW = srcrect->w;
scale.inH = srcrect->h;
scale.ratioX = rsxGetFixedSint32(1);
scale.ratioY = rsxGetFixedSint32(1);
scale.inX = rsxGetFixedUint16(srcrect->x);
scale.inY = rsxGetFixedUint16(srcrect->y);
scale.inW = srcrect->x + srcrect->w;
scale.inH = srcrect->y + srcrect->h;
scale.offset = src_offset;
scale.pitch = src->pitch;
scale.origin = GCM_TRANSFER_ORIGIN_CORNER;
Expand Down

0 comments on commit 5e0874f

Please sign in to comment.