Line 161:
Line 161:
=== Screen ===
=== Screen ===
β
In all the functions below, bufferNum means: 0 = TV, 1 = Gamepad. "colour" in the form stored in memory is RGBA8. These functions can't be used without crashing, unless OSScreen was properly initialized. The below functions will immediately return if x/y is out-of-bounds.
+
"bufferNum" is the screenid, see the below screen defines for that. OSScreen *only* supports values 0-1 for screenid. "colour" in the form stored in memory is RGBA8. These functions can't be used without crashing, unless OSScreen was properly initialized. The below functions will immediately return if x/y is out-of-bounds.
{| class="wikitable"
{| class="wikitable"
Line 170:
Line 170:
|OSScreenGetBufferSizeEx
|OSScreenGetBufferSizeEx
|uint32_t OSScreenGetBufferSizeEx(int bufferNum)
|uint32_t OSScreenGetBufferSizeEx(int bufferNum)
β
|Get the size of the specified buffer
+
|Get the size of the specified buffer.
|-
|-
|OSScreenFlipBuffersEx
|OSScreenFlipBuffersEx
β
|uint32_t OSScreenFlipBuffersEx(int bufferNum);
+
|void OSScreenFlipBuffersEx(int bufferNum);
|Do a buffer-swap, which results in the buffer previously being drawn to being displayed. This flushes data-cache for the buffers and updates coreinit + hw-regs state.
|Do a buffer-swap, which results in the buffer previously being drawn to being displayed. This flushes data-cache for the buffers and updates coreinit + hw-regs state.
|-
|-
|OSScreenClearBufferEx
|OSScreenClearBufferEx
|uint32_t OSScreenClearBufferEx(int bufferNum, uint32_t colour);
|uint32_t OSScreenClearBufferEx(int bufferNum, uint32_t colour);
β
|Fill the specified buffer with a certain color
+
|Fill the specified buffer with a certain color.
|-
|-
|OSScreenPutPixelEx
|OSScreenPutPixelEx
β
|uint32_t OSScreenPutPixelEx(int bufferNum, uint32_t posX, uint32_t posY, uint32_t colour);
+
|void OSScreenPutPixelEx(int bufferNum, uint32_t posX, uint32_t posY, uint32_t colour);
β
|Draw a pixel of a certain color to the specified coordinates
+
|Draw a pixel of a certain color to the specified coordinates. This just writes the input u32 to the target location in the framebuffer, nothing is done with the data already stored in the framebuffer.
|-
|-
|OSScreenPutFontEx
|OSScreenPutFontEx