- Added 0.75x scale mode
This commit is contained in:
parent
1ce3b4c79c
commit
e06f87cf10
4 changed files with 27 additions and 22 deletions
|
|
@ -79,7 +79,6 @@ int testingmode; // Holds time to revert to old mode
|
|||
int OldWidth, OldHeight, OldBits;
|
||||
static FIntCVar DummyDepthCvar (NULL, 0, 0);
|
||||
static uint8_t BitTranslate[32];
|
||||
bool bSuperSampled = false; // is this mode supersampled?
|
||||
|
||||
CUSTOM_CVAR (Int, menu_screenratios, -1, CVAR_ARCHIVE)
|
||||
{
|
||||
|
|
@ -126,14 +125,15 @@ CUSTOM_CVAR (Bool, vid_tft, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
|
||||
CUSTOM_CVAR (Int, vid_scalemode, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
{
|
||||
if (self < 0 || self > 4)
|
||||
if (self < 0 || self > 5)
|
||||
{
|
||||
self = 0;
|
||||
}
|
||||
if (self == 4) // [SP] hack, for now, but we might add custom modes later and special handling will be needed for that...
|
||||
bSuperSampled = true;
|
||||
else
|
||||
bSuperSampled = false;
|
||||
}
|
||||
|
||||
bool ViewportLinearScale()
|
||||
{
|
||||
return vid_scalemode == 4 || vid_scalemode == 5;
|
||||
}
|
||||
|
||||
int ViewportScaledWidth(int width)
|
||||
|
|
@ -145,7 +145,8 @@ int ViewportScaledWidth(int width)
|
|||
case 1: return 320;
|
||||
case 2: return 640;
|
||||
case 3: return (int)roundf(width * 0.5f);
|
||||
case 4: return width * 2;
|
||||
case 4: return (int)roundf(width * 0.75f);
|
||||
case 5: return width * 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -158,7 +159,8 @@ int ViewportScaledHeight(int height)
|
|||
case 1: return 200;
|
||||
case 2: return 400;
|
||||
case 3: return (int)roundf(height * 0.5f);
|
||||
case 4: return height * 2;
|
||||
case 4: return (int)roundf(height * 0.75f);
|
||||
case 5: return height * 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue