From f7e84e30df7d24148698782803d22c8d8eca4f64 Mon Sep 17 00:00:00 2001 From: Steveice10 Date: Mon, 16 Jan 2017 14:21:13 -0800 Subject: [PATCH] Fix TWL cartridges being sorted at end of title list. --- source/ui/section/titles.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/ui/section/titles.c b/source/ui/section/titles.c index 43e53ef..5273694 100644 --- a/source/ui/section/titles.c +++ b/source/ui/section/titles.c @@ -249,14 +249,15 @@ static int titles_compare(void* data, const void* p1, const void* p2) { title_info* title1 = (title_info*) info1->data; title_info* title2 = (title_info*) info2->data; - if(!title1->twl && title2->twl) { + + if(title1->mediaType > title2->mediaType) { return -1; - } else if(title1->twl && !title2->twl) { + } else if(title1->mediaType < title2->mediaType) { return 1; } else { - if(title1->mediaType > title2->mediaType) { + if(!title1->twl && title2->twl) { return -1; - } else if(title1->mediaType < title2->mediaType) { + } else if(title1->twl && !title2->twl) { return 1; } else { if(listData->sortByName) {