mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
NetPlay: Limit nickname length
Ridiculously long nicknames cause UI silliness, so 30 characters seems like a reasonable limit, as it's the same as the forum.
This commit is contained in:
@ -17,9 +17,11 @@
|
||||
#include <QTabWidget>
|
||||
|
||||
#include "Core/Config/NetplaySettings.h"
|
||||
#include "Core/NetPlayProto.h"
|
||||
|
||||
#include "DolphinQt/GameList/GameListModel.h"
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/QtUtils/UTF8CodePointCountValidator.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
#include "UICommon/NetPlayIndex.h"
|
||||
@ -87,6 +89,9 @@ void NetPlaySetupDialog::CreateMainLayout()
|
||||
m_reset_traversal_button = new QPushButton(tr("Reset Traversal Settings"));
|
||||
m_tab_widget = new QTabWidget;
|
||||
|
||||
m_nickname_edit->setValidator(
|
||||
new UTF8CodePointCountValidator(NetPlay::MAX_NAME_LENGTH, m_nickname_edit));
|
||||
|
||||
// Connection widget
|
||||
auto* connection_widget = new QWidget;
|
||||
auto* connection_layout = new QGridLayout;
|
||||
|
Reference in New Issue
Block a user