diff --git a/source/devicemounter/libwbfs/libwbfs.c b/source/devicemounter/libwbfs/libwbfs.c index 38bf5aac..05f22a3e 100644 --- a/source/devicemounter/libwbfs/libwbfs.c +++ b/source/devicemounter/libwbfs/libwbfs.c @@ -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) header_size = p->hd_sec_sz; u32 magic = wbfs_ntohl(*(u32*)(p->tmp_buffer + 24)); - if(magic != 0x5D1C9EA3) + if(magic != WII_MAGIC) { p->head->disc_table[i]=0; return 1; diff --git a/source/devicemounter/libwbfs/wiidisc.c b/source/devicemounter/libwbfs/wiidisc.c index 50fbd71c..08cfc398 100644 --- a/source/devicemounter/libwbfs/wiidisc.c +++ b/source/devicemounter/libwbfs/wiidisc.c @@ -273,7 +273,7 @@ static void do_disc(wiidisc_t *d) u32 i; disc_read(d, 0, b, 0x100); magic = _be32(b + 24); - if (magic != 0x5D1C9EA3) + if (magic != WII_MAGIC) { wbfs_iofree(b); wbfs_error("not a wii disc"); diff --git a/source/devicemounter/libwbfs/wiidisc.h b/source/devicemounter/libwbfs/wiidisc.h index e5f7bc44..f1502109 100644 --- a/source/devicemounter/libwbfs/wiidisc.h +++ b/source/devicemounter/libwbfs/wiidisc.h @@ -2,6 +2,7 @@ #define WIIDISC_H #include #include "libwbfs_os.h" // this file is provided by the project wanting to compile libwbfs and wiidisc +#include "defines.h" #ifdef __cplusplus extern "C" diff --git a/source/list/list.cpp b/source/list/list.cpp index 144123a7..a5414855 100644 --- a/source/list/list.cpp +++ b/source/list/list.cpp @@ -315,7 +315,7 @@ void CList::GetHeaders(vector pathlist, vector tmp.hdr.players = gameTDB.GetPlayers((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); continue; } @@ -328,7 +328,7 @@ void CList::GetHeaders(vector pathlist, vector 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)); //Asciify(tmp.title); @@ -436,7 +436,7 @@ void CList::GetHeaders(vector pathlist, vector tmp.hdr.players = gameTDB.GetPlayers((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); wcsncpy(tmp.title, tmpString.c_str(), 64); @@ -445,7 +445,7 @@ void CList::GetHeaders(vector pathlist, vector continue; } - if (tmp.hdr.magic == 0x5D1C9EA3) + if (tmp.hdr.magic == WII_MAGIC) { //mbstowcs(tmp.title, (const char *)tmp.hdr.title, sizeof(tmp.hdr.title)); //Asciify(tmp.title); diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index 26d4cb6e..1084d475 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -385,7 +385,7 @@ void CMenu::_game(bool launch) ClearGameSoundThreadStack(); 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(); m_gameSelected = true;