Skip to content

Commit b6e531a

Browse files
committed
Re-do (and optimization) of client side music code to prevent it from syncing from host to client
1 parent 8971c11 commit b6e531a

File tree

9 files changed

+4
-17
lines changed

9 files changed

+4
-17
lines changed

Source/Core/Core/BootManager.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ 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.bBrawlMusicOff = netplay_settings->brawlmusic_off;
9998
StartUp.bIsSpectator = netplay_settings->is_spectator;
10099
}
101100

Source/Core/Core/GeckoCode.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "Core/PowerPC/MMU.h"
2323
#include "Core/PowerPC/PowerPC.h"
2424
#include "Core/System.h"
25-
#include "Core/NetPlayProto.h"
2625

2726
#include <iostream>
2827

Source/Core/Core/NetPlayClient.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,6 @@ void NetPlayClient::OnStartGame(sf::Packet& packet)
910910
packet >> m_net_settings.oc_factor;
911911
packet >> m_net_settings.vi_oc_enable;
912912
packet >> m_net_settings.vi_oc_factor;
913-
packet >> m_net_settings.brawlmusic_off;
914913
packet >> m_net_settings.is_spectator;
915914

916915
for (auto slot : ExpansionInterface::SLOTS)

Source/Core/Core/NetPlayClient.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ class NetPlayUI
7676
virtual void OnTtlDetermined(u8 ttl) = 0;
7777

7878
virtual bool IsRecording() = 0;
79-
virtual bool IsMusicOff() = 0;
8079
virtual bool IsSpectator() = 0;
8180
virtual std::shared_ptr<const UICommon::GameFile>
8281
FindGameFile(const SyncIdentifier& sync_identifier,

Source/Core/Core/NetPlayProto.h

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

Source/Core/Core/NetPlayServer.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,6 @@ bool NetPlayServer::SetupNetSettings()
15031503
settings.golf_mode = Config::Get(Config::NETPLAY_NETWORK_MODE) == "golf";
15041504
settings.use_fma = DoAllPlayersHaveHardwareFMA();
15051505
settings.hide_remote_gbas = Config::Get(Config::NETPLAY_HIDE_REMOTE_GBAS);
1506-
settings.brawlmusic_off = Config::Get(Config::NETPLAY_BRAWL_MUSIC_OFF);
15071506
settings.is_spectator = Config::Get(Config::NETPLAY_IS_SPECTATOR);
15081507

15091508
// Unload GameINI to restore things to normal
@@ -1650,7 +1649,6 @@ bool NetPlayServer::StartGame()
16501649
spac << m_settings.oc_factor;
16511650
spac << m_settings.vi_oc_enable;
16521651
spac << m_settings.vi_oc_factor;
1653-
spac << m_settings.brawlmusic_off;
16541652
spac << m_settings.is_spectator;
16551653

16561654
for (auto slot : ExpansionInterface::SLOTS)

Source/Core/Core/PatchEngine.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "Core/ActionReplay.h"
2828
#include "Core/CheatCodes.h"
2929
#include "Core/Config/SessionSettings.h"
30+
#include "Core/Config/NetplaySettings.h"
3031
#include "Core/ConfigManager.h"
3132
#include "Core/NetPlayProto.h"
3233
#include "Core/Core.h"
@@ -37,6 +38,8 @@
3738
#include "Core/PowerPC/PowerPC.h"
3839
#include "Core/System.h"
3940

41+
42+
4043
namespace PatchEngine
4144
{
4245
constexpr std::array<const char*, 3> s_patch_type_strings{{
@@ -102,7 +105,7 @@ std::string SerializeLine(const PatchEntry& entry)
102105

103106
static bool IsEnabledMusicCode(const Patch& patch)
104107
{
105-
if (NetPlay::IsNetPlayRunning() && patch.name == "[P+] Music Off")
108+
if (NetPlay::IsNetPlayRunning() && patch.name == "[P+] Music Off" && Config::Get(Config::NETPLAY_BRAWL_MUSIC_OFF))
106109
{
107110
return SConfig::GetInstance().bBrawlMusicOff;
108111
}

Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,14 +473,6 @@ bool NetPlayDialog::IsSpectator()
473473
return false;
474474
}
475475

476-
bool NetPlayDialog::IsMusicOff()
477-
{
478-
std::optional<bool> brawlmusic_off = RunOnObject(m_brawlmusic_off, &QCheckBox::isChecked);
479-
if (brawlmusic_off)
480-
return *brawlmusic_off;
481-
return false;
482-
}
483-
484476
void NetPlayDialog::OnChat()
485477
{
486478
QueueOnObject(this, [this] {

Source/Core/DolphinQt/NetPlay/NetPlayDialog.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ class NetPlayDialog : public QDialog, public NetPlay::NetPlayUI
7979
void OnIndexRefreshFailed(const std::string error) override;
8080

8181
bool IsRecording() override;
82-
bool IsMusicOff() override;
8382
bool IsSpectator() override;
8483
void IsSpectatorEnabled(bool enabled);
8584
std::shared_ptr<const UICommon::GameFile>

0 commit comments

Comments
 (0)