@@ -308,7 +308,7 @@ static void populateGenresList(void)
308308 int cnt = 0 ;
309309 while (currPtr != NULL )
310310 {
311- DoMethod (app -> LV_GenresList , MUIM_List_InsertSingle , currPtr -> title , MUIV_List_Insert_Sorted );
311+ DoMethod (app -> LV_GenresList , MUIM_List_InsertSingle , currPtr -> title , MUIV_List_Insert_Bottom );
312312
313313 cnt ++ ;
314314 currPtr = currPtr -> next ;
@@ -323,6 +323,8 @@ static void populateGenresList(void)
323323 app -> CY_PropertiesGenreContent [i ++ ] = NULL ;
324324 set (app -> CY_PropertiesGenre , MUIA_Cycle_Entries , app -> CY_PropertiesGenreContent );
325325 set (app -> CY_AddGameGenre , MUIA_Cycle_Entries , app -> CY_PropertiesGenreContent );
326+ set (app -> LV_GenresList , MUIA_List_Active , MUIV_List_Active_Top );
327+ DoMethod (app -> LV_GenresList , MUIM_List_Sort );
326328 set (app -> LV_GenresList , MUIA_List_Quiet , FALSE);
327329}
328330
@@ -360,7 +362,6 @@ void app_start(void)
360362 load_repos (DEFAULT_REPOS_FILE );
361363 apply_settings ();
362364
363-
364365 if (current_settings -> start_with_favorites )
365366 {
366367 filters .showGroup = GROUP_FAVOURITES ;
@@ -381,7 +382,7 @@ void app_start(void)
381382
382383 if (!current_settings -> hide_side_panel )
383384 {
384- populateGenresList ();
385+ populateGenresList (); // This calls the filter_change()
385386 populateChipsetList ();
386387 }
387388 if (current_settings -> hide_side_panel )
@@ -682,19 +683,14 @@ static void showSlavesList(void)
682683 {
683684 if (currPtr -> times_played < mostPlayedTimes )
684685 {
685- // DoMethod(app->LV_GamesList,
686- // MUIM_List_InsertSingle, currPtr->title,
687- // MUIV_List_Insert_Bottom);
688686 DoMethod (app -> LV_GamesList ,
689687 MUIM_NList_InsertSingle , currPtr ,
690688 MUIV_NList_Insert_Bottom );
691689 }
692690 else
693691 {
694692 mostPlayedTimes = currPtr -> times_played ;
695- // DoMethod(app->LV_GamesList,
696- // MUIM_List_InsertSingle, currPtr->title,
697- // MUIV_List_Insert_Top);
693+
698694 DoMethod (app -> LV_GamesList ,
699695 MUIM_NList_InsertSingle , currPtr ,
700696 MUIV_NList_Insert_Top );
@@ -713,14 +709,15 @@ static void showSlavesList(void)
713709
714710 DoMethod (app -> LV_GamesList ,
715711 MUIM_NList_InsertSingle , currPtr ,
716- MUIV_NList_Insert_Sorted );
712+ MUIV_NList_Insert_Bottom );
717713
718714 cnt ++ ;
719715nextItem :
720716 }
721717
722718 currPtr = currPtr -> next ;
723719 }
720+ DoMethod (app -> LV_GamesList , MUIM_NList_Sort );
724721 set (app -> LV_GamesList , MUIA_NList_Quiet , FALSE);
725722
726723 sprintf (buf , (const char * )GetMBString (MSG_TotalNumberOfGames ), slavesListNodeCount (cnt ));
@@ -1443,14 +1440,13 @@ void list_show_hidden(void)
14431440 {
14441441 set (app -> LV_GenresList , MUIA_Disabled , TRUE);
14451442 filters .showHiddenOnly = TRUE;
1446- showSlavesList ();
14471443 }
14481444 else
14491445 {
14501446 set (app -> LV_GenresList , MUIA_Disabled , FALSE);
14511447 filters .showHiddenOnly = FALSE;
1452- showSlavesList ();
14531448 }
1449+ showSlavesList ();
14541450}
14551451
14561452void app_stop (void )
@@ -1768,9 +1764,10 @@ void non_whdload_ok(void)
17681764 set (app -> LV_GamesList , MUIA_NList_Quiet , TRUE);
17691765 DoMethod (app -> LV_GamesList ,
17701766 MUIM_NList_InsertSingle , node ,
1771- MUIV_NList_Insert_Sorted );
1767+ MUIV_NList_Insert_Bottom );
17721768 get (app -> LV_GamesList , MUIA_NList_InsertPosition , & newpos );
17731769 set (app -> LV_GamesList , MUIA_NList_Active , newpos );
1770+ DoMethod (app -> LV_GamesList , MUIM_NList_Sort );
17741771 set (app -> LV_GamesList , MUIA_NList_Quiet , FALSE);
17751772}
17761773
0 commit comments