mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-04-25 16:15:11 -05:00
Minor touches
This commit is contained in:
parent
ac65504083
commit
4251824d3a
1
Makefile
1
Makefile
|
|
@ -38,6 +38,7 @@ INCLUDES := inc
|
|||
EXEFS_SRC := exefs_src
|
||||
APP_TITLE := JKSV
|
||||
APP_AUTHOR := JK_
|
||||
APP_VERSION := 06/13/2018
|
||||
ROMFS := romfs
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
12
src/ui.cpp
12
src/ui.cpp
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user