mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Added gfxGetFramebufferSize().
This commit is contained in:
parent
c80096e5cc
commit
e871eb9695
@ -13,6 +13,7 @@ void gfxExit(void);
|
||||
void gfxWaitForVsync();
|
||||
void gfxSwapBuffers();
|
||||
u8* gfxGetFramebuffer(u32* width, u32* height);
|
||||
size_t gfxGetFramebufferSize(void); /// Use this to get the actual byte-size of the buffer for use with memset/etc, do not calculate the byte-size manually with the width and height from gfxGetFramebuffer. The height returned by gfxGetFramebuffer is the display height not the aligned height.
|
||||
void gfxSetDoubleBuffering(bool doubleBuffering);
|
||||
void gfxFlushBuffers(void);
|
||||
|
||||
|
@ -326,6 +326,10 @@ u8* gfxGetFramebuffer(u32* width, u32* height) {
|
||||
return &g_gfxFramebuf[g_gfxCurrentBuffer*g_nvgfx_singleframebuf_size];
|
||||
}
|
||||
|
||||
size_t gfxGetFramebufferSize(void) {
|
||||
return g_nvgfx_singleframebuf_size;
|
||||
}
|
||||
|
||||
void gfxSetDoubleBuffering(bool doubleBuffering) {
|
||||
g_gfxDoubleBuf = doubleBuffering;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user