Skip to content

Commit

Permalink
- r_videoscale: make the compiler manage vScaleTable's size
Browse files Browse the repository at this point in the history
  • Loading branch information
madame-rachelle committed Jan 2, 2020
1 parent ea98676 commit 118e3db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rendering/r_videoscale.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 118e3db

Please sign in to comment.