D
Deleted User
Guest
OP
I have a development question in this piece of code
the static char Output[99999]; controls the amount of text the screen will display I was wondering if there was a way to make this unlimited rather than limited to 99999 characters thanks and have a nice weekend
Code:
// Keypad-Demo
#include <iostream>
#include <3ds.h>
using namespace std;
int main()
{
gfxInitDefault();
consoleInit(GFX_TOP, NULL);
cout << endl;
cout << "Keypad-Demo" << endl;
cout << endl;
cout << "(A)Keypad:" << endl;
cout << endl;
cout << "(B)Numpad:" << endl;
cout << endl;
cout << "(START)Exit:" << endl;
cout << endl;
while (aptMainLoop())
{
hidScanInput();
u32 kDown = hidKeysDown();
if (kDown & KEY_START)
{
break;
}
static SwkbdState swkbd;
static char Output[99999];
SwkbdButton button = SWKBD_BUTTON_NONE;
if (kDown & KEY_A)
{
swkbdInit(&swkbd, SWKBD_TYPE_NORMAL, 2, -1);
button = swkbdInputText(&swkbd, Output, sizeof(Output));
cout << endl;
cout << "Output: " << Output;
cout << endl;
}
if (kDown & KEY_B)
{
swkbdInit(&swkbd, SWKBD_TYPE_NUMPAD, 1, 8);
swkbdSetPasswordMode(&swkbd, SWKBD_PASSWORD_HIDE_DELAY);
swkbdSetValidation(&swkbd, SWKBD_ANYTHING, 0, 0);
swkbdSetFeatures(&swkbd, SWKBD_FIXED_WIDTH);
button = swkbdInputText(&swkbd, Output, sizeof(Output));
cout << endl;
cout << "Output: " << Output;
cout << endl;
}
gfxFlushBuffers();
gfxSwapBuffers();
gspWaitForVBlank();
}
gfxExit();
return 0;
}
the static char Output[99999]; controls the amount of text the screen will display I was wondering if there was a way to make this unlimited rather than limited to 99999 characters thanks and have a nice weekend