-we should only display gametdb information if we are not

in emulator and not in homebrew coverflow (issue 52)
-set all wii magic numbers to our global variable
This commit is contained in:
fix94.1 2012-05-27 21:14:40 +00:00
parent bf26e129d9
commit 1a713f7b3e
5 changed files with 8 additions and 7 deletions

View File

@ -343,7 +343,7 @@ u32 wbfs_get_disc_info(wbfs_t *p, u32 index,u8 *header,int header_size,u32 *size
if(header_size > (int)p->hd_sec_sz) if(header_size > (int)p->hd_sec_sz)
header_size = p->hd_sec_sz; header_size = p->hd_sec_sz;
u32 magic = wbfs_ntohl(*(u32*)(p->tmp_buffer + 24)); u32 magic = wbfs_ntohl(*(u32*)(p->tmp_buffer + 24));
if(magic != 0x5D1C9EA3) if(magic != WII_MAGIC)
{ {
p->head->disc_table[i]=0; p->head->disc_table[i]=0;
return 1; return 1;

View File

@ -273,7 +273,7 @@ static void do_disc(wiidisc_t *d)
u32 i; u32 i;
disc_read(d, 0, b, 0x100); disc_read(d, 0, b, 0x100);
magic = _be32(b + 24); magic = _be32(b + 24);
if (magic != 0x5D1C9EA3) if (magic != WII_MAGIC)
{ {
wbfs_iofree(b); wbfs_iofree(b);
wbfs_error("not a wii disc"); wbfs_error("not a wii disc");

View File

@ -2,6 +2,7 @@
#define WIIDISC_H #define WIIDISC_H
#include <stdio.h> #include <stdio.h>
#include "libwbfs_os.h" // this file is provided by the project wanting to compile libwbfs and wiidisc #include "libwbfs_os.h" // this file is provided by the project wanting to compile libwbfs and wiidisc
#include "defines.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"

View File

@ -315,7 +315,7 @@ void CList<dir_discHdr>::GetHeaders(vector<string> pathlist, vector<dir_discHdr>
tmp.hdr.players = gameTDB.GetPlayers((char *)tmp.hdr.id); tmp.hdr.players = gameTDB.GetPlayers((char *)tmp.hdr.id);
//tmp.hdr.controllers = gameTDB.GetAccessories((char *)tmp.hdr.id); //tmp.hdr.controllers = gameTDB.GetAccessories((char *)tmp.hdr.id);
tmp.hdr.magic = 0x5D1C9EA3; tmp.hdr.magic = WII_MAGIC;
headerlist.push_back(tmp); headerlist.push_back(tmp);
continue; continue;
} }
@ -328,7 +328,7 @@ void CList<dir_discHdr>::GetHeaders(vector<string> pathlist, vector<dir_discHdr>
fclose(fp); fclose(fp);
} }
if (tmp.hdr.magic == 0x5D1C9EA3) if (tmp.hdr.magic == WII_MAGIC)
{ {
//mbstowcs(tmp.title, (const char *)tmp.hdr.title, sizeof(tmp.hdr.title)); //mbstowcs(tmp.title, (const char *)tmp.hdr.title, sizeof(tmp.hdr.title));
//Asciify(tmp.title); //Asciify(tmp.title);
@ -436,7 +436,7 @@ void CList<dir_discHdr>::GetHeaders(vector<string> pathlist, vector<dir_discHdr>
tmp.hdr.players = gameTDB.GetPlayers((char *)tmp.hdr.id); tmp.hdr.players = gameTDB.GetPlayers((char *)tmp.hdr.id);
//tmp.hdr.controllers = gameTDB.GetAccessories((char *)tmp.hdr.id); //tmp.hdr.controllers = gameTDB.GetAccessories((char *)tmp.hdr.id);
if (tmp.hdr.magic == 0x5D1C9EA3) if (tmp.hdr.magic == WII_MAGIC)
{ {
//Asciify(tmp.title); //Asciify(tmp.title);
wcsncpy(tmp.title, tmpString.c_str(), 64); wcsncpy(tmp.title, tmpString.c_str(), 64);
@ -445,7 +445,7 @@ void CList<dir_discHdr>::GetHeaders(vector<string> pathlist, vector<dir_discHdr>
continue; continue;
} }
if (tmp.hdr.magic == 0x5D1C9EA3) if (tmp.hdr.magic == WII_MAGIC)
{ {
//mbstowcs(tmp.title, (const char *)tmp.hdr.title, sizeof(tmp.hdr.title)); //mbstowcs(tmp.title, (const char *)tmp.hdr.title, sizeof(tmp.hdr.title));
//Asciify(tmp.title); //Asciify(tmp.title);

View File

@ -385,7 +385,7 @@ void CMenu::_game(bool launch)
ClearGameSoundThreadStack(); ClearGameSoundThreadStack();
break; break;
} }
else if (BTN_PLUS_PRESSED && m_GameTDBLoaded) else if (BTN_PLUS_PRESSED && m_GameTDBLoaded && (m_cf.getHdr()->hdr.magic == WII_MAGIC || m_cf.getHdr()->hdr.gc_magic == GC_MAGIC || m_current_view == COVERFLOW_CHANNEL))
{ {
_hideGame(); _hideGame();
m_gameSelected = true; m_gameSelected = true;