mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Remove duplicate game.controllerSensitivity proxy
It wasn't a direct duplicate of key.sensitivity, but it was still basically the same thing. Although to be fair, at least the case-switch conversion didn't get duplicated everywhere unlike game.slowdown. So now key.sensitivity functions the same as game.controllerSensitivity, and it only gets converted to its actual value whenever a joystick input happens in key.Poll(), unlike previously where it got converted every single frame on the title screen (there was even a comment that said "TODO bit wasteful doing this every poll").
This commit is contained in:
@@ -1238,11 +1238,11 @@ void menuactionpress()
|
||||
switch (game.currentmenuoption)
|
||||
{
|
||||
case 0:
|
||||
game.controllerSensitivity++;
|
||||
key.sensitivity++;
|
||||
music.playef(11);
|
||||
if(game.controllerSensitivity > 4)
|
||||
if(key.sensitivity > 4)
|
||||
{
|
||||
game.controllerSensitivity = 0;
|
||||
key.sensitivity = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1595,9 +1595,6 @@ void titleinput()
|
||||
//game.mx = (mouseX / 4);
|
||||
//game.my = (mouseY / 4);
|
||||
|
||||
//TODO bit wasteful doing this every poll
|
||||
key.setSensitivity(game.controllerSensitivity);
|
||||
|
||||
game.press_left = false;
|
||||
game.press_right = false;
|
||||
game.press_action = false;
|
||||
|
||||
Reference in New Issue
Block a user