//get all the CMPT functions
unsigned int cmpt_handle;
OSDynLoad_Acquire("nn_cmpt.rpl", &cmpt_handle);
int (*CMPTLaunchTitle)(void* CMPTConfigure, int ConfigSize, int titlehigh, int titlelow);
int (*CMPTAcctSetScreenType)(int screenType);
int (*CMPTGetDataSize)(int* dataSize);
int (*CMPTCheckScreenState)();
OSDynLoad_FindExport(cmpt_handle, 0, "CMPTLaunchTitle", &CMPTLaunchTitle);
OSDynLoad_FindExport(cmpt_handle, 0, "CMPTAcctSetScreenType", &CMPTAcctSetScreenType);
OSDynLoad_FindExport(cmpt_handle, 0, "CMPTGetDataSize", &CMPTGetDataSize);
OSDynLoad_FindExport(cmpt_handle, 0, "CMPTCheckScreenState", &CMPTCheckScreenState);
//1 = TV Only, 2 = GamePad Only, 3 = Both
CMPTAcctSetScreenType(3);
if(CMPTCheckScreenState() < 0)
{
CMPTAcctSetScreenType(2);
if(CMPTCheckScreenState() < 0)
CMPTAcctSetScreenType(1);
}