mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Moved PAGEUP/PAGEDOWN configuration to the end of the enums to preserve backwards compatibility with older es_input.cfgs.
This commit is contained in:
parent
ae4498f5f4
commit
38bbbb3fb7
|
@ -17,7 +17,7 @@ namespace InputManager {
|
|||
void loadConfig();
|
||||
|
||||
//enum for identifying input, regardless of configuration
|
||||
enum InputButton { UNKNOWN, UP, DOWN, PAGEUP, PAGEDOWN, LEFT, RIGHT, BUTTON1, BUTTON2, MENU, SELECT};
|
||||
enum InputButton { UNKNOWN, UP, DOWN, LEFT, RIGHT, BUTTON1, BUTTON2, MENU, SELECT, PAGEUP, PAGEDOWN};
|
||||
|
||||
void processEvent(SDL_Event* event);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <fstream>
|
||||
|
||||
std::string GuiInputConfig::sConfigPath = "./input.cfg";
|
||||
std::string GuiInputConfig::sInputs[] = { "UNKNOWN", "UP", "DOWN", "PAGEUP", "PAGEDOWN", "LEFT", "RIGHT", "BUTTON1 (Accept)", "BUTTON2 (Back)", "START (Menu)", "SELECT (Jump-to-letter)" }; //must be same order as InputManager::InputButton enum
|
||||
std::string GuiInputConfig::sInputs[] = { "UNKNOWN", "UP", "DOWN", "LEFT", "RIGHT", "BUTTON1 (Accept)", "BUTTON2 (Back)", "START (Menu)", "SELECT (Jump-to-letter)", "PAGE UP", "PAGE DOWN" }; //must be same order as InputManager::InputButton enum; only add to the end to preserve backwards compatibility
|
||||
int GuiInputConfig::sInputCount = 9;
|
||||
|
||||
GuiInputConfig::GuiInputConfig()
|
||||
|
|
|
@ -166,14 +166,14 @@ void GuiList<listType>::scroll()
|
|||
|
||||
if(mSelection < 0)
|
||||
{
|
||||
if(mScrollDir == -10)
|
||||
if(mScrollDir < -1)
|
||||
mSelection = 0;
|
||||
else
|
||||
mSelection += mRowVector.size();
|
||||
}
|
||||
if(mSelection >= (int)mRowVector.size())
|
||||
{
|
||||
if(mScrollDir == 10)
|
||||
if(mScrollDir > 1)
|
||||
mSelection = (int)mRowVector.size() - 1;
|
||||
else
|
||||
mSelection -= mRowVector.size();
|
||||
|
|
Loading…
Reference in a new issue