2.6: start.bat, quick start warning, fully fix hand size, gamma control, fix coin, customizable toon key, rumble intensity, error 998 explaination, divawig enum, launcher option tab cleanup, gpu driver version detection, precise lag compensation, 7.10 check
This commit is contained in:
@@ -82,6 +82,7 @@ namespace TLAC::Components
|
||||
MenuCircleBinding = new Binding();
|
||||
|
||||
CoinBinding = new Binding();
|
||||
ToonBinding = new Binding();
|
||||
|
||||
FileSystem::ConfigFile configFile(framework::GetModuleDirectory(), KEY_CONFIG_FILE_NAME);
|
||||
configFile.OpenRead();
|
||||
@@ -100,6 +101,7 @@ namespace TLAC::Components
|
||||
Config::BindConfigKeys(configFile.ConfigMap, "MENU_L", *MenuLBinding, { "Left", "Up" });
|
||||
Config::BindConfigKeys(configFile.ConfigMap, "MENU_R", *MenuRBinding, { "Down", "Right" });
|
||||
Config::BindConfigKeys(configFile.ConfigMap, "MENU_CIRCLE", *MenuCircleBinding, { "D", "L", "Spacebar" });
|
||||
Config::BindConfigKeys(configFile.ConfigMap, "TOON", *ToonBinding, { "F9" });
|
||||
Config::BindConfigKeys(configFile.ConfigMap, "COIN", *CoinBinding, { "F10" });
|
||||
|
||||
mouseScrollPvSelection = configFile.GetBooleanValue("mouse_scroll_pv_selection");
|
||||
@@ -168,6 +170,12 @@ namespace TLAC::Components
|
||||
|
||||
// repress held down buttons to not block input
|
||||
//inputState->Down.Buttons ^= inputState->Tapped.Buttons;
|
||||
|
||||
if (CoinBinding->AnyTapped())
|
||||
addCoin();
|
||||
|
||||
if (ToonBinding->AnyTapped())
|
||||
toggleNpr1();
|
||||
}
|
||||
|
||||
HoldState InputEmulator::GetHoldState()
|
||||
@@ -299,9 +307,6 @@ namespace TLAC::Components
|
||||
if (buttonTestFunc(RightBinding))
|
||||
buttons |= JVS_R;
|
||||
|
||||
if (buttonTestFunc(CoinBinding))
|
||||
addCoin();
|
||||
|
||||
return buttons;
|
||||
}
|
||||
|
||||
@@ -345,9 +350,6 @@ namespace TLAC::Components
|
||||
if (keyboard->IsIntervalTapped(VK_SPACE))
|
||||
inputKey = 0x20;
|
||||
|
||||
if (keyboard->IsIntervalTapped(VK_F9))
|
||||
toggleNpr1();
|
||||
|
||||
if (keyboard->IsDoubleTapped(VK_ESCAPE))
|
||||
*(bool*)SHOULD_EXIT_BOOL_ADDRESS = true;
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace TLAC::Components
|
||||
Input::Binding* MenuCircleBinding;
|
||||
|
||||
Input::Binding* CoinBinding;
|
||||
Input::Binding* ToonBinding;
|
||||
|
||||
InputEmulator();
|
||||
~InputEmulator();
|
||||
|
||||
@@ -23,12 +23,12 @@ namespace TLAC::FileSystem
|
||||
return found;
|
||||
}
|
||||
|
||||
int ConfigFile::GetIntegerValue(const std::string& key)
|
||||
int ConfigFile::GetIntegerValue(const std::string& key, int defaultval)
|
||||
{
|
||||
auto pair = ConfigMap.find(key);
|
||||
bool found = pair != ConfigMap.end();
|
||||
|
||||
return found ? atoi(pair->second.c_str()) : 0;
|
||||
return found ? atoi(pair->second.c_str()) : defaultval;
|
||||
}
|
||||
|
||||
bool ConfigFile::GetBooleanValue(const std::string& key)
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace TLAC::FileSystem
|
||||
std::unordered_map<std::string, std::string> ConfigMap;
|
||||
|
||||
bool TryGetValue(const std::string &key, std::string **value);
|
||||
int GetIntegerValue(const std::string& key);
|
||||
int GetIntegerValue(const std::string& key, int defaultval = 0);
|
||||
bool GetBooleanValue(const std::string& key);
|
||||
float GetFloatValue(const std::string& key);
|
||||
std::string GetStringValue(const std::string& key);
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace TLAC::Input
|
||||
config.OpenRead();
|
||||
xinput_num = config.GetIntegerValue("xinput_preferred");
|
||||
rumble = config.GetBooleanValue("rumble");
|
||||
rumble_left = config.GetIntegerValue("xinput_rumble_intensity_left", 8000);
|
||||
rumble_right = config.GetIntegerValue("xinput_rumble_intensity_right", 4000);
|
||||
}
|
||||
|
||||
Xinput* Xinput::GetInstance()
|
||||
@@ -256,8 +258,8 @@ namespace TLAC::Input
|
||||
{
|
||||
XINPUT_VIBRATION vibration;
|
||||
ZeroMemory(&vibration, sizeof(XINPUT_VIBRATION));
|
||||
vibration.wLeftMotorSpeed = 8000; // use any value between 0-65535 here
|
||||
vibration.wRightMotorSpeed = 4000; // use any value between 0-65535 here
|
||||
vibration.wLeftMotorSpeed = rumble_left; // use any value between 0-65535 here
|
||||
vibration.wRightMotorSpeed = rumble_right; // use any value between 0-65535 here
|
||||
XInputSetState(xc_pref, &vibration);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace TLAC::Input
|
||||
|
||||
void SetTapStates(BYTE keycode, float elapsed);
|
||||
|
||||
int xinput_num;
|
||||
int xinput_num, rumble_left, rumble_right;
|
||||
bool rumble;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user