Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Save game list sorting.
Fixes issue 5771.
  • Loading branch information
rog9 committed Dec 9, 2012
1 parent 4fc0125 commit 43d673b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
12 changes: 7 additions & 5 deletions Source/Core/Core/Src/ConfigManager.cpp
Expand Up @@ -211,6 +211,7 @@ void SConfig::SaveSettings()
ini.Set("GameList", "ListKorea", m_ListKorea);
ini.Set("GameList", "ListTaiwan", m_ListTaiwan);
ini.Set("GameList", "ListUnknown", m_ListUnknown);
ini.Set("GameList", "ListSort", m_ListSort);

// Core
ini.Set("Core", "HLE_BS2", m_LocalCoreStartupParameter.bHLE_BS2);
Expand Down Expand Up @@ -344,11 +345,12 @@ void SConfig::LoadSettings()
ini.Get("GameList", "ListPal", &m_ListPal, true);
ini.Get("GameList", "ListUsa", &m_ListUsa, true);

ini.Get("GameList", "ListFrance", &m_ListFrance, true);
ini.Get("GameList", "ListItaly", &m_ListItaly, true);
ini.Get("GameList", "ListKorea", &m_ListKorea, true);
ini.Get("GameList", "ListTaiwan", &m_ListTaiwan, true);
ini.Get("GameList", "ListUnknown", &m_ListUnknown, true);
ini.Get("GameList", "ListFrance", &m_ListFrance, true);
ini.Get("GameList", "ListItaly", &m_ListItaly, true);
ini.Get("GameList", "ListKorea", &m_ListKorea, true);
ini.Get("GameList", "ListTaiwan", &m_ListTaiwan, true);
ini.Get("GameList", "ListUnknown", &m_ListUnknown, true);
ini.Get("GameList", "ListSort", &m_ListSort, 2);

// Core
ini.Get("Core", "HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, false);
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Src/ConfigManager.h
Expand Up @@ -62,6 +62,7 @@ struct SConfig : NonCopyable
bool m_InterfaceLogWindow;
bool m_InterfaceLogConfigWindow;
bool m_InterfaceConsole;
int m_ListSort;

bool m_ListDrives;
bool m_ListWad;
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/DolphinWX/Src/GameListCtrl.cpp
Expand Up @@ -320,7 +320,7 @@ void CGameListCtrl::Update()

// Sort items by Title
wxListEvent event;
event.m_col = COLUMN_TITLE; last_column = 0;
event.m_col = SConfig::GetInstance().m_ListSort; last_column = 0;
OnColumnClick(event);

SetColumnWidth(COLUMN_SIZE, wxLIST_AUTOSIZE);
Expand Down Expand Up @@ -708,6 +708,7 @@ void CGameListCtrl::OnColumnClick(wxListEvent& event)
last_sort = current_column;
}

SConfig::GetInstance().m_ListSort = last_sort;
caller = this;
SortItems(wxListCompare, last_sort);
}
Expand Down

0 comments on commit 43d673b

Please sign in to comment.