Also, please do not use the cont_get_cond() function in new code. It will be going away very soon. If you're using a version of KOS that has been updated any time in the past 2 years, none of the examples should use it any more (I just checked when I got rid of it it from the examples). The old Maple API has been deprecated since KOS 1.1.8 (released in 2002), so there's pretty much no reason why it should have still been around.
All remnants of the old Maple API will be going away within the next few days probably from the SVN, cont_get_cond() included.
For reference, the relevant replacement code in the same vorbistest.c file looks like this:
Code: Select all
maple_device_t *cont = maple_enum_type(0, MAPLE_FUNC_CONTROLLER);
if (cont)
{
cont_state_t *state = (cont_state_t *)maple_dev_status(cont);
if(!state)
break;
if (state->buttons & CONT_START)
break;
if (state->buttons & CONT_Y)
{
printf("main: restarting oggvorbis\r\n");
sndoggvorbis_stop();
sndoggvorbis_start("/rd/test.ogg",0);
}
thd_sleep(10);
bitratenew=sndoggvorbis_getbitrate();
if (bitratenew != bitrateold)
{
printf("main: Vorbisfile current bitrate %ld\r\n",bitratenew);
bitrateold = bitratenew;
}
}
I guess use that to adapt whatever you come up with in here...
Also, for reference, state->buttons (same as the old cond.buttons, just inverted (hence no nots in the checks)) is of type uint32. Just to actually contribute to the real topic at hand.
EDIT: And by "in the next few days", I really meant in the next 20 minutes. The old Maple API compatibility stuff is gone from the SVN of KOS as of r716.