mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
- fixed writeback of hud_size CVAR
G_ChangeHudLayout must ensure that the written value is ok, otherwise the auto validation in the CVAR can screw things up.
This commit is contained in:
parent
628bd9efc6
commit
6914408453
1 changed files with 2 additions and 2 deletions
|
@ -220,7 +220,7 @@ bool G_ChangeHudLayout(int direction)
|
||||||
{
|
{
|
||||||
int layout = hud_size - 1;
|
int layout = hud_size - 1;
|
||||||
while (!gi->validate_hud(layout) && layout >= 0) layout--;
|
while (!gi->validate_hud(layout) && layout >= 0) layout--;
|
||||||
if (layout >= 0)
|
if (layout >= 0 && layout < hud_size && gi->validate_hud(layout))
|
||||||
{
|
{
|
||||||
hud_size = layout;
|
hud_size = layout;
|
||||||
return true;
|
return true;
|
||||||
|
@ -230,7 +230,7 @@ bool G_ChangeHudLayout(int direction)
|
||||||
{
|
{
|
||||||
int layout = hud_size + 1;
|
int layout = hud_size + 1;
|
||||||
while (!gi->validate_hud(layout) && layout <= 11) layout++;
|
while (!gi->validate_hud(layout) && layout <= 11) layout++;
|
||||||
if (layout <= 11)
|
if (layout <= 11 && layout > hud_size && gi->validate_hud(layout))
|
||||||
{
|
{
|
||||||
hud_size = layout;
|
hud_size = layout;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue