- let SBARINFO always read ST_X and ST_Y from the wrapper because it just too liberally changes these values in unpredictable ways.

This commit is contained in:
Christoph Oelckers 2017-03-19 19:49:52 +01:00
parent c237af2b02
commit 97ce83d2d8

View file

@ -1035,7 +1035,6 @@ public:
{ // Calculate cleanX and cleanY { // Calculate cleanX and cleanY
wrapper->ScreenSizeChanged(); wrapper->ScreenSizeChanged();
} }
wrapper->GetCoords(ST_X, ST_Y);
int hud = STBAR_NORMAL; int hud = STBAR_NORMAL;
if(state == HUD_StatusBar) if(state == HUD_StatusBar)
{ {
@ -1225,8 +1224,10 @@ public:
if(!fullScreenOffsets) if(!fullScreenOffsets)
{ {
double tmp = 0; double tmp = 0;
dx += ST_X; int stX, stY;
dy += ST_Y - (Scaled ? script->resH : 200) + script->height; wrapper->GetCoords(stX, stY);
dx += stX;
dy += stY - (Scaled ? script->resH : 200) + script->height;
w = forceWidth < 0 ? texture->GetScaledWidthDouble() : forceWidth; w = forceWidth < 0 ? texture->GetScaledWidthDouble() : forceWidth;
h = forceHeight < 0 ? texture->GetScaledHeightDouble() : forceHeight; h = forceHeight < 0 ? texture->GetScaledHeightDouble() : forceHeight;
double dcx = clip[0] == 0 ? 0 : dx + clip[0] - texture->GetScaledLeftOffsetDouble(); double dcx = clip[0] == 0 ? 0 : dx + clip[0] - texture->GetScaledLeftOffsetDouble();
@ -1451,8 +1452,10 @@ public:
if(!fullScreenOffsets) if(!fullScreenOffsets)
{ {
rx += ST_X; int stX, stY;
ry += ST_Y - (Scaled ? script->resH : 200) + script->height; wrapper->GetCoords(stX, stY);
rx += stX;
ry += stY - (Scaled ? script->resH : 200) + script->height;
if(Scaled) if(Scaled)
screen->VirtualToRealCoords(rx, ry, rw, rh, script->resW, script->resH, true); screen->VirtualToRealCoords(rx, ry, rw, rh, script->resW, script->resH, true);
else else
@ -1520,7 +1523,6 @@ public:
player_t *CPlayer = nullptr; player_t *CPlayer = nullptr;
DBaseStatusBar *wrapper; DBaseStatusBar *wrapper;
bool Scaled; bool Scaled;
int ST_X, ST_Y;
private: private:
SBarInfo *script; SBarInfo *script;