+ DEBUG("%d.\n", (int)dstscale.height);
+ }
+ if (dstscale.width > GetScreenWidth()) {
+ // First scaling attempt failed, do not double adjust, re-adjust
+ dstscale.width = width;
+ dstscale.height = height;
+ DEBUG("[W > SW]\n");
+ DEBUG("Adjusted height from %d to", (int)dstscale.height);
+ dstscale.height = dstscale.height * ((float)GetScreenWidth() / (float)width);
+ DEBUG("%d.\n", (int)dstscale.height);
+ DEBUG("Adjusted width from %d to", (int)dstscale.width);
+ dstscale.width = GetScreenWidth();
+ DEBUG("%d.\n", (int)dstscale.width);