When a process receives the
through the system message queue, your application is already in the foreground and you own all foreground resources simultaneously. All drivers are
ready and the game threads on all three cores are being scheduled. For more information, see Multicore Processing
and the ProcUI Library.
Your application must do the following.
When not using ProcUI, a process has acquired the foreground when it
receives a message from the system message queue with
msg.data0 == OS_SYSTEM_MESSAGE_DATA0_ACQUIRED_FOREGROUND
When using ProcUI, a process has acquired the foreground when
calls the appropriate callbacks.
After either of these events has happened, the process is in the foreground.
Upon reacquiring the foreground state, the application should make few assumptions about what GPU state remains from its previous foreground instance. MEM2 resources remained where they were. Any MEM1 resources will need to be reloaded. Display settings (see GX2DisplayPage) should not require resetting.
The application must start the rendering with a context state reset. This means it should begin the frame by calling either GX2ClearColor (or similar APIs, see GX2 Functions Which Disable State Shadowing) or GX2SetContextState. This is mandatory. It is not acceptable to attempt to reset every GX2 state manually, since this may not reset all of the GPU pipeline state.
GX2GetLastFrameto get the previous frame and perform a crossfade.