* Updated Libfat to 1.0.13

* Fixed compiling with DevkitPPC r27 (1 warning left)
* Added throw exception to some buffers
* Fixed DEVO config name
This commit is contained in:
Cyan 2015-03-08 16:49:07 +00:00
parent 644e96b2d9
commit 4991bb2552
15 changed files with 30 additions and 21 deletions

View File

@ -2,8 +2,8 @@
<app version="1"> <app version="1">
<name> USB Loader GX</name> <name> USB Loader GX</name>
<coder>USB Loader GX Team</coder> <coder>USB Loader GX Team</coder>
<version>3.0 r1241</version> <version>3.0 r1243</version>
<release_date>20150214152922</release_date> <release_date>20150308164242</release_date>
<!-- // remove this line to enable arguments <!-- // remove this line to enable arguments
<arguments> <arguments>
<arg>--ios=250</arg> <arg>--ios=250</arg>

View File

@ -602,7 +602,7 @@ class GuiImage: public GuiElement
f32 imageangle; //!< Angle to draw the image f32 imageangle; //!< Angle to draw the image
int tileHorizontal; //!< Number of times to draw (tile) the image horizontally int tileHorizontal; //!< Number of times to draw (tile) the image horizontally
int tileVertical; //!< Number of times to draw (tile) the image vertically int tileVertical; //!< Number of times to draw (tile) the image vertically
int stripe; //!< Alpha value (0-255) to apply a stripe effect to the texture u8 stripe; //!< Alpha value (0-255) to apply a stripe effect to the texture
short widescreen; //added short widescreen; //added
bool parentangle; bool parentangle;
}; };

View File

@ -44,6 +44,6 @@ typedef struct _DEVO_CFG
u32 disc1_cluster; u32 disc1_cluster;
u32 disc2_cluster; u32 disc2_cluster;
u32 options; // added in Devo config version 0x0110 u32 options; // added in Devo config version 0x0110
} DEVO_CGF; } DEVO_CFG;
#endif #endif

View File

@ -113,8 +113,7 @@ bool ZipFile::ExtractAll(const char *dest)
bool Stop = false; bool Stop = false;
u32 blocksize = 1024 * 50; u32 blocksize = 1024 * 50;
u8 *buffer = new u8[blocksize]; u8 *buffer = new (std::nothrow) u8[blocksize];
if (!buffer) return false; if (!buffer) return false;
char writepath[MAXPATHLEN]; char writepath[MAXPATHLEN];

View File

@ -55,7 +55,7 @@ typedef struct
( ( ( _x ) < ( _min ) ) ? ( _min ) : ( ( _x ) > ( _max ) ) ? ( _max) : ( _x ) ); \ ( ( ( _x ) < ( _min ) ) ? ( _min ) : ( ( _x ) > ( _max ) ) ? ( _max) : ( _x ) ); \
}) })
#define MultiplyAlpha(a1, a2) ((u16) (a1) * (u16) (a2) / 0xFF) #define MultiplyAlpha(a1, a2) (u8)((u16) (a1) * (u16) (a2) / 0xFF)
#define FLOAT_2_U8(x) ((u8)((x) > 255.0f ? 255.0f : ((x) < 0.0f ? 0.0f : (x) + 0.5f))) #define FLOAT_2_U8(x) ((u8)((x) > 255.0f ? 255.0f : ((x) < 0.0f ? 0.0f : (x) + 0.5f)))
#define FLOAT_2_S16(x) ((s16)((x) > 32767.0f ? 32767.0f : ((x) < -32768.0f ? 32768.0f : (x) + 0.5f))) #define FLOAT_2_S16(x) ((s16)((x) > 32767.0f ? 32767.0f : ((x) < -32768.0f ? 32768.0f : (x) + 0.5f)))

View File

@ -132,10 +132,17 @@ void Textbox::SetupGX(const BannerResources& resources) const
for( int i = 0; i < 2; i++ ) for( int i = 0; i < 2; i++ )
{ {
GX_SetTevColor(i + 1, (GXColor){ LIMIT(matHead->color_regs[i].r, 0, 0xFF), // Devkitppc_r27 internal compiler error
LIMIT(matHead->color_regs[i].g, 0, 0xFF), //GX_SetTevColor(i + 1, (GXColor){ LIMIT(matHead->color_regs[i].r, 0, 0xFF),
LIMIT(matHead->color_regs[i].b, 0, 0xFF), // LIMIT(matHead->color_regs[i].g, 0, 0xFF),
LIMIT(matHead->color_regs[i].a, 0, 0xFF) }); // LIMIT(matHead->color_regs[i].b, 0, 0xFF),
// LIMIT(matHead->color_regs[i].a, 0, 0xFF) });
u8 r = (u8) LIMIT(matHead->color_regs[i].r, 0, 0xFF);
u8 g = (u8) LIMIT(matHead->color_regs[i].g, 0, 0xFF);
u8 b = (u8) LIMIT(matHead->color_regs[i].b, 0, 0xFF);
u8 a = (u8) LIMIT(matHead->color_regs[i].a, 0, 0xFF);
GX_SetTevColor((u8) (i + 1), (GXColor){r,g,b,a});
} }
GX_SetTevColorIn(0, 2, 4, 8, 0xf); GX_SetTevColorIn(0, 2, 4, 8, 0xf);

View File

@ -144,7 +144,8 @@ int GCTCheats::openTxtfile(const char * filename)
} }
const int max_line_size = 4096; const int max_line_size = 4096;
char *line = new char[max_line_size]; char *line = new (std::nothrow) char[max_line_size];
if(!line) return -1;
fgets(line, max_line_size, pFile); fgets(line, max_line_size, pFile);
RemoveLineEnds(line); RemoveLineEnds(line);

View File

@ -91,7 +91,8 @@ int HomebrewXML::LoadHomebrewXMLData(const char* filename)
int HomebrewXML::SaveHomebrewXMLData(const char* filename) int HomebrewXML::SaveHomebrewXMLData(const char* filename)
{ {
const int max_line_size = 4096; const int max_line_size = 4096;
char *line = new char[max_line_size]; char *line = new (std::nothrow) char[max_line_size];
if(!line) return 0;
FILE *fp = fopen(filename, "wb"); FILE *fp = fopen(filename, "wb");
if(!fp) if(!fp)

Binary file not shown.

View File

@ -92,7 +92,7 @@ void HaltGui()
***************************************************************************/ ***************************************************************************/
static void * UpdateGUI(void *arg) static void * UpdateGUI(void *arg)
{ {
int i; u8 i;
while (!ExitRequested) while (!ExitRequested)
{ {
@ -110,7 +110,8 @@ static void * UpdateGUI(void *arg)
// Pointer modifies wpad data struct for easy implementation of "virtual pointer" with PAD-Sticks // Pointer modifies wpad data struct for easy implementation of "virtual pointer" with PAD-Sticks
// That is why it has to be called right before updating other gui elements with the triggers // That is why it has to be called right before updating other gui elements with the triggers
for (i = 3; i >= 0; i--) i = 4;
while(i--)
pointer[i]->Draw(&userInput[i]); pointer[i]->Draw(&userInput[i]);
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)

View File

@ -343,7 +343,7 @@ GameBrowseMenu::GameBrowseMenu()
GXColor clockColor = thColor("r=138 g=138 b=138 a=240 - clock color"); GXColor clockColor = thColor("r=138 g=138 b=138 a=240 - clock color");
float clockFontScaleFactor = thFloat("1.0 - Overrided clock scale factor. 1.0=allow user setting") != 1.0f ? thFloat("1.0 - Overrided clock scale factor. 1.0=allow user setting") : Settings.ClockFontScaleFactor; float clockFontScaleFactor = thFloat("1.0 - Overrided clock scale factor. 1.0=allow user setting") != 1.0f ? thFloat("1.0 - Overrided clock scale factor. 1.0=allow user setting") : Settings.ClockFontScaleFactor;
clockTimeBack = new GuiText("88:88", 40 / Settings.FontScaleFactor * clockFontScaleFactor, (GXColor) {clockColor.r, clockColor.g, clockColor.b, clockColor.a / 6}); clockTimeBack = new GuiText("88:88", 40 / Settings.FontScaleFactor * clockFontScaleFactor, (GXColor) {clockColor.r, clockColor.g, clockColor.b, (u8)(clockColor.a / 6)});
clockTimeBack->SetAlignment(thAlign("left - clock align hor"), thAlign("top - clock align ver")); clockTimeBack->SetAlignment(thAlign("left - clock align hor"), thAlign("top - clock align ver"));
clockTimeBack->SetPosition(thInt("275 - clock pos x"), thInt("335 - clock pos y")); clockTimeBack->SetPosition(thInt("275 - clock pos x"), thInt("335 - clock pos y"));
clockTimeBack->SetFont(Resources::GetFile("clock.ttf"), Resources::GetFileSize("clock.ttf")); clockTimeBack->SetFont(Resources::GetFile("clock.ttf"), Resources::GetFileSize("clock.ttf"));

View File

@ -104,8 +104,8 @@ class CSettings
short gamesoundvolume; short gamesoundvolume;
short tooltips; short tooltips;
short parentalcontrol; short parentalcontrol;
short LoaderIOS; u8 LoaderIOS;
short cios; u8 cios;
short quickboot; short quickboot;
short wsprompt; short wsprompt;
short keyset; short keyset;

View File

@ -433,7 +433,7 @@ int FeatureSettingsMenu::GetMenuInternal()
return MENU_NONE; return MENU_NONE;
} }
snprintf(nandPath, sizeof(nandPath), "/"); strcpy(nandPath, "/");
if(choice == 2) if(choice == 2)
{ {

View File

@ -83,7 +83,7 @@ s32 IosLoader::LoadAppCios()
if((int) activeCios == Settings.LoaderIOS) if((int) activeCios == Settings.LoaderIOS)
return 0; return 0;
u32 ciosLoadPriority[] = { Settings.LoaderIOS, 249, 250, 222, 223, 245, 246, 247, 248 }; // Ascending. u8 ciosLoadPriority[] = { Settings.LoaderIOS, 249, 250, 222, 223, 245, 246, 247, 248 }; // Ascending.
for (u32 i = 0; i < (sizeof(ciosLoadPriority)/sizeof(ciosLoadPriority[0])); ++i) for (u32 i = 0; i < (sizeof(ciosLoadPriority)/sizeof(ciosLoadPriority[0])); ++i)

View File

@ -780,7 +780,7 @@ int GameBooter::BootDevolution(struct discHdr *gameHdr)
// Devolution config // Devolution config
DEVO_CGF *devo_config = (DEVO_CGF*)0x80000020; DEVO_CFG *devo_config = (DEVO_CFG*)0x80000020;
char disc1[100]; char disc1[100];
char disc2[100]; char disc2[100];