core, citra_qt: Allow credentials update in multiplayer announce session
Allows updating the credentials of the announce session, thus allowing credentials changes to be reflected before citra restart. To avoid race conditions and web errors (you can only update the room that you created, i.e. changing credentials halfway will make it break), now you can only use the Citra Web Services settings when not hosting a public room.
This commit is contained in:
@@ -278,3 +278,11 @@ void MultiplayerState::OnDirectConnectToRoom() {
|
||||
}
|
||||
BringWidgetToFront(direct_connect);
|
||||
}
|
||||
|
||||
bool MultiplayerState::IsHostingPublicRoom() const {
|
||||
return announce_multiplayer_session->IsRunning();
|
||||
}
|
||||
|
||||
void MultiplayerState::UpdateCredentials() {
|
||||
announce_multiplayer_session->UpdateCredentials();
|
||||
}
|
||||
|
@@ -38,6 +38,14 @@ public:
|
||||
|
||||
void retranslateUi();
|
||||
|
||||
/**
|
||||
* Whether a public room is being hosted or not.
|
||||
* When this is true, Web Services configuration should be disabled.
|
||||
*/
|
||||
bool IsHostingPublicRoom() const;
|
||||
|
||||
void UpdateCredentials();
|
||||
|
||||
public slots:
|
||||
void OnNetworkStateChanged(const Network::RoomMember::State& state);
|
||||
void OnNetworkError(const Network::RoomMember::Error& error);
|
||||
|
Reference in New Issue
Block a user