From edf2c1c139aaf84bbfab55d838bdc2e568fe283c Mon Sep 17 00:00:00 2001 From: mtheall Date: Fri, 19 Dec 2014 23:38:30 -0600 Subject: [PATCH] Add gfxGetScreenFormat(). --- libctru/include/3ds/gfx.h | 1 + libctru/source/gfx.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/libctru/include/3ds/gfx.h b/libctru/include/3ds/gfx.h index 7d85eef..9cfcae0 100644 --- a/libctru/include/3ds/gfx.h +++ b/libctru/include/3ds/gfx.h @@ -25,6 +25,7 @@ void gfxExit(); //control stuff void gfxSet3D(bool enable); void gfxSetScreenFormat(gfxScreen_t screen, GSP_FramebufferFormats format); +GSP_FramebufferFormats gfxGetScreenFormat(gfxScreen_t screen); void gfxSetDoubleBuffering(gfxScreen_t screen, bool doubleBuffering); void gfxFlushBuffers(); void gfxSwapBuffers(); diff --git a/libctru/source/gfx.c b/libctru/source/gfx.c index 9b499ef..9c9aded 100644 --- a/libctru/source/gfx.c +++ b/libctru/source/gfx.c @@ -36,6 +36,13 @@ void gfxSetScreenFormat(gfxScreen_t screen, GSP_FramebufferFormats format) { botFormat = format; } +GSP_FramebufferFormats gfxGetScreenFormat(gfxScreen_t screen) { + if(screen==GFX_TOP) + return topFormat; + else + return botFormat; +} + void gfxSetDoubleBuffering( gfxScreen_t screen, bool doubleBuffering) { doubleBuf[screen] = doubleBuffering ? 1 : 0; // make sure they're the integer values '1' and '0' }