Minor touches

This commit is contained in:
J-D-K 2018-06-13 21:29:56 -04:00
parent ac65504083
commit 4251824d3a
3 changed files with 13 additions and 4 deletions

View File

@ -38,6 +38,7 @@ INCLUDES := inc
EXEFS_SRC := exefs_src
APP_TITLE := JKSV
APP_AUTHOR := JK_
APP_VERSION := 06/13/2018
ROMFS := romfs
#---------------------------------------------------------------------------------

View File

@ -98,7 +98,7 @@ namespace fs
std::fstream t(to, std::ios::out | std::ios::binary);
f.seekg(0, f.end);
uint64_t fileSize = f.tellg();
size_t fileSize = f.tellg();
f.seekg(0, f.beg);
uint8_t *buff = new uint8_t[BUFF_SIZE];
@ -138,7 +138,7 @@ namespace fs
std::fstream t(to, std::ios::out | std::ios::binary);
f.seekg(0, f.end);
uint64_t fileSize = f.tellg();
size_t fileSize = f.tellg();
f.seekg(0, f.beg);
uint8_t *buff = new uint8_t[BUFF_SIZE];

View File

@ -738,19 +738,23 @@ namespace ui
void showMessage(const std::string& mess)
{
button ok("OK (A)", 480, 464, 320, 96);
while(true)
{
hidScanInput();
uint64_t down = hidKeysDown(CONTROLLER_P1_AUTO);
touchPosition p;
hidTouchRead(&p, 0);
if(down & KEY_A || down & KEY_B)
if(down & KEY_A || down & KEY_B || ok.released(p))
break;
drawMenus();
gfx::drawRectangle(256, 128, 768, 464, 0xC0C0C0FF);
gfx::drawText(mess, 272, 144, 48, 0x000000FF);
ok.draw();
gfx::handleBuffs();
}
@ -758,6 +762,7 @@ namespace ui
void showError(const std::string& mess, const Result& r)
{
button ok("OK (A)", 480, 464, 320, 96);
char tmp[512];
sprintf(tmp, "%s\n0x%08X", mess.c_str(), (unsigned)r);
@ -766,12 +771,15 @@ namespace ui
hidScanInput();
uint64_t down = hidKeysDown(CONTROLLER_P1_AUTO);
touchPosition p;
hidTouchRead(&p, 0);
if(down & KEY_A || down & KEY_B)
if(down & KEY_A || down & KEY_B || ok.released(p))
break;
gfx::drawRectangle(256, 128, 768, 464, 0xC0C0C0FF);
gfx::drawText(tmp, 272, 144, 48, 0x000000FF);
ok.draw();
gfx::handleBuffs();
}