mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-12 22:51:11 +00:00
PSP: fixed a screen shake bug
svn-id: r49258
This commit is contained in:
parent
f7ba7b4684
commit
5f53683cab
@ -686,17 +686,18 @@ void GuRenderer::fillVertices(Vertex *vertices) {
|
|||||||
uint32 gapX = _useGlobalScaler ? (PSP_SCREEN_WIDTH - outputWidth) >> 1 : 0;
|
uint32 gapX = _useGlobalScaler ? (PSP_SCREEN_WIDTH - outputWidth) >> 1 : 0;
|
||||||
uint32 gapY = _useGlobalScaler ? (PSP_SCREEN_HEIGHT - outputHeight) >> 1 : 0;
|
uint32 gapY = _useGlobalScaler ? (PSP_SCREEN_HEIGHT - outputHeight) >> 1 : 0;
|
||||||
|
|
||||||
|
// Save scaled offset on screen
|
||||||
|
float scaledOffsetOnScreenX = scaleSourceToOutputX(_offsetOnScreen.x);
|
||||||
|
float scaledOffsetOnScreenY = scaleSourceToOutputY(_offsetOnScreen.y);
|
||||||
|
|
||||||
float imageStartX, imageStartY, imageEndX, imageEndY;
|
float imageStartX, imageStartY, imageEndX, imageEndY;
|
||||||
|
|
||||||
imageStartX = gapX + (scaleSourceToOutputX(_maxTextureOffset.x));
|
imageStartX = gapX + scaledOffsetOnScreenX + (scaleSourceToOutputX(_maxTextureOffset.x));
|
||||||
imageStartY = gapY;
|
imageStartY = gapY + scaledOffsetOnScreenY;
|
||||||
|
|
||||||
imageStartX += scaleSourceToOutputX(_offsetOnScreen.x);
|
|
||||||
imageStartY += scaleSourceToOutputY(_offsetOnScreen.y);
|
|
||||||
|
|
||||||
if (_fullScreen) { // shortcut
|
if (_fullScreen) { // shortcut
|
||||||
imageEndX = PSP_SCREEN_WIDTH - gapX;
|
imageEndX = PSP_SCREEN_WIDTH - gapX + scaledOffsetOnScreenX;
|
||||||
imageEndY = PSP_SCREEN_HEIGHT - gapY;
|
imageEndY = PSP_SCREEN_HEIGHT - gapY + scaledOffsetOnScreenY; // needed for screen shake
|
||||||
} else { /* !fullScreen */
|
} else { /* !fullScreen */
|
||||||
imageEndX = imageStartX + scaleSourceToOutputX(_drawSize.width);
|
imageEndX = imageStartX + scaleSourceToOutputX(_drawSize.width);
|
||||||
imageEndY = imageStartY + scaleSourceToOutputY(_drawSize.height);
|
imageEndY = imageStartY + scaleSourceToOutputY(_drawSize.height);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user