@@ -138,7 +138,7 @@ void NetPlayDialog::CreateMainLayout()
138138 m_player_buffer_label = new QLabel (tr (" Player Buffer:" ));
139139 m_quit_button = new QPushButton (tr (" Quit" ));
140140 m_brawlmusic_off = new QCheckBox (tr (" Client Side Music Off" ));
141- m_is_spectator = new QCheckBox (tr (" Spectator" ));
141+ m_spectator_mode = new QCheckBox (tr (" Spectator" ));
142142 m_splitter = new QSplitter (Qt::Horizontal);
143143 m_menu_bar = new QMenuBar (this );
144144
@@ -265,7 +265,7 @@ void NetPlayDialog::CreateMainLayout()
265265 options_widget->addWidget (m_player_buffer_label, 0 , 3 , Qt::AlignVCenter);
266266 options_widget->addWidget (m_player_buffer_size_box, 0 , 4 , Qt::AlignVCenter);
267267 options_widget->addWidget (m_brawlmusic_off, 0 , 5 , Qt::AlignVCenter);
268- options_widget->addWidget (m_is_spectator , 0 , 6 , Qt::AlignVCenter);
268+ options_widget->addWidget (m_spectator_mode , 0 , 6 , Qt::AlignVCenter);
269269 options_widget->addWidget (m_quit_button, 0 , 8 , Qt::AlignVCenter | Qt::AlignRight);
270270 options_widget->setColumnStretch (7 , 1000 );
271271
@@ -401,7 +401,7 @@ void NetPlayDialog::ConnectWidgets()
401401 connect (m_start_button, &QPushButton::clicked, this , &NetPlayDialog::OnStart);
402402 connect (m_quit_button, &QPushButton::clicked, this , &NetPlayDialog::reject);
403403
404- connect (m_is_spectator , &QCheckBox::toggled, this , &NetPlayDialog::IsSpectatorEnabled);
404+ connect (m_spectator_mode , &QCheckBox::toggled, this , &NetPlayDialog::IsSpectatorEnabled);
405405
406406 connect (m_game_button, &QPushButton::clicked, [this ] {
407407 GameListDialog gld (m_game_list_model, this );
@@ -449,6 +449,7 @@ void NetPlayDialog::ConnectWidgets()
449449 connect (m_fixed_delay_action, &QAction::toggled, this , &NetPlayDialog::SaveSettings);
450450 connect (m_hide_remote_gbas_action, &QAction::toggled, this , &NetPlayDialog::SaveSettings);
451451 connect (m_brawlmusic_off, &QCheckBox::toggled, this , &NetPlayDialog::SaveSettings);
452+ connect (m_spectator_mode, &QCheckBox::toggled, this , &NetPlayDialog::SaveSettings);
452453}
453454
454455void NetPlayDialog::SendMessage (const std::string& msg)
@@ -462,10 +463,10 @@ void NetPlayDialog::SendMessage(const std::string& msg)
462463
463464bool NetPlayDialog::IsSpectator ()
464465{
465- std::optional< bool > is_spectator = RunOnObject (m_is_spectator, &QCheckBox:: isChecked);
466- if (is_spectator)
467- return *is_spectator;
468- return false ;
466+ if (m_spectator_mode-> isChecked ())
467+ return true ;
468+ else
469+ return false ;
469470}
470471
471472void NetPlayDialog::OnChat ()
@@ -916,7 +917,7 @@ void NetPlayDialog::SetOptionsEnabled(bool enabled)
916917 m_golf_mode_action->setEnabled (enabled);
917918 m_fixed_delay_action->setEnabled (enabled);
918919 m_brawlmusic_off->setEnabled (enabled);
919- m_is_spectator ->setEnabled (enabled);
920+ m_spectator_mode ->setEnabled (enabled);
920921 }
921922
922923 m_record_input_action->setEnabled (enabled);
@@ -1204,7 +1205,7 @@ void NetPlayDialog::LoadSettings()
12041205 const bool golf_mode_overlay = Config::Get (Config::NETPLAY_GOLF_MODE_OVERLAY);
12051206 const bool hide_remote_gbas = Config::Get (Config::NETPLAY_HIDE_REMOTE_GBAS);
12061207 const bool brawlmusic_off = Config::Get (Config::NETPLAY_BRAWL_MUSIC_OFF);
1207- const bool is_spectator = Config::Get (Config::NETPLAY_IS_SPECTATOR );
1208+ const bool spectator_mode = Config::Get (Config::NETPLAY_SPECTATOR_MODE );
12081209
12091210 m_minimum_buffer_size_box->setValue (minimum_buffer_size);
12101211 m_player_buffer_size_box->setValue (player_buffer_size);
@@ -1224,7 +1225,7 @@ void NetPlayDialog::LoadSettings()
12241225 m_hide_remote_gbas_action->setChecked (hide_remote_gbas);
12251226
12261227 m_brawlmusic_off->setChecked (brawlmusic_off);
1227- m_is_spectator ->setChecked (is_spectator );
1228+ m_spectator_mode ->setChecked (spectator_mode );
12281229
12291230 const std::string network_mode = Config::Get (Config::NETPLAY_NETWORK_MODE);
12301231
@@ -1269,7 +1270,7 @@ void NetPlayDialog::SaveSettings()
12691270 Config::SetBase (Config::NETPLAY_GOLF_MODE_OVERLAY, m_golf_mode_overlay_action->isChecked ());
12701271 Config::SetBase (Config::NETPLAY_HIDE_REMOTE_GBAS, m_hide_remote_gbas_action->isChecked ());
12711272 Config::SetBase (Config::NETPLAY_BRAWL_MUSIC_OFF, m_brawlmusic_off->isChecked ());
1272- Config::SetBase (Config::NETPLAY_IS_SPECTATOR, m_is_spectator ->isChecked ());
1273+ Config::SetBase (Config::NETPLAY_SPECTATOR_MODE, m_spectator_mode ->isChecked ());
12731274
12741275 std::string network_mode;
12751276 if (m_fixed_delay_action->isChecked ())
0 commit comments