mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
* 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:
parent
644e96b2d9
commit
4991bb2552
@ -2,8 +2,8 @@
|
||||
<app version="1">
|
||||
<name> USB Loader GX</name>
|
||||
<coder>USB Loader GX Team</coder>
|
||||
<version>3.0 r1241</version>
|
||||
<release_date>20150214152922</release_date>
|
||||
<version>3.0 r1243</version>
|
||||
<release_date>20150308164242</release_date>
|
||||
<!-- // remove this line to enable arguments
|
||||
<arguments>
|
||||
<arg>--ios=250</arg>
|
||||
|
@ -602,7 +602,7 @@ class GuiImage: public GuiElement
|
||||
f32 imageangle; //!< Angle to draw the image
|
||||
int tileHorizontal; //!< Number of times to draw (tile) the image horizontally
|
||||
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
|
||||
bool parentangle;
|
||||
};
|
||||
|
@ -44,6 +44,6 @@ typedef struct _DEVO_CFG
|
||||
u32 disc1_cluster;
|
||||
u32 disc2_cluster;
|
||||
u32 options; // added in Devo config version 0x0110
|
||||
} DEVO_CGF;
|
||||
} DEVO_CFG;
|
||||
|
||||
#endif
|
||||
|
@ -113,8 +113,7 @@ bool ZipFile::ExtractAll(const char *dest)
|
||||
bool Stop = false;
|
||||
|
||||
u32 blocksize = 1024 * 50;
|
||||
u8 *buffer = new u8[blocksize];
|
||||
|
||||
u8 *buffer = new (std::nothrow) u8[blocksize];
|
||||
if (!buffer) return false;
|
||||
|
||||
char writepath[MAXPATHLEN];
|
||||
|
@ -55,7 +55,7 @@ typedef struct
|
||||
( ( ( _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_S16(x) ((s16)((x) > 32767.0f ? 32767.0f : ((x) < -32768.0f ? 32768.0f : (x) + 0.5f)))
|
||||
|
||||
|
@ -132,10 +132,17 @@ void Textbox::SetupGX(const BannerResources& resources) const
|
||||
|
||||
for( int i = 0; i < 2; i++ )
|
||||
{
|
||||
GX_SetTevColor(i + 1, (GXColor){ LIMIT(matHead->color_regs[i].r, 0, 0xFF),
|
||||
LIMIT(matHead->color_regs[i].g, 0, 0xFF),
|
||||
LIMIT(matHead->color_regs[i].b, 0, 0xFF),
|
||||
LIMIT(matHead->color_regs[i].a, 0, 0xFF) });
|
||||
// Devkitppc_r27 internal compiler error
|
||||
//GX_SetTevColor(i + 1, (GXColor){ LIMIT(matHead->color_regs[i].r, 0, 0xFF),
|
||||
// LIMIT(matHead->color_regs[i].g, 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);
|
||||
|
@ -144,7 +144,8 @@ int GCTCheats::openTxtfile(const char * filename)
|
||||
}
|
||||
|
||||
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);
|
||||
RemoveLineEnds(line);
|
||||
|
@ -91,7 +91,8 @@ int HomebrewXML::LoadHomebrewXMLData(const char* filename)
|
||||
int HomebrewXML::SaveHomebrewXMLData(const char* filename)
|
||||
{
|
||||
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");
|
||||
if(!fp)
|
||||
|
Binary file not shown.
@ -92,7 +92,7 @@ void HaltGui()
|
||||
***************************************************************************/
|
||||
static void * UpdateGUI(void *arg)
|
||||
{
|
||||
int i;
|
||||
u8 i;
|
||||
|
||||
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
|
||||
// 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]);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
|
@ -343,7 +343,7 @@ GameBrowseMenu::GameBrowseMenu()
|
||||
|
||||
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;
|
||||
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->SetPosition(thInt("275 - clock pos x"), thInt("335 - clock pos y"));
|
||||
clockTimeBack->SetFont(Resources::GetFile("clock.ttf"), Resources::GetFileSize("clock.ttf"));
|
||||
|
@ -104,8 +104,8 @@ class CSettings
|
||||
short gamesoundvolume;
|
||||
short tooltips;
|
||||
short parentalcontrol;
|
||||
short LoaderIOS;
|
||||
short cios;
|
||||
u8 LoaderIOS;
|
||||
u8 cios;
|
||||
short quickboot;
|
||||
short wsprompt;
|
||||
short keyset;
|
||||
|
@ -433,7 +433,7 @@ int FeatureSettingsMenu::GetMenuInternal()
|
||||
return MENU_NONE;
|
||||
}
|
||||
|
||||
snprintf(nandPath, sizeof(nandPath), "/");
|
||||
strcpy(nandPath, "/");
|
||||
|
||||
if(choice == 2)
|
||||
{
|
||||
|
@ -83,7 +83,7 @@ s32 IosLoader::LoadAppCios()
|
||||
if((int) activeCios == Settings.LoaderIOS)
|
||||
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)
|
||||
|
@ -780,7 +780,7 @@ int GameBooter::BootDevolution(struct discHdr *gameHdr)
|
||||
|
||||
|
||||
// Devolution config
|
||||
DEVO_CGF *devo_config = (DEVO_CGF*)0x80000020;
|
||||
DEVO_CFG *devo_config = (DEVO_CFG*)0x80000020;
|
||||
|
||||
char disc1[100];
|
||||
char disc2[100];
|
||||
|
Loading…
Reference in New Issue
Block a user