3DS Development

Discussion in '3DS - Homebrew Development and Emulators' started by RyuShinobi500, Nov 29, 2019.

  1. RyuShinobi500
    OP

    RyuShinobi500 Coder

    Member
    2
    Oct 25, 2019
    United States
    I have a development question in this piece of code

    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
     
  2. BEEMOO

    BEEMOO Member

    Newcomer
    1
    Nov 8, 2019
    Netherlands
    I dont know for sure but loop it?
     
  3. RyuShinobi500
    OP

    RyuShinobi500 Coder

    Member
    2
    Oct 25, 2019
    United States
    Okay thank you for your reply I did not think of of this I will try it:yay:
     
Quick Reply
Draft saved Draft deleted
Loading...