Skip to content

Commit

Permalink
fix auto update bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleCoaks committed Jul 30, 2023
1 parent c5a5e38 commit 316eb53
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions Source/Core/DolphinQt/Settings/GeneralPane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,25 +283,25 @@ void GeneralPane::LoadConfig()
SignalBlocking(m_combobox_fallback_region)->setCurrentIndex(FALLBACK_REGION_NTSCJ_INDEX);
}

static QString UpdateTrackFromIndex(int index)
{
QString value;

switch (index)
{
case AUTO_UPDATE_DISABLE_INDEX:
value = QString::fromStdString(AUTO_UPDATE_DISABLE_STRING);
break;
case AUTO_UPDATE_BETA_INDEX:
value = QString::fromStdString(AUTO_UPDATE_BETA_STRING);
break;
case AUTO_UPDATE_DEV_INDEX:
value = QString::fromStdString(AUTO_UPDATE_DEV_STRING);
break;
}

return value;
}
//static QString UpdateTrackFromIndex(int index)
//{
// QString value;
//
// switch (index)
// {
// case AUTO_UPDATE_DISABLE_INDEX:
// value = QString::fromStdString(AUTO_UPDATE_DISABLE_STRING);
// break;
// case AUTO_UPDATE_BETA_INDEX:
// value = QString::fromStdString(AUTO_UPDATE_BETA_STRING);
// break;
// case AUTO_UPDATE_DEV_INDEX:
// value = QString::fromStdString(AUTO_UPDATE_DEV_STRING);
// break;
// }
//
// return value;
//}

static DiscIO::Region UpdateFallbackRegionFromIndex(int index)
{
Expand Down Expand Up @@ -333,11 +333,11 @@ void GeneralPane::OnSaveConfig()
Config::ConfigChangeCallbackGuard config_guard;

auto& settings = SConfig::GetInstance();
if (AutoUpdateChecker::SystemSupportsAutoUpdates())
{
Settings::Instance().SetAutoUpdateTrack(
UpdateTrackFromIndex(m_combobox_update_track->currentIndex()));
}
//if (AutoUpdateChecker::SystemSupportsAutoUpdates())
//{
// Settings::Instance().SetAutoUpdateTrack(
// UpdateTrackFromIndex(m_combobox_update_track->currentIndex()));
//}

#ifdef USE_DISCORD_PRESENCE
Discord::SetDiscordPresenceEnabled(m_checkbox_discord_presence->isChecked());
Expand Down

0 comments on commit 316eb53

Please sign in to comment.