Merge branch 'showfps-tweaks' into 'next'
FPS counter tweaks See merge request STJr/SRB2!927
This commit is contained in:
commit
8a2a7a3b46
14
src/screen.c
14
src/screen.c
|
@ -538,10 +538,16 @@ void SCR_DisplayTicRate(void)
|
||||||
if (totaltics <= TICRATE/2) ticcntcolor = V_REDMAP;
|
if (totaltics <= TICRATE/2) ticcntcolor = V_REDMAP;
|
||||||
else if (totaltics == TICRATE) ticcntcolor = V_GREENMAP;
|
else if (totaltics == TICRATE) ticcntcolor = V_GREENMAP;
|
||||||
|
|
||||||
V_DrawString(vid.width-(72*vid.dupx), h,
|
if (cv_ticrate.value == 2) // compact counter
|
||||||
V_YELLOWMAP|V_NOSCALESTART|V_USERHUDTRANS, "FPS:");
|
V_DrawString(vid.width-(16*vid.dupx), h,
|
||||||
V_DrawString(vid.width-(40*vid.dupx), h,
|
ticcntcolor|V_NOSCALESTART|V_USERHUDTRANS, va("%02d", totaltics));
|
||||||
ticcntcolor|V_NOSCALESTART|V_USERHUDTRANS, va("%02d/%02u", totaltics, TICRATE));
|
else if (cv_ticrate.value == 1) // full counter
|
||||||
|
{
|
||||||
|
V_DrawString(vid.width-(72*vid.dupx), h,
|
||||||
|
V_YELLOWMAP|V_NOSCALESTART|V_USERHUDTRANS, "FPS:");
|
||||||
|
V_DrawString(vid.width-(40*vid.dupx), h,
|
||||||
|
ticcntcolor|V_NOSCALESTART|V_USERHUDTRANS, va("%02d/%02u", totaltics, TICRATE));
|
||||||
|
}
|
||||||
|
|
||||||
lasttic = ontic;
|
lasttic = ontic;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,8 @@ UINT8 *screens[5];
|
||||||
// screens[3] = fade screen start
|
// screens[3] = fade screen start
|
||||||
// screens[4] = fade screen end, postimage tempoarary buffer
|
// screens[4] = fade screen end, postimage tempoarary buffer
|
||||||
|
|
||||||
consvar_t cv_ticrate = {"showfps", "No", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
static CV_PossibleValue_t ticrate_cons_t[] = {{0, "No"}, {1, "Full"}, {2, "Compact"}, {0, NULL}};
|
||||||
|
consvar_t cv_ticrate = {"showfps", "No", CV_SAVE, ticrate_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
static void CV_palette_OnChange(void);
|
static void CV_palette_OnChange(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue