fix display
This commit is contained in:
parent
e9e4c3e930
commit
3112db466d
1 changed files with 42 additions and 41 deletions
|
@ -1,6 +1,8 @@
|
|||
#include <3ds.h>
|
||||
#include <iostream>
|
||||
|
||||
#define ENDL "\e[0K"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static void locateBits(u32 bits) {
|
||||
|
@ -13,28 +15,27 @@ static void locateBits(u32 bits) {
|
|||
cout << i;
|
||||
}
|
||||
}
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
static void showAll(void) {
|
||||
consoleClear();
|
||||
|
||||
touchPosition touch;
|
||||
circlePosition circle;
|
||||
hidScanInput();
|
||||
hidTouchRead(&touch);
|
||||
hidCircleRead(&circle);
|
||||
cout << "=========================" << endl;
|
||||
cout << "KEYS: "; locateBits(hidKeysHeld()); cout << endl;
|
||||
cout << "TOUCH SCREEN: " << touch.px << "," << touch.py << endl;
|
||||
cout << "CIRCLE PAD: " << circle.dx << "," << circle.dy << endl;
|
||||
cout
|
||||
<< "\e[H"
|
||||
<< "=========================" << endl
|
||||
<< "KEYS: "; locateBits(hidKeysHeld()); cout << ENDL << endl
|
||||
<< "TOUCH SCREEN: " << touch.px << "," << touch.py << ENDL << endl
|
||||
<< "CIRCLE PAD: " << circle.dx << "," << circle.dy << ENDL << endl;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
gfxInitDefault();
|
||||
consoleInit(GFX_TOP, NULL);
|
||||
while (aptMainLoop()) {
|
||||
gspWaitForVBlank();
|
||||
showAll();
|
||||
}
|
||||
gfxExit();
|
||||
|
|
Loading…
Add table
Reference in a new issue