Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
gpu: fixed off-by-one in drawingOffset sign extending
  • Loading branch information
JaCzekanski committed Aug 12, 2019
1 parent 9948991 commit bb94c81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/device/gpu/gpu.cpp
Expand Up @@ -490,8 +490,8 @@ void GPU::writeGP0(uint32_t data) {
drawingArea.bottom = (arguments[0] & 0xffc00) >> 10;
} else if (command == 0xe5) {
// Drawing offset
drawingOffsetX = extend_sign<11>(arguments[0] & 0x7ff);
drawingOffsetY = extend_sign<11>((arguments[0] >> 11) & 0x7ff);
drawingOffsetX = extend_sign<10>(arguments[0] & 0x7ff);
drawingOffsetY = extend_sign<10>((arguments[0] >> 11) & 0x7ff);
} else if (command == 0xe6) {
// Mask bit setting
gp0_e6._reg = arguments[0];
Expand Down

0 comments on commit bb94c81

Please sign in to comment.