MCPcopy Create free account
hub / github.com/Lovrom8/RSMods / UpdateSettingsOnGUIChange

Function UpdateSettingsOnGUIChange

DLL/Keybindings.cpp:193–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191 }
192
193 void UpdateSettingsOnGUIChange(LPARAM lParam)
194 {
195 auto pcds = (COPYDATASTRUCT*)lParam;
196 if (pcds->dwData == 1)
197 {
198 std::string currMsg = (char*)pcds->lpData;
199 LOG_INFO(currMsg << std::endl);
200
201 if (Contains(currMsg, "update")) {
202 if (Contains(currMsg, "all"))
203 Settings::UpdateSettings();
204 else
205 Settings::ParseSettingUpdate(currMsg);
206 }
207 else if (Contains(currMsg, "WwiseEvent")) {
208 auto msgParts = Settings::SplitByWhitespace(currMsg);
209
210 if (msgParts.size() == 2)
211 VoiceOverControl::PlayVoiceOver(msgParts[1]);
212 }
213 else if (Contains(currMsg, "TurboSpeed")) // Deprecated - use CrowdControl
214 {
215 if (Contains(currMsg, "enable"))
216 RiffRepeater::EnableTimeStretch();
217 else
218 RiffRepeater::DisableTimeStretch();
219 }
220 else if (Contains(currMsg, "enable"))
221 Twitch::effectQueue.push_back(currMsg);
222 else if (Contains(currMsg, "Reconnect"))
223 CrowdControl::StartServerLoop();
224 }
225 }
226
227 void DispatchCommand(WPARAM keyPressed, const std::map<std::string, ModCommand, std::less<>>& commands)
228 {

Callers 1

WndProcFunction · 0.85

Calls 6

UpdateSettingsFunction · 0.85
PlayVoiceOverFunction · 0.85
StartServerLoopFunction · 0.85
push_backMethod · 0.80
ContainsFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected