CON: Add userdef .gamepadactive

git-svn-id: https://svn.eduke32.com/eduke32@7995 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2019-08-14 05:25:34 +00:00 committed by Christoph Oelckers
parent f7d6f66405
commit 446186d49a
2 changed files with 3 additions and 0 deletions

View file

@ -637,6 +637,7 @@ enum UserdefsLabel_t
USERDEFS_FOV,
USERDEFS_NEWGAMECUSTOMOPEN,
USERDEFS_NEWGAMECUSTOMSUBOPEN,
USERDEFS_GAMEPADACTIVE,
USERDEFS_END
};

View file

@ -1363,6 +1363,7 @@ const memberlabel_t UserdefsLabels[]=
{ "fov", USERDEFS_FOV, 0, 0, -1 },
{ "newgamecustomopen", USERDEFS_NEWGAMECUSTOMOPEN, 0, 0, -1 },
{ "newgamecustomsubopen", USERDEFS_NEWGAMECUSTOMSUBOPEN, LABEL_HASPARM2, MAXMENUGAMEPLAYENTRIES, -1 },
{ "gamepadactive", USERDEFS_GAMEPADACTIVE, 0, 0, -1 },
};
int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
@ -1553,6 +1554,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
case USERDEFS_DRAW_Y: labelNum = rotatesprite_y_offset; break;
case USERDEFS_DRAW_YXASPECT: labelNum = rotatesprite_yxaspect; break;
case USERDEFS_FOV: labelNum = ud.fov; break;
case USERDEFS_GAMEPADACTIVE: labelNum = (CONTROL_LastSeenInput == LastSeenInput::Joystick); break;
default: EDUKE32_UNREACHABLE_SECTION(labelNum = -1; break);
}