Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Externals/SDL/SDL
Submodule SDL updated 169 files
1 change: 1 addition & 0 deletions Externals/bzip2/bzip2
Submodule bzip2 added at 6a8690
1 change: 1 addition & 0 deletions Externals/cpp-ipc/cpp-ipc
Submodule cpp-ipc added at a0c772
1 change: 1 addition & 0 deletions Externals/cpp-optparse/cpp-optparse
Submodule cpp-optparse added at 2265d6
2 changes: 1 addition & 1 deletion Externals/curl/curl
Submodule curl updated 2508 files
2 changes: 1 addition & 1 deletion Externals/fmt/fmt
Submodule fmt updated 187 files
1 change: 1 addition & 0 deletions Externals/glslang/glslang
Submodule glslang added at a57276
1 change: 1 addition & 0 deletions Externals/imgui/imgui
Submodule imgui added at 45acd5
2 changes: 1 addition & 1 deletion Externals/libusb/libusb
Submodule libusb updated 203 files
2 changes: 1 addition & 1 deletion Externals/mGBA/mgba
Submodule mgba updated 882 files
1 change: 1 addition & 0 deletions Externals/pugixml/pugixml
Submodule pugixml added at ee86be
2 changes: 1 addition & 1 deletion Source/Core/Core/BootManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ bool BootCore(Core::System& system, std::unique_ptr<BootParameters> boot,

Config::AddLayer(ConfigLoaders::GenerateNetPlayConfigLoader(*netplay_settings));
StartUp.bCopyWiiSaveNetplay = netplay_settings->savedata_load;
StartUp.bIsSpectator = netplay_settings->is_spectator;
StartUp.bIsSpectator = netplay_settings->spectator_mode;
}

// Override out-of-region languages/countries to prevent games from crashing or behaving oddly
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Config/NetplaySettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Info<u32> NETPLAY_PLAYER_BUFFER_SIZE{{System::Main, "NetPlay", "PlayerBuff
const Info<u32> NETPLAY_CLIENT_BUFFER_SIZE{{System::Main, "NetPlay", "BufferSizeClient"}, 1};

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

const Info<bool> NETPLAY_SAVEDATA_LOAD{{System::Main, "NetPlay", "SyncSaves"}, true};
const Info<bool> NETPLAY_SAVEDATA_WRITE{{System::Main, "NetPlay", "WriteSaveData"}, false};
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Config/NetplaySettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern const Info<u32> NETPLAY_PLAYER_BUFFER_SIZE;
extern const Info<u32> NETPLAY_CLIENT_BUFFER_SIZE;

extern const Info<bool> NETPLAY_BRAWL_MUSIC_OFF;
extern const Info<bool> NETPLAY_IS_SPECTATOR;
extern const Info<bool> NETPLAY_SPECTATOR_MODE;

extern const Info<bool> NETPLAY_SAVEDATA_LOAD;
extern const Info<bool> NETPLAY_SAVEDATA_WRITE;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/NetPlayClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ void NetPlayClient::OnStartGame(sf::Packet& packet)
packet >> m_net_settings.oc_factor;
packet >> m_net_settings.vi_oc_enable;
packet >> m_net_settings.vi_oc_factor;
packet >> m_net_settings.is_spectator;
packet >> m_net_settings.spectator_mode;

for (auto slot : ExpansionInterface::SLOTS)
packet >> m_net_settings.exi_device[slot];
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/NetPlayProto.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct NetSettings
float oc_factor = 0;
bool vi_oc_enable = false;
float vi_oc_factor = 0;
bool is_spectator = false;
bool spectator_mode = false;
Common::EnumMap<ExpansionInterface::EXIDeviceType, ExpansionInterface::MAX_SLOT> exi_device{};
int memcard_size_override = -1;

Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/NetPlayServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ bool NetPlayServer::SetupNetSettings()
settings.golf_mode = Config::Get(Config::NETPLAY_NETWORK_MODE) == "golf";
settings.use_fma = DoAllPlayersHaveHardwareFMA();
settings.hide_remote_gbas = Config::Get(Config::NETPLAY_HIDE_REMOTE_GBAS);
settings.is_spectator = Config::Get(Config::NETPLAY_IS_SPECTATOR);
settings.spectator_mode = Config::Get(Config::NETPLAY_SPECTATOR_MODE);

// Unload GameINI to restore things to normal
Config::RemoveLayer(Config::LayerType::GlobalGame);
Expand Down Expand Up @@ -1673,7 +1673,7 @@ bool NetPlayServer::StartGame()
spac << m_settings.oc_factor;
spac << m_settings.vi_oc_enable;
spac << m_settings.vi_oc_factor;
spac << m_settings.is_spectator;
spac << m_settings.spectator_mode;

for (auto slot : ExpansionInterface::SLOTS)
spac << static_cast<int>(m_settings.exi_device[slot]);
Expand Down
23 changes: 12 additions & 11 deletions Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void NetPlayDialog::CreateMainLayout()
m_player_buffer_label = new QLabel(tr("Player Buffer:"));
m_quit_button = new QPushButton(tr("Quit"));
m_brawlmusic_off = new QCheckBox(tr("Client Side Music Off"));
m_is_spectator = new QCheckBox(tr("Spectator"));
m_spectator_mode = new QCheckBox(tr("Spectator"));
m_splitter = new QSplitter(Qt::Horizontal);
m_menu_bar = new QMenuBar(this);

Expand Down Expand Up @@ -265,7 +265,7 @@ void NetPlayDialog::CreateMainLayout()
options_widget->addWidget(m_player_buffer_label, 0, 3, Qt::AlignVCenter);
options_widget->addWidget(m_player_buffer_size_box, 0, 4, Qt::AlignVCenter);
options_widget->addWidget(m_brawlmusic_off, 0, 5, Qt::AlignVCenter);
options_widget->addWidget(m_is_spectator, 0, 6, Qt::AlignVCenter);
options_widget->addWidget(m_spectator_mode, 0, 6, Qt::AlignVCenter);
options_widget->addWidget(m_quit_button, 0, 8, Qt::AlignVCenter | Qt::AlignRight);
options_widget->setColumnStretch(7, 1000);

Expand Down Expand Up @@ -401,7 +401,7 @@ void NetPlayDialog::ConnectWidgets()
connect(m_start_button, &QPushButton::clicked, this, &NetPlayDialog::OnStart);
connect(m_quit_button, &QPushButton::clicked, this, &NetPlayDialog::reject);

connect(m_is_spectator, &QCheckBox::toggled, this, &NetPlayDialog::IsSpectatorEnabled);
connect(m_spectator_mode, &QCheckBox::toggled, this, &NetPlayDialog::IsSpectatorEnabled);

connect(m_game_button, &QPushButton::clicked, [this] {
GameListDialog gld(m_game_list_model, this);
Expand Down Expand Up @@ -449,6 +449,7 @@ void NetPlayDialog::ConnectWidgets()
connect(m_fixed_delay_action, &QAction::toggled, this, &NetPlayDialog::SaveSettings);
connect(m_hide_remote_gbas_action, &QAction::toggled, this, &NetPlayDialog::SaveSettings);
connect(m_brawlmusic_off, &QCheckBox::toggled, this, &NetPlayDialog::SaveSettings);
connect(m_spectator_mode, &QCheckBox::toggled, this, &NetPlayDialog::SaveSettings);
}

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

bool NetPlayDialog::IsSpectator()
{
std::optional<bool> is_spectator = RunOnObject(m_is_spectator, &QCheckBox::isChecked);
if (is_spectator)
return *is_spectator;
return false;
if (m_spectator_mode->isChecked())
return true;
else
return false;
}

void NetPlayDialog::OnChat()
Expand Down Expand Up @@ -916,7 +917,7 @@ void NetPlayDialog::SetOptionsEnabled(bool enabled)
m_golf_mode_action->setEnabled(enabled);
m_fixed_delay_action->setEnabled(enabled);
m_brawlmusic_off->setEnabled(enabled);
m_is_spectator->setEnabled(enabled);
m_spectator_mode->setEnabled(enabled);
}

m_record_input_action->setEnabled(enabled);
Expand Down Expand Up @@ -1204,7 +1205,7 @@ void NetPlayDialog::LoadSettings()
const bool golf_mode_overlay = Config::Get(Config::NETPLAY_GOLF_MODE_OVERLAY);
const bool hide_remote_gbas = Config::Get(Config::NETPLAY_HIDE_REMOTE_GBAS);
const bool brawlmusic_off = Config::Get(Config::NETPLAY_BRAWL_MUSIC_OFF);
const bool is_spectator = Config::Get(Config::NETPLAY_IS_SPECTATOR);
const bool spectator_mode = Config::Get(Config::NETPLAY_SPECTATOR_MODE);

m_minimum_buffer_size_box->setValue(minimum_buffer_size);
m_player_buffer_size_box->setValue(player_buffer_size);
Expand All @@ -1224,7 +1225,7 @@ void NetPlayDialog::LoadSettings()
m_hide_remote_gbas_action->setChecked(hide_remote_gbas);

m_brawlmusic_off->setChecked(brawlmusic_off);
m_is_spectator->setChecked(is_spectator);
m_spectator_mode->setChecked(spectator_mode);

const std::string network_mode = Config::Get(Config::NETPLAY_NETWORK_MODE);

Expand Down Expand Up @@ -1269,7 +1270,7 @@ void NetPlayDialog::SaveSettings()
Config::SetBase(Config::NETPLAY_GOLF_MODE_OVERLAY, m_golf_mode_overlay_action->isChecked());
Config::SetBase(Config::NETPLAY_HIDE_REMOTE_GBAS, m_hide_remote_gbas_action->isChecked());
Config::SetBase(Config::NETPLAY_BRAWL_MUSIC_OFF, m_brawlmusic_off->isChecked());
Config::SetBase(Config::NETPLAY_IS_SPECTATOR, m_is_spectator->isChecked());
Config::SetBase(Config::NETPLAY_SPECTATOR_MODE, m_spectator_mode->isChecked());

std::string network_mode;
if (m_fixed_delay_action->isChecked())
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinQt/NetPlay/NetPlayDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class NetPlayDialog : public QDialog, public NetPlay::NetPlayUI
QAction* m_fixed_delay_action;
QAction* m_hide_remote_gbas_action;
QCheckBox* m_brawlmusic_off;
QCheckBox* m_is_spectator;
QCheckBox* m_spectator_mode;
QPushButton* m_quit_button;
QSplitter* m_splitter;
QActionGroup* m_network_mode_group;
Expand Down
9 changes: 2 additions & 7 deletions Source/Core/DolphinQt/Settings/PathPane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,13 @@ QGridLayout* PathPane::MakePathsLayout()
layout->addWidget(m_game_edit, 0, 1);
layout->addWidget(game_open, 0, 2);

m_launcher_edit = new QLineEdit(QString::fromStdString(File::GetUserPath(D_LAUNCHERS_IDX)));
connect(m_launcher_edit, &QLineEdit::editingFinished, [this] {
Config::SetBase(Config::MAIN_LAUNCHER_PATH, m_launcher_edit->text().toStdString());
});
connect(&Settings::Instance(), &Settings::LauncherPathChanged, this,
[this](const QString& path) { m_game_edit->setText(path); });
m_launcher_edit = new ConfigUserPath(D_LAUNCHERS_IDX, Config::MAIN_LAUNCHER_PATH);
QPushButton* launcher_open = new NonDefaultQPushButton(QStringLiteral("..."));
connect(launcher_open, &QPushButton::clicked, this, &PathPane::BrowseLauncher);
layout->addWidget(new QLabel(tr("Launcher Path:")), 1, 0);
layout->addWidget(m_launcher_edit, 1, 1);
layout->addWidget(launcher_open, 1, 2);

m_nand_edit = new ConfigUserPath(D_WIIROOT_IDX, Config::MAIN_FS_PATH);
QPushButton* nand_open = new NonDefaultQPushButton(QStringLiteral("..."));
connect(nand_open, &QPushButton::clicked, this, &PathPane::BrowseWiiNAND);
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinQt/Settings/PathPane.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PathPane final : public QWidget
ConfigText* m_nand_edit;
ConfigText* m_dump_edit;
ConfigText* m_load_edit;
QLineEdit* m_launcher_edit;
ConfigText* m_launcher_edit;
ConfigText* m_resource_pack_edit;
ConfigText* m_wfs_edit;

Expand Down
14 changes: 7 additions & 7 deletions Source/Core/VideoCommon/PerformanceMetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)
const bool movable_overlays = Config::Get(Config::GFX_MOVABLE_PERFORMANCE_METRICS);
const int movable_flag = movable_overlays ? ImGuiWindowFlags_None : ImGuiWindowFlags_NoMove;

const float bg_alpha = 1.0f;
const float bg_alpha = 0.9f;
const auto imgui_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings |
ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoNav | movable_flag |
ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing;
Expand Down Expand Up @@ -272,7 +272,7 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)
if (stack_vertically)
window_y += ImGui::GetWindowHeight() + window_padding;
else
window_x -= ImGui::GetWindowWidth() + window_padding;
window_x += ImGui::GetWindowWidth() + window_padding;
clamp_window_position();
ImGui::TextColored(ImVec4(r, g, b, 1.0f), "Speed:%4.0lf%%", 100.0 * speed);
ImGui::TextColored(ImVec4(r, g, b, 1.0f), "Max:%6.0lf%%", 100.0 * GetMaxSpeed());
Expand All @@ -282,17 +282,17 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)

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

if (ImGui::Begin("FPSStats", nullptr, imgui_flags))
{
if (stack_vertically)
/* if (stack_vertically)
window_y += ImGui::GetWindowHeight() + window_padding;
else
window_x -= ImGui::GetWindowWidth() + window_padding;
window_x -= ImGui::GetWindowWidth() + window_padding; */
clamp_window_position();
if (g_ActiveConfig.bShowFPS)
ImGui::TextColored(ImVec4(r, g, b, 1.0f), "FPS:%7.2lf", fps);
Expand Down Expand Up @@ -323,7 +323,7 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)
if (stack_vertically)
window_y += ImGui::GetWindowHeight() + window_padding;
else
window_x -= ImGui::GetWindowWidth() + window_padding;
window_x += ImGui::GetWindowWidth() + window_padding;
clamp_window_position();
if (g_ActiveConfig.bShowVPS)
ImGui::TextColored(ImVec4(r, g, b, 1.0f), "VPS:%7.2lf", vps);
Expand Down
Loading