GUIX: which frame buffer is currently active?

Hello community,

I have a S7G2 system running a GUIX application and displaying it on an LCD display using double buffering.

Now I want to read data from the display frame buffer for remote viewing (like VNC).

But only from the frame buffer that GUIX is currently not writing to. To avoid flickering.

The frame buffer array itself is defined as g_display0_fb_background[2]...

Can you tell me where the active frame buffer index (0 or 1) can be read?

Thanks for your help!

Philipp