*Fixed show free space option (wasn't able to deactivate before)

*Fixed cheat menu to not go over the board of cheat amount.
*Added possibility to make screenshots everywhere in running gui mode (hold Nunchuck Z and press C)
*Fixed bug with nunchuck Z button moving one option up in gamelist/options
*Added Cyan to the credits
This commit is contained in:
dimok321 2010-12-31 16:18:48 +00:00
parent 6022ad060d
commit aa7df2788d
13 changed files with 124 additions and 256 deletions

View File

@ -2,8 +2,8 @@
<app version="1">
<name> USB Loader GX</name>
<coder>USB Loader GX Team</coder>
<version>1.0 r1025</version>
<release_date>201012302350</release_date>
<version>1.0 r1026</version>
<release_date>201012311314</release_date>
<no_ios_reload/>
<short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.

File diff suppressed because one or more lines are too long

View File

@ -85,7 +85,7 @@ int CheatMenu(const char * gameID)
titleTxt.SetMaxWidth(350, SCROLL_HORIZONTAL);
titleTxt.SetPosition(12, 40);
for (int i = 0; i <= cntcheats; i++)
for (int i = 0; i < cntcheats; i++)
{
cheatslst.SetValue(i, "%s", c.getCheatName(i).c_str());
cheatslst.SetName(i, "OFF");
@ -128,7 +128,7 @@ int CheatMenu(const char * gameID)
{
int selectednrs[30];
int x = 0;
for (int i = 0; i <= cntcheats; i++)
for (int i = 0; i < cntcheats; i++)
{
const char *strCheck = cheatslst.GetName(i);
if (strncmp(strCheck, "ON", 2) == 0)

View File

@ -19,6 +19,7 @@
#include "video.h"
#include "input.h"
#include "libwiigui/gui.h"
#include "sys.h"
int rumbleRequest[4] = { 0, 0, 0, 0 };
GuiTrigger userInput[4];
@ -49,6 +50,12 @@ void UpdatePads()
userInput[i].pad.triggerR = PAD_TriggerR(i);
if (Settings.rumble == ON) DoRumble(i);
if(userInput[i].wpad.exp.type == WPAD_EXP_NUNCHUK)
{
if(userInput[i].wpad.btns_h & WPAD_NUNCHUK_BUTTON_Z && userInput[i].wpad.btns_d & WPAD_NUNCHUK_BUTTON_C)
ScreenShot();
}
}
}

View File

@ -141,11 +141,13 @@ s8 GuiTrigger::WPAD_Stick(u8 right, int axis)
bool GuiTrigger::Left()
{
u32 wiibtn = WPAD_BUTTON_LEFT;
if(wpad.exp.type == WPAD_EXP_CLASSIC)
wiibtn = WPAD_CLASSIC_BUTTON_LEFT;
if ((wpad.btns_d | wpad.btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_LEFT) || (pad.btns_d | pad.btns_h)
if ((wpad.btns_d | wpad.btns_h) & wiibtn || (pad.btns_d | pad.btns_h)
& PAD_BUTTON_LEFT || pad.stickX < -PADCAL || WPAD_Stick(0, 0) < -PADCAL)
{
if (wpad.btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_LEFT) || pad.btns_d & PAD_BUTTON_LEFT)
if (wpad.btns_d & wiibtn || pad.btns_d & PAD_BUTTON_LEFT)
{
scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay.
return true;
@ -166,11 +168,13 @@ bool GuiTrigger::Left()
bool GuiTrigger::Right()
{
u32 wiibtn = WPAD_BUTTON_RIGHT;
if(wpad.exp.type == WPAD_EXP_CLASSIC)
wiibtn = WPAD_CLASSIC_BUTTON_RIGHT;
if ((wpad.btns_d | wpad.btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_RIGHT) || (pad.btns_d | pad.btns_h)
if ((wpad.btns_d | wpad.btns_h) & wiibtn || (pad.btns_d | pad.btns_h)
& PAD_BUTTON_RIGHT || pad.stickX > PADCAL || WPAD_Stick(0, 0) > PADCAL)
{
if (wpad.btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_RIGHT) || pad.btns_d & PAD_BUTTON_RIGHT)
if (wpad.btns_d & wiibtn || pad.btns_d & PAD_BUTTON_RIGHT)
{
scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay.
return true;
@ -191,11 +195,13 @@ bool GuiTrigger::Right()
bool GuiTrigger::Up()
{
u32 wiibtn = WPAD_BUTTON_UP;
if(wpad.exp.type == WPAD_EXP_CLASSIC)
wiibtn = WPAD_CLASSIC_BUTTON_UP;
if ((wpad.btns_d | wpad.btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_UP) || (pad.btns_d | pad.btns_h) & PAD_BUTTON_UP
if ((wpad.btns_d | wpad.btns_h) & wiibtn || (pad.btns_d | pad.btns_h) & PAD_BUTTON_UP
|| pad.stickY > PADCAL || WPAD_Stick(0, 1) > PADCAL)
{
if (wpad.btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_UP) || pad.btns_d & PAD_BUTTON_UP)
if (wpad.btns_d & wiibtn || pad.btns_d & PAD_BUTTON_UP)
{
scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay.
return true;
@ -216,11 +222,13 @@ bool GuiTrigger::Up()
bool GuiTrigger::Down()
{
u32 wiibtn = WPAD_BUTTON_DOWN;
if(wpad.exp.type == WPAD_EXP_CLASSIC)
wiibtn = WPAD_CLASSIC_BUTTON_DOWN;
if ((wpad.btns_d | wpad.btns_h) & (wiibtn | WPAD_CLASSIC_BUTTON_DOWN) || (pad.btns_d | pad.btns_h)
if ((wpad.btns_d | wpad.btns_h) & wiibtn || (pad.btns_d | pad.btns_h)
& PAD_BUTTON_DOWN || pad.stickY < -PADCAL || WPAD_Stick(0, 1) < -PADCAL)
{
if (wpad.btns_d & (wiibtn | WPAD_CLASSIC_BUTTON_DOWN) || pad.btns_d & PAD_BUTTON_DOWN)
if (wpad.btns_d & wiibtn || pad.btns_d & PAD_BUTTON_DOWN)
{
scrollDelay = SCROLL_INITIAL_DELAY; // reset scroll delay.
return true;

View File

@ -107,9 +107,13 @@ GameBrowseMenu::GameBrowseMenu()
usedSpaceTxt = new GuiText(" ", 18, thColor("r=55 g=190 b=237 a=255 - hdd info color"));
usedSpaceTxt->SetAlignment(thAlign("center - hdd info align ver"), thAlign("top - hdd info align hor"));
usedSpaceTxt->SetPosition(thInt("0 - hdd info pos x"), thInt("400 - hdd info pos y"));
if(Settings.ShowFreeSpace)
{
HDDSizeCallback.SetCallback(this, &GameBrowseMenu::UpdateFreeSpace);
ThreadedTask::Instance()->AddCallback(&HDDSizeCallback);
ThreadedTask::Instance()->Execute();
}
gamecntTxt = new GuiText((char *) NULL, 18, thColor("r=55 g=190 b=237 a=255 - game count color"));
gamecntBtn = new GuiButton(100, 18);

View File

@ -1,147 +0,0 @@
#include <gccore.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "gecko.h"
#include "settings/cfg.h"
#include "wip.h"
static WIP_Code * CodeList = NULL;
static u32 CodesCount = 0;
static u32 ProcessedLength = 0;
static u32 Counter = 0;
void do_wip_code(u8 * dst, u32 len)
{
if (!CodeList) return;
if (Counter < 3)
{
Counter++;
return;
}
int i = 0;
int n = 0;
int offset = 0;
for (i = 0; i < CodesCount; i++)
{
for (n = 0; n < 4; n++)
{
offset = CodeList[i].offset + n - ProcessedLength;
if (offset < 0 || offset >= len) continue;
if (dst[offset] == ((u8 *) &CodeList[i].srcaddress)[n])
{
dst[offset] = ((u8 *) &CodeList[i].dstaddress)[n];
gprintf("WIP: %08X Address Patched.\n", CodeList[i].offset + n);
}
else
{
gprintf("WIP: %08X Address does not match with WIP entrie.\n", CodeList[i].offset + n);
gprintf("Destination: %02X | Should be: %02X.\n", dst[offset], ((u8 *) &CodeList[i].srcaddress)[n]);
}
}
}
ProcessedLength += len;
Counter++;
}
//! for internal patches only
//! .wip files override internal patches
//! the codelist has to be freed if the set fails
//! if set was successful the codelist will be freed when it's done
bool set_wip_list(WIP_Code * list, int size)
{
if (!CodeList && size > 0)
{
CodeList = list;
CodesCount = size;
return true;
}
return false;
}
void wip_reset_counter()
{
ProcessedLength = 0;
//alternative dols don't need a skip. only main.dol.
Counter = 3;
}
void free_wip()
{
if (CodeList) free(CodeList);
CodeList = NULL;
CodesCount = 0;
Counter = 0;
ProcessedLength = 0;
}
int load_wip_code(u8 *gameid)
{
char filepath[150];
char GameID[8];
memset(GameID, 0, sizeof(GameID));
memcpy(GameID, gameid, 6);
snprintf(filepath, sizeof(filepath), "%s%s.wip", Settings.WipCodepath, GameID);
FILE * fp = fopen(filepath, "rb");
if (!fp)
{
memset(GameID, 0, sizeof(GameID));
memcpy(GameID, gameid, 4);
snprintf(filepath, sizeof(filepath), "%s%s.wip", Settings.WipCodepath, GameID);
fp = fopen(filepath, "rb");
}
if (!fp)
{
memset(GameID, 0, sizeof(GameID));
memcpy(GameID, gameid, 3);
snprintf(filepath, sizeof(filepath), "%s%s.wip", Settings.WipCodepath, GameID);
fp = fopen(filepath, "rb");
}
if (!fp) return -1;
char line[255];
gprintf("\nLoading WIP code from %s.\n", filepath);
while (fgets(line, sizeof(line), fp))
{
if (line[0] == '#') continue;
if (line[0] == ';') continue;
if (line[0] == ':') continue;
if (strlen(line) < 26) continue;
u32 offset = (u32) strtoul(line, NULL, 16);
u32 srcaddress = (u32) strtoul(line + 9, NULL, 16);
u32 dstaddress = (u32) strtoul(line + 18, NULL, 16);
if (!CodeList) CodeList = malloc(sizeof(WIP_Code));
WIP_Code * tmp = realloc(CodeList, (CodesCount + 1) * sizeof(WIP_Code));
if (!tmp)
{
fclose(fp);
free_wip();
return -1;
}
CodeList = tmp;
CodeList[CodesCount].offset = offset;
CodeList[CodesCount].srcaddress = srcaddress;
CodeList[CodesCount].dstaddress = dstaddress;
CodesCount++;
}
fclose(fp);
gprintf("\n");
return 0;
}

View File

@ -233,7 +233,7 @@ void WindowCredits()
starImg.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
starImg.SetPosition(505, 350);
int numEntries = 21;
int numEntries = 24;
GuiText * txt[numEntries];
txt[i] = new GuiText(tr( "Credits" ), 26, ( GXColor )
@ -265,7 +265,7 @@ void WindowCredits()
txt[i]->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
txt[i]->SetPosition(0, y);
i++;
y += 26;
y += 24;
txt[i] = new GuiText(tr( "Official Site:" ), 20, ( GXColor )
{ 255, 255, 255, 255});
@ -278,26 +278,26 @@ void WindowCredits()
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(160, y);
i++;
y += 26;
y += 22;
GuiText::SetPresets(22, ( GXColor ) {255, 255, 255, 255}, 3000, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP, ALIGN_LEFT, ALIGN_TOP);
GuiText::SetPresets(20, ( GXColor ) {255, 255, 255, 255}, 3000, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP, ALIGN_LEFT, ALIGN_TOP);
txt[i] = new GuiText(tr( "Coding:" ));
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(10, y);
i++;
txt[i] = new GuiText("dimok / nIxx / giantpune / ardi");
txt[i] = new GuiText("Dimok / nIxx / giantpune / ardi");
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(160, y);
i++;
y += 22;
y += 20;
txt[i] = new GuiText("hungyip84 / DrayX7 / lustar / r-win");
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(160, y);
i++;
y += 26;
y += 22;
char text[100];
@ -310,7 +310,24 @@ void WindowCredits()
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(160, y);
i++;
y += 26;
y += 22;
txt[i] = new GuiText(tr( "Issue manager /" ));
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(10, y);
i++;
y += 20;
txt[i] = new GuiText(tr( "Main tester:" ));
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(10, y);
i++;
txt[i] = new GuiText("Cyan");
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(160, y);
i++;
y += 22;
txt[i] = new GuiText(tr( "Big thanks to:" ));
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
@ -322,69 +339,69 @@ void WindowCredits()
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(160, y);
i++;
y += 22;
y += 20;
sprintf(text, "CorneliousJD %s", tr( "for hosting the update files" ));
txt[i] = new GuiText(text);
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(160, y);
i++;
y += 22;
y += 20;
sprintf(text, "Kinyo %s", tr( "and translaters for language files updates" ));
sprintf(text, "Kinyo %s", tr( "and translators for language files updates" ));
txt[i] = new GuiText(text);
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(160, y);
i++;
y += 22;
y += 20;
sprintf(text, "Deak Phreak %s", tr( "for hosting the themes" ));
txt[i] = new GuiText(text);
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(160, y);
i++;
y += 26;
y += 22;
txt[i] = new GuiText(tr( "Special thanks to:" ));
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(10, y);
i++;
y += 22;
y += 20;
sprintf(text, "Waninkoko, Kwiirk & Hermes %s", tr( "for the USB Loader source" ));
txt[i] = new GuiText(text);
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(60, y);
i++;
y += 22;
y += 20;
sprintf(text, "Tantric %s", tr( "for his awesome tool LibWiiGui" ));
txt[i] = new GuiText(text);
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(60, y);
i++;
y += 22;
y += 20;
sprintf(text, "Fishears/Nuke %s", tr( "for Ocarina" ));
txt[i] = new GuiText(text);
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(60, y);
i++;
y += 22;
y += 20;
sprintf(text, "WiiPower %s", tr( "for diverse patches" ));
txt[i] = new GuiText(text);
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(60, y);
i++;
y += 22;
y += 20;
sprintf(text, "Oggzee %s", tr( "for FAT/NTFS support" ));
txt[i] = new GuiText(text);
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
txt[i]->SetPosition(60, y);
i++;
y += 22;
y += 20;
for (i = 0; i < numEntries; i++)
creditsWindowBox.Append(txt[i]);
@ -690,17 +707,9 @@ int WindowPrompt(const char *title, const char *msg, const char *btn1Label, cons
}
GuiTrigger trigZ;
trigZ.SetButtonOnlyTrigger(-1, WPAD_NUNCHUK_BUTTON_Z | WPAD_CLASSIC_BUTTON_ZL, PAD_TRIGGER_Z);
GuiButton screenShotBtn(0, 0);
screenShotBtn.SetPosition(0, 0);
screenShotBtn.SetTrigger(&trigZ);
promptWindow.Append(&dialogBoxImg);
promptWindow.Append(&titleTxt);
promptWindow.Append(&msgTxt);
promptWindow.Append(&screenShotBtn);
if (btn1Label) promptWindow.Append(&btn1);
if (btn2Label) promptWindow.Append(&btn2);
@ -743,11 +752,6 @@ int WindowPrompt(const char *title, const char *msg, const char *btn1Label, cons
{
choice = 0;
}
else if (screenShotBtn.GetState() == STATE_CLICKED)
{
screenShotBtn.ResetState();
ScreenShot();
}
if (count > 0) count--;
if (count == 0) choice = 1;
}
@ -1693,14 +1697,6 @@ int HBCWindowPrompt(const char *name, const char *coder, const char *version, co
btn2.SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM);
btn2.SetPosition(-40, 2);
GuiTrigger trigZ;
trigZ.SetButtonOnlyTrigger(-1, WPAD_NUNCHUK_BUTTON_Z | WPAD_CLASSIC_BUTTON_ZL, PAD_TRIGGER_Z);
GuiButton screenShotBtn(0, 0);
screenShotBtn.SetPosition(0, 0);
screenShotBtn.SetTrigger(&trigZ);
promptWindow.Append(&screenShotBtn);
promptWindow.Append(&dialogBoxImg);
promptWindow.Append(&whiteBoxImg);
promptWindow.Append(&scrollbarImg);
@ -1744,13 +1740,6 @@ int HBCWindowPrompt(const char *name, const char *coder, const char *version, co
else if (btn2.GetState() == STATE_CLICKED)
choice = 0;
else if (screenShotBtn.GetState() == STATE_CLICKED)
{
gprintf("\n\tscreenShotBtn clicked");
screenShotBtn.ResetState();
ScreenShot();
gprintf("...It's easy, mmmmmmKay");
}
else if (arrowUpBtn.GetState() == STATE_CLICKED || arrowUpBtn.GetState() == STATE_HELD)
{
long_descriptionTxt.PreviousLine();

View File

@ -154,17 +154,9 @@ bool TitleSelector(char output[])
optionBrowser4.SetPosition(0, 90);
optionBrowser4.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
GuiTrigger trigZ;
trigZ.SetButtonOnlyTrigger(-1, WPAD_NUNCHUK_BUTTON_Z | WPAD_CLASSIC_BUTTON_ZL, PAD_TRIGGER_Z);
GuiButton screenShotBtn(0, 0);
screenShotBtn.SetPosition(0, 0);
screenShotBtn.SetTrigger(&trigZ);
HaltGui();
GuiWindow w(screenwidth, screenheight);
w.Append(&settingsbackgroundbtn);
w.Append(&screenShotBtn);
w.Append(&cancelBtn);
w.Append(&optionBrowser4);
mainWindow->SetState(STATE_DISABLED);
@ -198,11 +190,6 @@ bool TitleSelector(char output[])
//break the loop and end the function
exit = true;
}
else if (screenShotBtn.GetState() == STATE_CLICKED)
{
screenShotBtn.ResetState();
ScreenShot();
}
}
HaltGui();
@ -395,16 +382,8 @@ int TitleBrowser()
wifiBtn.SetAlpha(80);
wifiBtn.SetTrigger(&trigA);
GuiTrigger trigZ;
trigZ.SetButtonOnlyTrigger(-1, WPAD_NUNCHUK_BUTTON_Z | WPAD_CLASSIC_BUTTON_ZL, PAD_TRIGGER_Z);
GuiButton screenShotBtn(0, 0);
screenShotBtn.SetPosition(0, 0);
screenShotBtn.SetTrigger(&trigZ);
HaltGui();
GuiWindow w(screenwidth, screenheight);
w.Append(&screenShotBtn);
w.Append(&settingsbackgroundbtn);
w.Append(&titleTxt);
w.Append(&cancelBtn);
@ -661,11 +640,6 @@ int TitleBrowser()
exit = true;
ret = -10;
}
else if (screenShotBtn.GetState() == STATE_CLICKED)
{
screenShotBtn.ResetState();
ScreenShot();
}
}
CloseConnection();

View File

@ -793,13 +793,6 @@ int showGameInfo(char *ID)
gameinfoWindow.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 100);
GuiTrigger trigZ;
trigZ.SetButtonOnlyTrigger(-1, WPAD_NUNCHUK_BUTTON_Z | WPAD_CLASSIC_BUTTON_ZL, PAD_TRIGGER_Z);
GuiButton screenShotBtn(0, 0);
screenShotBtn.SetPosition(0, 0);
screenShotBtn.SetTrigger(&trigZ);
gameinfoWindow.Append(&screenShotBtn);
HaltGui();
//mainWindow->SetState(STATE_DISABLED);
mainWindow->Append(&gameinfoWindow);
@ -836,13 +829,11 @@ int showGameInfo(char *ID)
gameinfoWindow2.Remove(&nextBtn);
gameinfoWindow2.Remove(&backBtn);
gameinfoWindow2.Remove(&homeBtn);
gameinfoWindow2.Remove(&screenShotBtn);
gameinfoWindow2.SetVisible(false);
gameinfoWindow.SetVisible(true);
gameinfoWindow.Append(&backBtn);
gameinfoWindow.Append(&nextBtn);
gameinfoWindow.Append(&homeBtn);
gameinfoWindow.Append(&screenShotBtn);
mainWindow->Remove(&gameinfoWindow2);
ResumeGui();
page = 1;
@ -858,14 +849,12 @@ int showGameInfo(char *ID)
gameinfoWindow.Remove(&nextBtn);
gameinfoWindow.Remove(&backBtn);
gameinfoWindow.Remove(&homeBtn);
gameinfoWindow.Remove(&screenShotBtn);
gameinfoWindow.SetVisible(false);
gameinfoWindow2.SetVisible(true);
coverImg->SetPosition(15, 30);
gameinfoWindow2.Append(&nextBtn);
gameinfoWindow2.Append(&backBtn);
gameinfoWindow2.Append(&homeBtn);
gameinfoWindow2.Append(&screenShotBtn);
mainWindow->Append(&gameinfoWindow2);
ResumeGui();
page = 2;
@ -876,13 +865,11 @@ int showGameInfo(char *ID)
gameinfoWindow2.Remove(&nextBtn);
gameinfoWindow2.Remove(&backBtn);
gameinfoWindow2.Remove(&homeBtn);
gameinfoWindow2.Remove(&screenShotBtn);
gameinfoWindow2.SetVisible(false);
gameinfoWindow.SetVisible(true);
gameinfoWindow.Append(&backBtn);
gameinfoWindow.Append(&nextBtn);
gameinfoWindow.Append(&homeBtn);
gameinfoWindow.Append(&screenShotBtn);
mainWindow->Remove(&gameinfoWindow2);
ResumeGui();
page = 1;
@ -944,13 +931,6 @@ int showGameInfo(char *ID)
}
urlBtn.ResetState();
}
else if (screenShotBtn.GetState() == STATE_CLICKED)
{
gprintf("\n\tscreenShotBtn clicked");
screenShotBtn.ResetState();
ScreenShot();
gprintf("...It's easy, mmmmmmKay");
}
}
gameinfoWindow.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 100);

View File

@ -4,6 +4,7 @@
#include "mload/mload.h"
#include "Controls/DeviceHandler.hpp"
#include "FileOperations/fileops.h"
#include "settings/CSettings.h"
#include "settings/newtitles.h"
#include "language/gettext.h"
@ -203,5 +204,11 @@ void ScreenShot()
strftime(buffer, 80, "USBLoader_GX_ScreenShot-%b%d%H%M%S%y.png", timeinfo);
sprintf(buffer2, "%s%s", Settings.ConfigPath, buffer);
if(!CreateSubfolder(Settings.ConfigPath))
{
gprintf("Can't create screenshot folder\n");
return;
}
TakeScreenshot(buffer2);
}

View File

@ -1,3 +1,26 @@
/****************************************************************************
* Copyright (C) 2010
* by Dimok
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any
* damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any
* purpose, including commercial applications, and to alter it and
* redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you
* must not claim that you wrote the original software. If you use
* this software in a product, an acknowledgment in the product
* documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and
* must not be misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
***************************************************************************/
#include "ThreadedTask.hpp"
ThreadedTask * ThreadedTask::instance = NULL;

View File

@ -1,3 +1,26 @@
/****************************************************************************
* Copyright (C) 2010
* by Dimok
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any
* damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any
* purpose, including commercial applications, and to alter it and
* redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you
* must not claim that you wrote the original software. If you use
* this software in a product, an acknowledgment in the product
* documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and
* must not be misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
***************************************************************************/
#ifndef THREADED_TASK_HPP_
#define THREADED_TASK_HPP_