|
@@ -146,6 +146,17 @@ void AutoConfigTestPage::GetServers(std::vector<ServerInfo> &servers)
|
|
obs_properties_destroy(ppts);
|
|
obs_properties_destroy(ppts);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline void string_depad_key(string &key)
|
|
|
|
+{
|
|
|
|
+ while (!key.empty()) {
|
|
|
|
+ char ch = key.back();
|
|
|
|
+ if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r')
|
|
|
|
+ key.pop_back();
|
|
|
|
+ else
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
void AutoConfigTestPage::TestBandwidthThread()
|
|
void AutoConfigTestPage::TestBandwidthThread()
|
|
{
|
|
{
|
|
bool connected = false;
|
|
bool connected = false;
|
|
@@ -205,8 +216,10 @@ void AutoConfigTestPage::TestBandwidthThread()
|
|
obs_data_release(output_settings);
|
|
obs_data_release(output_settings);
|
|
|
|
|
|
std::string key = wiz->key;
|
|
std::string key = wiz->key;
|
|
- if (wiz->service == AutoConfig::Service::Twitch)
|
|
|
|
|
|
+ if (wiz->service == AutoConfig::Service::Twitch) {
|
|
|
|
+ string_depad_key(key);
|
|
key += "?bandwidthtest";
|
|
key += "?bandwidthtest";
|
|
|
|
+ }
|
|
|
|
|
|
obs_data_set_string(service_settings, "service",
|
|
obs_data_set_string(service_settings, "service",
|
|
wiz->serviceName.c_str());
|
|
wiz->serviceName.c_str());
|