- r_videoscale: make the compiler manage vScaleTable's size

This commit is contained in:
Rachael Alexanderson 2020-01-01 23:23:20 -05:00
parent ea98676085
commit 118e3db5ca
1 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@
#include "console/c_console.h"
#include "menu/menu.h"
#define NUMSCALEMODES 8
#define NUMSCALEMODES countof(vScaleTable)
extern bool setsizeneeded;
extern bool generic_ui;
@ -133,7 +133,7 @@ namespace
// the odd formatting of this struct definition is meant to resemble a table header. set your tab stops to 4 when editing this file.
struct v_ScaleTable
{ bool isValid; uint32_t(*GetScaledWidth)(uint32_t Width, uint32_t Height); uint32_t(*GetScaledHeight)(uint32_t Width, uint32_t Height); float pixelAspect; bool isCustom; };
v_ScaleTable vScaleTable[NUMSCALEMODES] =
v_ScaleTable vScaleTable[] =
{
{ true, [](uint32_t Width, uint32_t Height)->uint32_t { return Width; }, [](uint32_t Width, uint32_t Height)->uint32_t { return Height; }, 1.0f, false }, // 0 - Native
{ true, [](uint32_t Width, uint32_t Height)->uint32_t { return v_mfillX(Width, Height); }, [](uint32_t Width, uint32_t Height)->uint32_t { return v_mfillY(Width, Height); }, 1.0f, false }, // 6 - Minimum Scale to Fill Entire Screen