Neutrino Movieinfo: show genre, patch by Gaucho316: http://www.dbox2-tuning.net/forum/viewtopic.php?p=384587#p384587

This commit is contained in:
rhabarber1848
2012-10-17 16:33:50 +00:00
committed by Jacek Jendrzej
parent 995aeaeb18
commit 99221ee19c
3 changed files with 23 additions and 132 deletions

View File

@@ -53,6 +53,8 @@
#include <gui/widget/msgbox.h>
#include <gui/movieinfo.h>
#include <neutrino.h>
//#define XMLTREE_LIB
#ifdef XMLTREE_LIB
#include <xmltree/xmltree.h>
@@ -482,6 +484,23 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info)
}
print_buffer.erase(print_buffer.size()-2);
}
if (movie_info.genreMajor != 0)
{
neutrino_locale_t locale_genre;
unsigned char i = (movie_info.genreMajor & 0x0F0);
if (i >= 0x010 && i < 0x0B0)
{
i >>= 4;
i--;
locale_genre = genre_sub_classes_list[i][((movie_info.genreMajor & 0x0F) < genre_sub_classes[i]) ? (movie_info.genreMajor & 0x0F) : 0];
}
else
locale_genre = LOCALE_GENRE_UNKNOWN;
print_buffer += "\n";
print_buffer += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR);
print_buffer += ": ";
print_buffer += g_Locale->getText(locale_genre);
}
print_buffer += "\n\n";
print_buffer += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_PREVPLAYDATE);