Function SetUserPreVsyncCallback: Difference between revisions

From Uzebox Wiki
Jump to navigation Jump to search
(Created page with "{{Function |prototype = void SetUserPreVsyncCallback(VsyncCallBackFunc); |description = Sets a function that will be called 60 times per second by the kernel *before* VSYNC tas...")
 
mNo edit summary
 
Line 20: Line 20:
|since      = V3.3
|since      = V3.3
|notes      =  
|notes      =  
|see also    = SetUserPostVsyncCallback
|see also    = [[Function_SetUserPostVsyncCallback|SetUserPostVsyncCallback]]
|deprecated  =  
|deprecated  =  
}}
}}

Latest revision as of 00:30, 29 August 2011

Prototype

void SetUserPreVsyncCallback(VsyncCallBackFunc);

Description

Sets a function that will be called 60 times per second by the kernel *before* VSYNC tasks begin. Note that the VSYNC tasks execute in the following order:

1. Process user pre callback

2. Invoke video mode tasks

3. Refresh buttons/mouse state

4. Process music (music & mixing)

5. Process user post callback

Parameters
  • VsyncCallBackFunc: pointer to a function that will be invoked by the kernel.
Returns

Void

Video Modes

All

Since

V3.3

See Also

SetUserPostVsyncCallback

Example:

...
void VsyncCallBack(void){
    mmc_processMixer();
}
...
int main(){
    SetUserPreVsyncCallback(&VsyncCallBack);
    ...
}