sftdlib
sftdlib copied to clipboard
Calling sftd_init() causes graphics to display on both screens if drawing only on GFX_TOP and not GFX_BOTTOM
This occurs on the old 3ds. Not sure about other models. This is also when a .3dsx file is run. Not sure about .cia
Steps to reproduce:
- Include 3ds.h, sf2d.h, and sftd.h
- Insert the following into main()
sf2d_init();
sftd_init();
while(aptMainLoop()){
hidScanInput();
if(hidKeysDown() & KEY_START) break;
sf2d_start_frame(GFX_TOP, GFX_LEFT);
sf2d_draw_rectangle(0, 0, 30, 30, RGBA8(0xFF, 0x00, 0x00, 0xFF));
sf2d_end_frame();
sf2d_swapbuffers();
}
sftd_fini();
sf2d_fini();
return 0;
- Compile and send to 3ds
- Result should be a red square in the top left hand corner against a black background in both screens.
Quick and dirty fix:
- Put the following after the sf2d_end_frame() that follows sf2d_start_frame(GFX_TOP, GFX_LEFT)
sf2d_start_frame(GFX_BOTTOM, GFX_LEFT);
sf2d_end_frame();