- fixed misnamed variable and removed restriction for draw pass in GetFullscreenRect.

This commit is contained in:
Christoph Oelckers 2020-10-05 18:32:16 +02:00
parent 9a994482b1
commit 756caede51
2 changed files with 2 additions and 4 deletions

View File

@ -417,8 +417,6 @@ DEFINE_ACTION_FUNCTION(_Screen, GetFullscreenRect)
PARAM_FLOAT(virth); PARAM_FLOAT(virth);
PARAM_INT(fsmode); PARAM_INT(fsmode);
if (!twod->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
DrawParms parms; DrawParms parms;
DoubleRect rect; DoubleRect rect;
parms.viewport.width = twod->GetWidth(); parms.viewport.width = twod->GetWidth();

View File

@ -191,7 +191,7 @@ class ListMenu : Menu
{ {
int sel = -1; int sel = -1;
int w = desc.DisplayWidth(); int w = mDesc.DisplayWidth();
double sx, sy; double sx, sy;
if (w == ListMenuDescriptor.CleanScale) if (w == ListMenuDescriptor.CleanScale)
{ {
@ -202,7 +202,7 @@ class ListMenu : Menu
else else
{ {
// for fullscreen scale, transform coordinates so that for the given rect the coordinates are within (0, 0, w, h) // for fullscreen scale, transform coordinates so that for the given rect the coordinates are within (0, 0, w, h)
int h = desc.DisplayHeight(); int h = mDesc.DisplayHeight();
double fx, fy, fw, fh; double fx, fy, fw, fh;
[fx, fy, fw, fh] = Screen.GetFullscreenRect(w, h, FSMode_ScaleToFit43); [fx, fy, fw, fh] = Screen.GetFullscreenRect(w, h, FSMode_ScaleToFit43);