mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Add option to re-enable 1-frame input delay
This is an option for speedrunners whose muscle memory is precisely trained and used to the 1-frame input delay that existed in 2.2 and below. It is located in Game Options -> Advanced Options, and is off by default. To re-add the 1-frame input delay, we simply move the key.Poll() to the start of the frame, instead of before an input function gets ran - undoing what #535 did. There is a frame ordering-sensitive issue here, where toggling game.inputdelay at the wrong time could cause double-polling. However, we only toggle it in an input function, which regardless is always guaranteed to be ran after key.Poll() (it either happened at the start of the frame or just before the input function got ran), so this is not an issue. But, in case we ever need to toggle this variable in the future, we can just use the defer callbacks system to defer the toggle to the end of the frame - also added by #535. Added at the request of Habeechee on the VVVVVV speedrunning Discord server.
This commit is contained in:
@@ -452,6 +452,7 @@ public:
|
||||
void unlockAchievement(const char *name);
|
||||
|
||||
bool disablepause;
|
||||
bool inputdelay;
|
||||
};
|
||||
|
||||
#ifndef GAME_DEFINITION
|
||||
|
||||
Reference in New Issue
Block a user