text not showing up

Discussion in '3DS - Homebrew Development and Emulators' started by DarkFlare69, Sep 21, 2015.

  1. DarkFlare69
    OP

    DarkFlare69 GBAtemp Psycho!

    Member
    4,713
    2,569
    Dec 8, 2014
    United States
    Ohio
    Using this main.c, the text won't show up on the screen:
    Code:
    #include <string.h>
    #include <stdio.h>
    #include <3ds.h>
    
    int main()
    {
        gfxInitDefault();
    
        while (aptMainLoop())
        {
            gspWaitForVBlank();
            hidScanInput();
    
            printf("Hello World!")
    
            u32 kDown = hidKeysDown();
            if (kDown & KEY_START)
                break;
    
            gfxFlushBuffers();
            gfxSwapBuffers();
        }
    
        gfxExit();
        return 0;
    }
    It's probably something obvious, like missing an include or something, but pls help anyway.
     
  2. MassExplosion213

    MassExplosion213 .

    Member
    1,416
    958
    Feb 15, 2015
    United States
    You forgot to do a console init. Add a consoleInit(GFX_TOP, NULL) or a consoleInit(GFX_BOTTOM, NULL).
     
    Last edited by MassExplosion213, Sep 21, 2015
    DarkFlare69 likes this.
  3. DarkFlare69
    OP

    DarkFlare69 GBAtemp Psycho!

    Member
    4,713
    2,569
    Dec 8, 2014
    United States
    Ohio
  4. MassExplosion213

    MassExplosion213 .

    Member
    1,416
    958
    Feb 15, 2015
    United States
    DarkFlare69 likes this.
  5. DarkFlare69
    OP

    DarkFlare69 GBAtemp Psycho!

    Member
    4,713
    2,569
    Dec 8, 2014
    United States
    Ohio
  6. smealum

    smealum growing up sucks.

    Member
    635
    2,022
    May 1, 2006
    United States
    SF
    marc00077, lemanuel and ashinnblunts like this.
  7. MassExplosion213

    MassExplosion213 .

    Member
    1,416
    958
    Feb 15, 2015
    United States
    Last edited by MassExplosion213, Sep 21, 2015
  8. DarkFlare69
    OP

    DarkFlare69 GBAtemp Psycho!

    Member
    4,713
    2,569
    Dec 8, 2014
    United States
    Ohio
    It's pretty much the same thing with a few notes. And if "heavily" is removing a few notes, the white pixel example, and replacing //Code with hello world!, then I'm scared for our future in computer programming

    But overall it looks like we just need to add the console init.