Contains general routines to initialize and terminate the library.
#define OSL_VERSION "MODv2 1.1.2" |
#define oslSetQuitOnLoadFailure |
( |
|
enabled | ) |
(osl_noFail = (enabled)) |
Sets the "no fail" mode. In this mode, if OSLib can't load a file (for example an image) it will display a gentleful message indicating to the user the name of the missing file, and quit immediately.
#define oslSetQuitOnLoadFailureCallback |
( |
|
function | ) |
(osl_noFailCallback = function) |
Sets the function to call in case of failure to load something. Default displays a message box.
void MyNoFailCallback(const char *filename, u32 reserved) {
myDisplayMessage("Unable to locate the following file: %s\nPlease reinstall the application.", filename);
}
#define oslSetExitCallback |
( |
|
function | ) |
(osl_exitCallback = function) |
Sets an exit callback. This function is executed when the user chooses "Exit" from the HOME menu. By default, all what OSLib does is set osl_quit to True, so that you know that you should quit (all your game loops should watch out for osl_quit). A typical but dirty callback may be to force quitting immediately using oslQuit. Example:
int myExitCallback(int arg1, int arg2, void *common)
{
return 0;
}
void main() {
while(1);
}
Flags for oslInit.
Enumerator |
---|
OSL_IF_USEOWNCALLBACKS |
Does not set up the standard callbacks. You'll have to provide them by yourself as shown in almost all PSPSDK samples.
|
OSL_IF_NOVBLANKIRQ |
Does not reserve the VBLANK IRQ. You should set up your own VBL handler, which should call oslVblankNextFrame() if osl_vblankCounterActive is TRUE, else oslSyncFrame(Ex) will not work properly.
|
void oslInit |
( |
int |
flags | ) |
|
Initializes the library. The options for the flags parameters are for advanced users only, let it to zero if you're beginning.
\param flags
Can be formed of one or more of the values from the #OSL_INITFLAGS enumeration (ORed together).
Exits the application immediately, returning to the XMB (PSP main menu) or to the calling application (e.g. IRShell).