Homebrew text not showing up

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,147
Trophies
2
Location
Chicago
XP
4,750
Country
United States
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.
 

smealum

growing up sucks.
Member
Joined
May 1, 2006
Messages
635
Trophies
2
Age
31
Location
SF
Website
www.smealum.net
XP
2,515
Country
United States
Joined
Feb 15, 2015
Messages
1,464
Trophies
0
XP
1,099
Country
United States
Last edited by MassExplosion213,

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,147
Trophies
2
Location
Chicago
XP
4,750
Country
United States
you didnt get this "straight from ctrulib", you modified the code pretty heavily... @MassExplosion213, you should maybe actually read the code at the other end of the link before saying stuff like that.

either way, ctrulib does include an example for rendering text : https://github.com/smealum/ctrulib/blob/master/examples/graphics/printing/hello-world/source/main.c
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.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan @ BakerMan:
    ubisoft should #stopkillinggames ngl
  • Badcatalex @ Badcatalex:
    sony should #stopkillinggames
  • Badcatalex @ Badcatalex:
    they killed LittleBigPlanet online, which was the main core of every LBP game
  • BakerMan @ BakerMan:
    for real
  • BakerMan @ BakerMan:
    at least with them, it was because of the DDOS attacks, ubisoft was just scummy
  • BakerMan @ BakerMan:
    fuck ubisoft, and fuck activision
    +1
  • realtimesave @ realtimesave:
    Nintendo needs to release a new console, switch is getting such shitty little games lately lol it's pathetic
  • Purple_Heart @ Purple_Heart:
    Lmao a new flashcart... The Unlock Switch... I knew it's not fake xD
    +1
  • NinStar @ NinStar:
    A new consoles won't solve that problem
  • NinStar @ NinStar:
    It will actually make it worse
  • The Real Jdbye @ The Real Jdbye:
    well actually
    a new console won't do anything right now, because the games are still in development, that's why there are few games being released
  • The Real Jdbye @ The Real Jdbye:
    it won't make the games finish any faster
  • Veho @ Veho:
    2/3rds of launch titles for the Switch 2 will just be lazy ports of Switch games anyway.
  • The Real Jdbye @ The Real Jdbye:
    probably
  • The Real Jdbye @ The Real Jdbye:
    maybe mario kart 9 will be a launch title
  • The Real Jdbye @ The Real Jdbye:
    i really want a new mario kart
  • Veho @ Veho:
    What, you mean the endless stream of DLCs doesn't count?
  • Veho @ Veho:
    Why develop a new game when you can just sell season passes forever?
  • Veho @ Veho:
    I'm still on MKDS so I'm not bothered :tpi:
  • The Real Jdbye @ The Real Jdbye:
    i like the dlc tbh, i'd like a new game more
  • ZeroT21 @ ZeroT21:
    but the current version is still selling fine at full price
  • SylverReZ @ SylverReZ:
    Hello
  • ZeroT21 @ ZeroT21:
    sup
    +1
  • SylverReZ @ SylverReZ:
    @realtimesave, You seen the Unlock Switch flashcart yet?
  • K3Nv2 @ K3Nv2:
    I'll see the 19.0 update that blocks use ability to it
    +1
    K3Nv2 @ K3Nv2: I'll see the 19.0 update that blocks use ability to it +1