Skip to content

GB_set_pixels_output

Lior Halphon edited this page Nov 26, 2024 · 2 revisions

Definition

void GB_set_pixels_output(GB_gameboy_t *gb, uint32_t *output);

In display.h

Description

Sets a buffer that will be filled with a single frame of video data by the emulator instance. When the emulator instance finishes rendering a frame, the vblank callback will be called. Each pixel always takes 4 bytes, and is encoded using the RGB encode callback. The buffer must be large enough to contain GB_get_screen_width(...) times GB_get_screen_height(...) pixels. You must either call this function with a valid buffer or GB_set_rendering_disabled with true before first calling GB_run.

Thread Safety

GB_set_pixels_output must not be called if the instance is being run in another thread, but may be called from the current one (via a callback).

See Also

Clone this wiki locally