mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +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:
@@ -12,6 +12,7 @@
|
||||
#include "Enums.h"
|
||||
#include "FileSystemUtils.h"
|
||||
#include "Graphics.h"
|
||||
#include "KeyPoll.h"
|
||||
#include "MakeAndPlay.h"
|
||||
#include "Map.h"
|
||||
#include "Music.h"
|
||||
@@ -172,9 +173,6 @@ void Game::init(void)
|
||||
noflashingmode = false;
|
||||
slowdown = 30;
|
||||
|
||||
// 0..5
|
||||
controllerSensitivity = 2;
|
||||
|
||||
nodeathmode = false;
|
||||
nocutscenes = false;
|
||||
|
||||
@@ -4704,7 +4702,7 @@ void Game::deserializesettings(tinyxml2::XMLElement* dataNode, ScreenSettings* s
|
||||
|
||||
if (pKey == "controllerSensitivity")
|
||||
{
|
||||
controllerSensitivity = help.Int(pText);
|
||||
key.sensitivity = help.Int(pText);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4942,7 +4940,7 @@ void Game::serializesettings(tinyxml2::XMLElement* dataNode)
|
||||
dataNode->LinkEndChild(msg);
|
||||
}
|
||||
|
||||
xml::update_tag(dataNode, "controllerSensitivity", controllerSensitivity);
|
||||
xml::update_tag(dataNode, "controllerSensitivity", key.sensitivity);
|
||||
}
|
||||
|
||||
void Game::loadsettings(ScreenSettings* screen_settings)
|
||||
|
||||
Reference in New Issue
Block a user