mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-23 13:22:40 +02:00
gfx: Add function to query framebuffer pitch.
This commit is contained in:
parent
06e50f74ab
commit
4f331eb9f7
@ -85,6 +85,9 @@ void gfxGetFramebufferResolution(u32* width, u32* height);
|
||||
/// Use this to get the actual byte-size of the framebuffer for use with memset/etc.
|
||||
size_t gfxGetFramebufferSize(void);
|
||||
|
||||
/// Use this to get the actual byte-pitch of the framebuffer for use with memset/etc.
|
||||
u32 gfxGetFramebufferPitch(void);
|
||||
|
||||
/// Sets the \ref GfxMode.
|
||||
void gfxSetMode(GfxMode mode);
|
||||
|
||||
|
@ -530,6 +530,10 @@ size_t gfxGetFramebufferSize(void) {
|
||||
return g_gfx_singleframebuf_size;
|
||||
}
|
||||
|
||||
u32 gfxGetFramebufferPitch(void) {
|
||||
return g_gfx_framebuf_aligned_width*4;
|
||||
}
|
||||
|
||||
void gfxSetMode(GfxMode mode) {
|
||||
g_gfxMode = mode;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user