Skip to content

Commit 3dd68fa

Browse files
committed
Compiling locally 2512 build
1 parent 5390b24 commit 3dd68fa

File tree

9 files changed

+27
-26
lines changed

9 files changed

+27
-26
lines changed

Source/Core/Core/BootManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ bool BootCore(Core::System& system, std::unique_ptr<BootParameters> boot,
9595

9696
Config::AddLayer(ConfigLoaders::GenerateNetPlayConfigLoader(*netplay_settings));
9797
StartUp.bCopyWiiSaveNetplay = netplay_settings->savedata_load;
98-
StartUp.bIsSpectator = netplay_settings->is_spectator;
98+
StartUp.bIsSpectator = netplay_settings->spectator_mode;
9999
}
100100

101101
// Override out-of-region languages/countries to prevent games from crashing or behaving oddly

Source/Core/Core/Config/NetplaySettings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const Info<u32> NETPLAY_PLAYER_BUFFER_SIZE{{System::Main, "NetPlay", "PlayerBuff
4848
const Info<u32> NETPLAY_CLIENT_BUFFER_SIZE{{System::Main, "NetPlay", "BufferSizeClient"}, 1};
4949

5050
const Info<bool> NETPLAY_BRAWL_MUSIC_OFF{{System::Main, "NetPlay", "BrawlMusicOff"}, false};
51-
const Info<bool> NETPLAY_IS_SPECTATOR{{System::Main, "NetPlay", "IsSpectator"}, false};
51+
const Info<bool> NETPLAY_SPECTATOR_MODE{{System::Main, "NetPlay", "IsSpectator"}, false};
5252

5353
const Info<bool> NETPLAY_SAVEDATA_LOAD{{System::Main, "NetPlay", "SyncSaves"}, true};
5454
const Info<bool> NETPLAY_SAVEDATA_WRITE{{System::Main, "NetPlay", "WriteSaveData"}, false};

Source/Core/Core/Config/NetplaySettings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ extern const Info<u32> NETPLAY_PLAYER_BUFFER_SIZE;
4444
extern const Info<u32> NETPLAY_CLIENT_BUFFER_SIZE;
4545

4646
extern const Info<bool> NETPLAY_BRAWL_MUSIC_OFF;
47-
extern const Info<bool> NETPLAY_IS_SPECTATOR;
47+
extern const Info<bool> NETPLAY_SPECTATOR_MODE;
4848

4949
extern const Info<bool> NETPLAY_SAVEDATA_LOAD;
5050
extern const Info<bool> NETPLAY_SAVEDATA_WRITE;

Source/Core/Core/NetPlayClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ void NetPlayClient::OnStartGame(sf::Packet& packet)
915915
packet >> m_net_settings.oc_factor;
916916
packet >> m_net_settings.vi_oc_enable;
917917
packet >> m_net_settings.vi_oc_factor;
918-
packet >> m_net_settings.is_spectator;
918+
packet >> m_net_settings.spectator_mode;
919919

920920
for (auto slot : ExpansionInterface::SLOTS)
921921
packet >> m_net_settings.exi_device[slot];

Source/Core/Core/NetPlayProto.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct NetSettings
4949
float oc_factor = 0;
5050
bool vi_oc_enable = false;
5151
float vi_oc_factor = 0;
52-
bool is_spectator = false;
52+
bool spectator_mode = false;
5353
Common::EnumMap<ExpansionInterface::EXIDeviceType, ExpansionInterface::MAX_SLOT> exi_device{};
5454
int memcard_size_override = -1;
5555

Source/Core/Core/NetPlayServer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ bool NetPlayServer::SetupNetSettings()
15271527
settings.golf_mode = Config::Get(Config::NETPLAY_NETWORK_MODE) == "golf";
15281528
settings.use_fma = DoAllPlayersHaveHardwareFMA();
15291529
settings.hide_remote_gbas = Config::Get(Config::NETPLAY_HIDE_REMOTE_GBAS);
1530-
settings.is_spectator = Config::Get(Config::NETPLAY_IS_SPECTATOR);
1530+
settings.spectator_mode = Config::Get(Config::NETPLAY_SPECTATOR_MODE);
15311531

15321532
// Unload GameINI to restore things to normal
15331533
Config::RemoveLayer(Config::LayerType::GlobalGame);
@@ -1673,7 +1673,7 @@ bool NetPlayServer::StartGame()
16731673
spac << m_settings.oc_factor;
16741674
spac << m_settings.vi_oc_enable;
16751675
spac << m_settings.vi_oc_factor;
1676-
spac << m_settings.is_spectator;
1676+
spac << m_settings.spectator_mode;
16771677

16781678
for (auto slot : ExpansionInterface::SLOTS)
16791679
spac << static_cast<int>(m_settings.exi_device[slot]);

Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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

454455
void NetPlayDialog::SendMessage(const std::string& msg)
@@ -462,10 +463,10 @@ void NetPlayDialog::SendMessage(const std::string& msg)
462463

463464
bool 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

471472
void 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())

Source/Core/DolphinQt/NetPlay/NetPlayDialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class NetPlayDialog : public QDialog, public NetPlay::NetPlayUI
166166
QAction* m_fixed_delay_action;
167167
QAction* m_hide_remote_gbas_action;
168168
QCheckBox* m_brawlmusic_off;
169-
QCheckBox* m_is_spectator;
169+
QCheckBox* m_spectator_mode;
170170
QPushButton* m_quit_button;
171171
QSplitter* m_splitter;
172172
QActionGroup* m_network_mode_group;

Source/Core/VideoCommon/PerformanceMetrics.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)
113113
const bool movable_overlays = Config::Get(Config::GFX_MOVABLE_PERFORMANCE_METRICS);
114114
const int movable_flag = movable_overlays ? ImGuiWindowFlags_None : ImGuiWindowFlags_NoMove;
115115

116-
const float bg_alpha = 1.0f;
116+
const float bg_alpha = 0.9f;
117117
const auto imgui_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings |
118118
ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoNav | movable_flag |
119119
ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing;
@@ -272,7 +272,7 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)
272272
if (stack_vertically)
273273
window_y += ImGui::GetWindowHeight() + window_padding;
274274
else
275-
window_x -= ImGui::GetWindowWidth() + window_padding;
275+
window_x += ImGui::GetWindowWidth() + window_padding;
276276
clamp_window_position();
277277
ImGui::TextColored(ImVec4(r, g, b, 1.0f), "Speed:%4.0lf%%", 100.0 * speed);
278278
ImGui::TextColored(ImVec4(r, g, b, 1.0f), "Max:%6.0lf%%", 100.0 * GetMaxSpeed());
@@ -282,17 +282,17 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)
282282

283283
if (g_ActiveConfig.bShowFPS || g_ActiveConfig.bShowFTimes)
284284
{
285-
// P+ change: position in the top-right corner of the screen.
286-
ImGui::SetNextWindowPos(ImVec2(window_x, window_y), set_next_position_condition,
285+
// P+ change: Position in the top-left corner of the screen.
286+
ImGui::SetNextWindowPos(ImVec2(window_x_left, window_y_left), set_next_position_condition,
287287
ImVec2(0.0f, 0.0f));
288288
ImGui::SetNextWindowBgAlpha(bg_alpha);
289289

290290
if (ImGui::Begin("FPSStats", nullptr, imgui_flags))
291291
{
292-
if (stack_vertically)
292+
/* if (stack_vertically)
293293
window_y += ImGui::GetWindowHeight() + window_padding;
294294
else
295-
window_x -= ImGui::GetWindowWidth() + window_padding;
295+
window_x -= ImGui::GetWindowWidth() + window_padding; */
296296
clamp_window_position();
297297
if (g_ActiveConfig.bShowFPS)
298298
ImGui::TextColored(ImVec4(r, g, b, 1.0f), "FPS:%7.2lf", fps);
@@ -323,7 +323,7 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)
323323
if (stack_vertically)
324324
window_y += ImGui::GetWindowHeight() + window_padding;
325325
else
326-
window_x -= ImGui::GetWindowWidth() + window_padding;
326+
window_x += ImGui::GetWindowWidth() + window_padding;
327327
clamp_window_position();
328328
if (g_ActiveConfig.bShowVPS)
329329
ImGui::TextColored(ImVec4(r, g, b, 1.0f), "VPS:%7.2lf", vps);

0 commit comments

Comments
 (0)