-changed version number to Beta 4.1.1

-fixed a possible return to neek bug
-some cleanup
This commit is contained in:
fix94.1 2013-01-01 17:42:46 +00:00
parent 6162cc7a3f
commit 7b738cbe73
27 changed files with 86 additions and 84 deletions

View File

@ -44,8 +44,7 @@ SOURCES := source \
DATA := data \ DATA := data \
data/images \ data/images \
data/help \ data/help \
data/sounds \ data/sounds
data/save
INCLUDES := source INCLUDES := source
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------

View File

@ -11,7 +11,7 @@ typedef struct _dolheader
u32 bss_size; u32 bss_size;
u32 entry_point; u32 entry_point;
u32 padding[7]; u32 padding[7];
} __attribute__((packed)) dolheader; } ATTRIBUTE_PACKED dolheader;
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString,
u8 patchVidModes, int aspectRatio); u8 patchVidModes, int aspectRatio);

View File

@ -51,7 +51,7 @@ struct RLAN_Header
u32 file_size; u32 file_size;
u16 offset; u16 offset;
u16 section_count; u16 section_count;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct PAI1_Header struct PAI1_Header
{ {
@ -63,7 +63,7 @@ struct PAI1_Header
u16 file_count; u16 file_count;
u16 animator_count; u16 animator_count;
u32 entry_offset; u32 entry_offset;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct AnimatorHeader struct AnimatorHeader
{ {
@ -71,14 +71,14 @@ struct AnimatorHeader
u8 tag_count; u8 tag_count;
u8 is_material; u8 is_material;
u16 apad; u16 apad;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct Anim_Header struct Anim_Header
{ {
u32 animation_type; u32 animation_type;
u8 frame_count; u8 frame_count;
u8 pad[3]; u8 pad[3];
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct KeyFrame_Header struct KeyFrame_Header
{ {
@ -89,7 +89,7 @@ struct KeyFrame_Header
u16 key_count; u16 key_count;
u16 pad1; u16 pad1;
u32 offset; u32 offset;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct KeyType struct KeyType
{ {

View File

@ -52,13 +52,13 @@ private:
u32 magic; u32 magic;
u32 num_textures; u32 num_textures;
u32 header_size; u32 header_size;
} __attribute__((packed)) ; } ATTRIBUTE_PACKED;
struct TPL_Texture struct TPL_Texture
{ {
u32 texture_offset; u32 texture_offset;
u32 palette_offset; u32 palette_offset;
} __attribute__((packed)) ; } ATTRIBUTE_PACKED;
struct TPL_Texture_Header struct TPL_Texture_Header
{ {
@ -75,7 +75,7 @@ private:
u8 min_lod; u8 min_lod;
u8 max_lod; u8 max_lod;
u8 unpacked; u8 unpacked;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct TPL_Palette_Header struct TPL_Palette_Header
{ {
@ -84,7 +84,7 @@ private:
u8 pad; u8 pad;
u32 format; u32 format;
u32 offset; u32 offset;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
Texture::Header *header; Texture::Header *header;
TPL_Palette_Header *palette; TPL_Palette_Header *palette;

View File

@ -99,7 +99,7 @@ protected:
u32 filesize; u32 filesize;
u16 header_len; u16 header_len;
u16 section_count; u16 section_count;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct Header struct Header
{ {
@ -107,19 +107,19 @@ protected:
u8 pad[3]; u8 pad[3];
float width; float width;
float height; float height;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct LytItemList struct LytItemList
{ {
u16 num_items; u16 num_items;
u16 offset_to_first; u16 offset_to_first;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct LytStringTable struct LytStringTable
{ {
u32 offset_filename; u32 offset_filename;
u32 pad; u32 pad;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct Group struct Group
{ {

View File

@ -41,7 +41,7 @@ public:
GXColorS10 color_regs[3]; GXColorS10 color_regs[3];
GXColor color_constants[4]; GXColor color_constants[4];
u32 flags; u32 flags;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
Material(); Material();
@ -87,14 +87,14 @@ private:
u32 texture_coord_gen : 4; u32 texture_coord_gen : 4;
u32 texture_srt : 4; u32 texture_srt : 4;
u32 texture_map : 4; u32 texture_map : 4;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct TextureMap struct TextureMap
{ {
u16 tex_index; u16 tex_index;
u8 wrap_s; u8 wrap_s;
u8 wrap_t; u8 wrap_t;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct TextureSrt struct TextureSrt
{ {
@ -103,7 +103,7 @@ private:
f32 rotate; f32 rotate;
f32 scale_x; f32 scale_x;
f32 scale_y; f32 scale_y;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct TextureCoordGen struct TextureCoordGen
{ {
@ -111,14 +111,14 @@ private:
u8 tgen_src; u8 tgen_src;
u8 mtxsrc; u8 mtxsrc;
u8 pad; u8 pad;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct ChannelControl struct ChannelControl
{ {
u8 color_matsrc; u8 color_matsrc;
u8 alpha_matsrc; u8 alpha_matsrc;
u16 pad; u16 pad;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct IndSrt struct IndSrt
{ {
@ -127,7 +127,7 @@ private:
f32 rotate; f32 rotate;
f32 scale_x; f32 scale_x;
f32 scale_y; f32 scale_y;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct IndStage struct IndStage
{ {
@ -135,19 +135,19 @@ private:
u8 tex_map; u8 tex_map;
u8 scale_s; u8 scale_s;
u8 scale_t; u8 scale_t;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct BlendModes struct BlendModes
{ {
u8 type, src_factor, dst_factor, logical_op; u8 type, src_factor, dst_factor, logical_op;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct AlphaCompareModes struct AlphaCompareModes
{ {
u8 compare, op, ref0, ref1; u8 compare, op, ref0, ref1;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct TevSwap struct TevSwap
{ {
@ -155,7 +155,7 @@ private:
u32 b : 2; u32 b : 2;
u32 g : 2; u32 g : 2;
u32 r : 2; u32 r : 2;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct TevStage struct TevStage
{ {
@ -184,7 +184,7 @@ private:
u32 tevregid : 2; u32 tevregid : 2;
u32 clamp : 1; u32 clamp : 1;
} __attribute__((packed)) color_in, __attribute__((packed)) alpha_in; } ATTRIBUTE_PACKED color_in, ATTRIBUTE_PACKED alpha_in;
struct struct
{ {
@ -205,8 +205,8 @@ private:
u32 addprev : 1; u32 addprev : 1;
u32 format : 2; u32 format : 2;
} __attribute__((packed)) ind; } ATTRIBUTE_PACKED ind;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
// Material flags // Material flags
MatFlags *flags; MatFlags *flags;

View File

@ -57,7 +57,7 @@ public:
Vec2f scale; Vec2f scale;
float width; float width;
float height; float height;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
Pane() : header(NULL) {} Pane() : header(NULL) {}
virtual ~Pane(); virtual ~Pane();

View File

@ -38,7 +38,7 @@ public:
u16 material_index; u16 material_index;
u8 tex_coord_count; u8 tex_coord_count;
u8 pad; u8 pad;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
QuadPane() : header(NULL) {} QuadPane() : header(NULL) {}
void Load(QuadPane::Header *file); void Load(QuadPane::Header *file);

View File

@ -71,7 +71,7 @@ private:
float height; // seems to work better for offset calculation float height; // seems to work better for offset calculation
float space_char; float space_char;
float space_line; float space_line;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
Textbox::Header *header; Textbox::Header *header;
const u16 *text; const u16 *text;

View File

@ -85,7 +85,7 @@ private:
u32 filesize; u32 filesize;
u16 header_len; u16 header_len;
u16 section_count; u16 section_count;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct GlgrHeader struct GlgrHeader
{ {
@ -97,7 +97,7 @@ private:
u16 sheet_count; u16 sheet_count;
u16 cwdh_count; u16 cwdh_count;
u16 cmap_count; u16 cmap_count;
}__attribute__(( packed )); } ATTRIBUTE_PACKED;
struct FinfHeader struct FinfHeader
{ {
@ -117,7 +117,7 @@ private:
u8 width; u8 width;
u8 ascent; u8 ascent;
u8 unk8_10; u8 unk8_10;
} __attribute__(( packed )); } ATTRIBUTE_PACKED;
struct TglpHeader struct TglpHeader
{ {
@ -138,7 +138,7 @@ private:
u16 width; // width of image u16 width; // width of image
u16 height; // height of image u16 height; // height of image
u32 dataOffset; // data offset u32 dataOffset; // data offset
} __attribute__(( packed )); } ATTRIBUTE_PACKED;
struct CwdhHeader struct CwdhHeader
{ {
@ -148,7 +148,7 @@ private:
u16 endIdx; // u16 endIdx; //
u32 next; // u32 next; //
} __attribute__(( packed )); } ATTRIBUTE_PACKED;
struct CmapEntry struct CmapEntry
{ {
@ -158,14 +158,14 @@ private:
u16 pad; u16 pad;
u32 pos; u32 pos;
u16 charCode; u16 charCode;
} __attribute__(( packed )); } ATTRIBUTE_PACKED;
struct Cwdh struct Cwdh
{ {
s8 advanceKerning; s8 advanceKerning;
u8 unk; u8 unk;
s8 advanceGlyphX; s8 advanceGlyphX;
} __attribute__(( packed )); } ATTRIBUTE_PACKED;
// font texture decompress functions // font texture decompress functions
static bool Decompress_0x28( unsigned char *outBuf, u32 outLen, const unsigned char *inBuf, u32 inLen ); static bool Decompress_0x28( unsigned char *outBuf, u32 outLen, const unsigned char *inBuf, u32 inLen );

View File

@ -50,13 +50,13 @@ private:
u8 pad[3]; u8 pad[3];
u32 content_offset; u32 content_offset;
u32 frame_table_offset; u32 frame_table_offset;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct Frame struct Frame
{ {
u16 material_index; u16 material_index;
u8 texture_flip; u8 texture_flip;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
Header *header; Header *header;
std::vector<Frame *> frames; std::vector<Frame *> frames;

View File

@ -53,7 +53,7 @@ typedef struct _uid
{ {
u64 TitleID; u64 TitleID;
u32 unused; u32 unused;
} __attribute__((packed)) uid; } ATTRIBUTE_PACKED uid;
using namespace std; using namespace std;

View File

@ -23,7 +23,7 @@ typedef struct _ios_settings_t
{ {
u8 cios; u8 cios;
bool use_cios; bool use_cios;
} __attribute__((packed)) ios_settings_t; } ATTRIBUTE_PACKED ios_settings_t;
class NandSave class NandSave
{ {

View File

@ -1,5 +1,5 @@
#define APP_NAME "WiiFlow" #define APP_NAME "WiiFlow"
#define APP_VERSION "Beta 4.0.6" #define APP_VERSION "Beta 4.1.1"
#define APPDATA_DIR "wiiflow" #define APPDATA_DIR "wiiflow"
#define APPDATA_DIR2 "apps/wiiflow" #define APPDATA_DIR2 "apps/wiiflow"

View File

@ -57,14 +57,14 @@ typedef struct _PARTITION_RECORD {
u8 chs_end[3]; /* Cylinder-head-sector address to last block of partition */ u8 chs_end[3]; /* Cylinder-head-sector address to last block of partition */
u32 lba_start; /* Local block address to first sector of partition */ u32 lba_start; /* Local block address to first sector of partition */
u32 block_count; /* Number of blocks in partition */ u32 block_count; /* Number of blocks in partition */
} __attribute__((__packed__)) PARTITION_RECORD; } ATTRIBUTE_PACKED PARTITION_RECORD;
typedef struct _MASTER_BOOT_RECORD { typedef struct _MASTER_BOOT_RECORD {
u8 code_area[446]; /* Code area; normally empty */ u8 code_area[446]; /* Code area; normally empty */
PARTITION_RECORD partitions[4]; /* 4 primary partitions */ PARTITION_RECORD partitions[4]; /* 4 primary partitions */
u16 signature; /* MBR signature; 0xAA55 */ u16 signature; /* MBR signature; 0xAA55 */
} __attribute__((__packed__)) MASTER_BOOT_RECORD; } ATTRIBUTE_PACKED MASTER_BOOT_RECORD;
typedef struct _EXTENDED_BOOT_RECORD { typedef struct _EXTENDED_BOOT_RECORD {
u8 code_area[446]; /* Code area; normally empty */ u8 code_area[446]; /* Code area; normally empty */
@ -72,7 +72,7 @@ typedef struct _EXTENDED_BOOT_RECORD {
PARTITION_RECORD next_ebr; /* Next extended boot record in the chain */ PARTITION_RECORD next_ebr; /* Next extended boot record in the chain */
u8 reserved[32]; /* Normally empty */ u8 reserved[32]; /* Normally empty */
u16 signature; /* EBR signature; 0xAA55 */ u16 signature; /* EBR signature; 0xAA55 */
} __attribute__((__packed__)) EXTENDED_BOOT_RECORD; } ATTRIBUTE_PACKED EXTENDED_BOOT_RECORD;
typedef struct _GUID_PART_ENTRY typedef struct _GUID_PART_ENTRY
{ {
@ -82,7 +82,7 @@ typedef struct _GUID_PART_ENTRY
u64 part_last_lba; /* Last LBA (inclusive, usually odd) */ u64 part_last_lba; /* Last LBA (inclusive, usually odd) */
u64 attribute_flags; /* GUID Attribute flags (e.g. bit 60 denotes read-only) */ u64 attribute_flags; /* GUID Attribute flags (e.g. bit 60 denotes read-only) */
char partition_name[72]; /* Partition name (36 UTF-16LE code units) */ char partition_name[72]; /* Partition name (36 UTF-16LE code units) */
} __attribute__((__packed__)) GUID_PART_ENTRY; } ATTRIBUTE_PACKED GUID_PART_ENTRY;
typedef struct _GPT_HEADER typedef struct _GPT_HEADER
{ {
@ -101,7 +101,7 @@ typedef struct _GPT_HEADER
u32 part_entry_size; /* Size of a partition entry (usually 128) */ u32 part_entry_size; /* Size of a partition entry (usually 128) */
u32 part_entry_checksum; /* CRC32 of partition array */ u32 part_entry_checksum; /* CRC32 of partition array */
u8 zeros[420]; u8 zeros[420];
} __attribute__((__packed__)) GPT_HEADER; } ATTRIBUTE_PACKED GPT_HEADER;
typedef struct _PartitionFS { typedef struct _PartitionFS {
const char *FSName; const char *FSName;
@ -111,7 +111,7 @@ typedef struct _PartitionFS {
u8 PartitionType; u8 PartitionType;
u8 PartitionNum; u8 PartitionNum;
wbfs_t *wbfshandle; wbfs_t *wbfshandle;
} __attribute__((__packed__)) PartitionFS; } ATTRIBUTE_PACKED PartitionFS;
class PartitionHandle class PartitionHandle

View File

@ -26,6 +26,7 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include <gccore.h>
using namespace std; using namespace std;
@ -39,16 +40,16 @@ enum
typedef struct _Accessory typedef struct _Accessory
{ {
string Name; string Name;
bool Required; bool Required;
} Accessory; } Accessory;
typedef struct _GameOffsets typedef struct _GameOffsets
{ {
char gameID[7]; char gameID[7];
unsigned int gamenode; unsigned int gamenode;
unsigned int nodesize; unsigned int nodesize;
} __attribute__((__packed__)) GameOffsets; } ATTRIBUTE_PACKED GameOffsets;
class GameTDB class GameTDB
{ {

View File

@ -21,7 +21,7 @@ struct TexData
u8 format; u8 format;
u8 maxLOD; u8 maxLOD;
bool thread; bool thread;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
class STexture class STexture
{ {

View File

@ -27,7 +27,7 @@ typedef struct wbfs_head
u8 wbfs_sec_sz_s; // size of a wbfs sec u8 wbfs_sec_sz_s; // size of a wbfs sec
u8 padding3[2]; u8 padding3[2];
u8 disc_table[0]; // size depends on hd sector size u8 disc_table[0]; // size depends on hd sector size
}__attribute((packed)) wbfs_head_t ; } ATTRIBUTE_PACKED wbfs_head_t;
typedef struct wbfs_disc_info typedef struct wbfs_disc_info
{ {

View File

@ -35,7 +35,7 @@ typedef union
u32 _checksum; u32 _checksum;
u32 data[0x1f]; u32 data[0x1f];
}; };
} __attribute__((packed)) playtime_t; } ATTRIBUTE_PACKED playtime_t;
playtime_t playrec_buf; playtime_t playrec_buf;

View File

@ -2240,10 +2240,7 @@ bool CMenu::_loadChannelList(void)
emuPartition = _FindEmuPart(emuPath, true); emuPartition = _FindEmuPart(emuPath, true);
if(emuPartition < 0) if(emuPartition < 0)
return false; return false;
currentPartition = emuPartition; currentPartition = emuPartition;
NandHandle.SetNANDEmu(currentPartition); /* Init NAND Emu */
NandHandle.SetPaths(emuPath.c_str(), DeviceName[currentPartition]);
NandHandle.PreNandCfg(m_cfg.getBool(CHANNEL_DOMAIN, "real_nand_miis", false), NandHandle.PreNandCfg(m_cfg.getBool(CHANNEL_DOMAIN, "real_nand_miis", false),
m_cfg.getBool(CHANNEL_DOMAIN, "real_nand_config", false)); m_cfg.getBool(CHANNEL_DOMAIN, "real_nand_config", false));
cacheDir = fmt("%s/%s_channels.db", m_listCacheDir.c_str(), DeviceName[currentPartition]); cacheDir = fmt("%s/%s_channels.db", m_listCacheDir.c_str(), DeviceName[currentPartition]);
@ -2488,7 +2485,7 @@ typedef struct map_entry
{ {
char filename[8]; char filename[8];
u8 sha1[20]; u8 sha1[20];
} __attribute((packed)) map_entry_t; } ATTRIBUTE_PACKED map_entry_t;
void CMenu::loadDefaultFont(void) void CMenu::loadDefaultFont(void)
{ {

View File

@ -1223,8 +1223,8 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u)-1; int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u)-1;
string emuPath; string emuPath;
int emuPartition = _FindEmuPart(emuPath, false); int emuPartition = 0;
u8 emulate_mode = min((u32)m_gcfg2.getInt(id, "emulate_save", 0), ARRAY_SIZE(CMenu::_SaveEmu) - 1u); u8 emulate_mode = min((u32)m_gcfg2.getInt(id, "emulate_save", 0), ARRAY_SIZE(CMenu::_SaveEmu) - 1u);
if(emulate_mode == 0) if(emulate_mode == 0)
@ -1235,8 +1235,9 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
} }
else if(emulate_mode == 1) else if(emulate_mode == 1)
emulate_mode = 0; emulate_mode = 0;
if(!dvd && emulate_mode) if(emulate_mode && !dvd && !neek2o() && CurrentIOS.Type == IOS_TYPE_D2X)
{ {
emuPartition = _FindEmuPart(emuPath, false);
if(emuPartition < 0) if(emuPartition < 0)
{ {
if(emulate_mode == 4) if(emulate_mode == 4)
@ -1261,11 +1262,8 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
NandHandle.CreatePath("%s:/wiiflow/nandemu", DeviceName[emuPartition]); NandHandle.CreatePath("%s:/wiiflow/nandemu", DeviceName[emuPartition]);
} }
} }
/* Init NAND Emu Settings */
NANDemuView = true;
NandHandle.SetNANDEmu(emuPartition);
NandHandle.SetPaths(emuPath.c_str(), DeviceName[emuPartition]);
/* Set them */ /* Set them */
NANDemuView = true;
m_cfg.setInt(WII_DOMAIN, "savepartition", emuPartition); m_cfg.setInt(WII_DOMAIN, "savepartition", emuPartition);
m_cfg.setString(WII_DOMAIN, "savepath", emuPath); m_cfg.setString(WII_DOMAIN, "savepath", emuPath);
if(emulate_mode == 2 || emulate_mode > 3) if(emulate_mode == 2 || emulate_mode > 3)
@ -1285,6 +1283,9 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
NandHandle.Do_Region_Change(id); NandHandle.Do_Region_Change(id);
} }
} }
else
emulate_mode = 0;
bool cheat = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool(WII_DOMAIN, "cheat", false)); bool cheat = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool(WII_DOMAIN, "cheat", false));
debuggerselect = m_gcfg2.getBool(id, "debugger", false) ? 1 : 0; // debuggerselect is defined in fst.h debuggerselect = m_gcfg2.getBool(id, "debugger", false) ? 1 : 0; // debuggerselect is defined in fst.h
if(id == "RPWE41" || id == "RPWZ41" || id == "SPXP41") // Prince of Persia, Rival Swords if(id == "RPWE41" || id == "RPWZ41" || id == "SPXP41") // Prince of Persia, Rival Swords
@ -1332,7 +1333,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
if(D2X_PatchReturnTo(returnTo) >= 0) if(D2X_PatchReturnTo(returnTo) >= 0)
memset(&returnTo, 0, sizeof(u32)); memset(&returnTo, 0, sizeof(u32));
} }
if(emulate_mode && !neek2o() && CurrentIOS.Type == IOS_TYPE_D2X) if(emulate_mode)
{ {
/* Enable our Emu NAND */ /* Enable our Emu NAND */
DeviceHandle.UnMountAll(); DeviceHandle.UnMountAll();
@ -1459,7 +1460,7 @@ struct IMD5Header
u32 filesize; u32 filesize;
u8 zeroes[8]; u8 zeroes[8];
u8 crypto[16]; u8 crypto[16];
} __attribute__((packed)); } ATTRIBUTE_PACKED;
void CMenu::_gameSoundThread(CMenu *m) void CMenu::_gameSoundThread(CMenu *m)
{ {

View File

@ -785,8 +785,9 @@ int CMenu::main(void)
else if(Sys_GetExitTo() == EXIT_TO_SMNK2O || Sys_GetExitTo() == EXIT_TO_WFNK2O) else if(Sys_GetExitTo() == EXIT_TO_SMNK2O || Sys_GetExitTo() == EXIT_TO_WFNK2O)
{ {
string emuPath; string emuPath;
m_current_view = COVERFLOW_CHANNEL; /* So we get the NAND path */
_FindEmuPart(emuPath, false); _FindEmuPart(emuPath, false);
Sys_SetNeekPath(emuPath.size() > 1 ? emuPath.c_str() : NULL); Sys_SetNeekPath(NandHandle.Get_NandPath());
} }
//gprintf("Saving configuration files\n"); //gprintf("Saving configuration files\n");
m_cfg.save(); m_cfg.save();

View File

@ -116,6 +116,8 @@ int CMenu::_FindEmuPart(string &emuPath, bool skipchecks)
return -1; return -1;
else if((skipchecks || _TestEmuNand(emuPart, tmpPath, true))) else if((skipchecks || _TestEmuNand(emuPart, tmpPath, true)))
{ {
NandHandle.SetNANDEmu(emuPart);
NandHandle.SetPaths(tmpPath, DeviceName[emuPart]);
emuPath = tmpPath; emuPath = tmpPath;
return emuPart; return emuPart;
} }

View File

@ -27,6 +27,7 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include <unistd.h> #include <unistd.h>
#include <gccore.h>
#include "BNSDecoder.hpp" #include "BNSDecoder.hpp"
#include "memory/mem2.hpp" #include "memory/mem2.hpp"
@ -150,7 +151,7 @@ struct BNSHeader
u32 infoSize; u32 infoSize;
u32 dataOffset; u32 dataOffset;
u32 dataSize; u32 dataSize;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct BNSInfo struct BNSInfo
{ {
@ -188,20 +189,20 @@ struct BNSInfo
u16 chan2LoopPredictiveScale; u16 chan2LoopPredictiveScale;
s16 chan2LoopPrevSamples[2]; s16 chan2LoopPrevSamples[2];
u16 chan2LoopPadding; u16 chan2LoopPadding;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct BNSData struct BNSData
{ {
u32 fccDATA; u32 fccDATA;
u32 size; u32 size;
u8 data; u8 data;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct ADPCMByte struct ADPCMByte
{ {
s8 sample1 : 4; s8 sample1 : 4;
s8 sample2 : 4; s8 sample2 : 4;
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct BNSADPCMBlock struct BNSADPCMBlock
{ {
@ -209,7 +210,7 @@ struct BNSADPCMBlock
u8 coeffIndex : 3; u8 coeffIndex : 3;
u8 lshift : 4; u8 lshift : 4;
ADPCMByte samples[7]; ADPCMByte samples[7];
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct BNSDecObj struct BNSDecObj
{ {

View File

@ -24,7 +24,7 @@
* for WiiXplorer 2010 * for WiiXplorer 2010
***************************************************************************/ ***************************************************************************/
#include <unistd.h> #include <unistd.h>
#include <gccore.h>
#include "SoundHandler.hpp" #include "SoundHandler.hpp"
#include "Mp3Decoder.hpp" #include "Mp3Decoder.hpp"
#include "OggDecoder.hpp" #include "OggDecoder.hpp"

View File

@ -38,7 +38,7 @@ struct U8Header
u32 headerSize; u32 headerSize;
u32 dataOffset; u32 dataOffset;
u8 zeroes[16]; u8 zeroes[16];
} __attribute__((packed)); } ATTRIBUTE_PACKED;
struct U8Entry struct U8Entry
{ {
@ -53,7 +53,7 @@ struct U8Entry
u32 fileLength; u32 fileLength;
u32 numEntries; u32 numEntries;
}; };
} __attribute__((packed)); } ATTRIBUTE_PACKED;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app version="4.0.3"> <app version="4.1">
<name> WiiFlow</name> <name> WiiFlow</name>
<coder>OverjoY, FIX94</coder> <coder>OverjoY, FIX94</coder>
<version>r433</version> <version>4.1</version>
<release_date>TBD</release_date> <release_date>TBD</release_date>
<short_description>USB Loader / Nand Emulator</short_description> <short_description>USB Loader / Nand Emulator</short_description>
<long_description> <long_description>