3DS: General cleanup
Jeffrey Pfau jeffrey@endrift.com
Wed, 10 Dec 2014 03:13:26 -0800
1 files changed,
2 insertions(+),
5 deletions(-)
jump to
M
src/platform/3ds/main.c
→
src/platform/3ds/main.c
@@ -35,7 +35,6 @@ GBAVideoSoftwareRendererCreate(&renderer);
size_t stride = VIDEO_HORIZONTAL_PIXELS * BYTES_PER_PIXEL; color_t* videoBuffer = anonymousMemoryMap(stride * VIDEO_VERTICAL_PIXELS); - memset(videoBuffer, 0xFF, stride * VIDEO_VERTICAL_PIXELS); struct GBA* gba = anonymousMemoryMap(sizeof(struct GBA)); struct ARMCore* cpu = anonymousMemoryMap(sizeof(struct ARMCore)); int activeKeys = 0;@@ -73,12 +72,10 @@ ARMRunLoop(cpu);
if (!inVblank) { if (GBARegisterDISPSTATIsInVblank(gba->video.dispstat)) { - u16 width, height; - u8* screen = gfxGetFramebuffer(GFX_BOTTOM, GFX_BOTTOM, &width, &height); - memcpy(screen, videoBuffer, stride * VIDEO_VERTICAL_PIXELS); + GX_RequestDma(0, (u32*) videoBuffer, (u32*) gfxGetFramebuffer(GFX_BOTTOM, GFX_BOTTOM, 0, 0), stride * VIDEO_VERTICAL_PIXELS); gfxFlushBuffers(); gfxSwapBuffersGpu(); - gspWaitForEvent(GSPEVENT_VBlank0, false); + gspWaitForVBlank(); hidScanInput(); } }