consoleInit(): Displays nothing if not used; displays weird triangle if used

Discussion in '3DS - Homebrew Development and Emulators' started by delete12345, Jul 6, 2016.

  1. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    435
    188
    Feb 27, 2010
    United States
    Taipei, Taiwan
    This is what it looks like if I specified:

    Code:
    consoleInit(GFX_TOP, &topScreen);
    [​IMG]

    [​IMG]

    I know consoleInit() will change the frame buffer format to 16-bit, thus creating this glitched out triangle.

    However, when I changed consoleInit() so that it outputs messages on the bottom screen, and I specifically do not do anything to the top screen, I get nothing:

    [​IMG]

    I pretty certain it will be the same if I run this on my n3DS.

    May I ask what is wrong with my code? Thanks in advance.



    Main.cpp:

    http://hastebin.com/ohorehikux.avrasm

    Engine.cpp:

    http://hastebin.com/iwutifozuj.coffee
     
    Last edited by delete12345, Jul 6, 2016
  2. MasterFeizz

    MasterFeizz GBAtemp Advanced Fan

    Member
    888
    833
    Oct 15, 2015
    United States
    gfxSwapBuffersGpu() should fix your problem.
     
  3. CeeDee

    CeeDee hm?~

    Member
    3,838
    5,435
    May 4, 2014
    United States
    somewhere
    TRIANGLE? IT MUST BE THE ILLUMINATI!

    No but seriously, that looks pretty interesting.
     
  4. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    435
    188
    Feb 27, 2010
    United States
    Taipei, Taiwan
    It didn't work:

    [​IMG]
     
  5. MasterFeizz

    MasterFeizz GBAtemp Advanced Fan

    Member
    888
    833
    Oct 15, 2015
    United States
    Did you replace gfxSwapBuffers with gfxSwapBuffersGPU, because the only reason I see for that black screen is a double buffering problem unless the app crashed. You can try disabling double buffering with gfxSetDoubleBuffering(GFX_TOP, false);
     
  6. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    435
    188
    Feb 27, 2010
    United States
    Taipei, Taiwan
    Yes I did. Still no dice.

    EDIT: Apparently, just re-ordering gfxSwapBuffers[Gpu]() and gfxFlushBuffers() around makes the triangle appear!

    [​IMG]

    Sorry for the large image size. I have no idea how to scale them down.
     
    Last edited by delete12345, Jul 6, 2016