play: do not print on watchdog thread
Signed-off-by: Mahyar Koshkouei <mk@deltabeard.com>
This commit is contained in:
@@ -19,7 +19,7 @@ struct errInfo_t
|
||||
volatile int* error;
|
||||
|
||||
/* Extra information regarding error (Must be NULL if unused) */
|
||||
volatile char* errstr;
|
||||
//volatile char* errstr;
|
||||
|
||||
/* Event to trigger on error */
|
||||
Handle* failEvent;
|
||||
|
||||
@@ -46,7 +46,7 @@ enum file_types getFileType(const char *file)
|
||||
|
||||
/* Failure opening file */
|
||||
if(ftest == NULL)
|
||||
return -1;
|
||||
return FILE_TYPE_ERROR;
|
||||
|
||||
if(fread(&fileSig, 4, 1, ftest) == 0)
|
||||
goto err;
|
||||
@@ -87,7 +87,7 @@ enum file_types getFileType(const char *file)
|
||||
// "PSID" or "RSID"
|
||||
case 0x44495350:
|
||||
case 0x44495352:
|
||||
file_type=FILE_TYPE_SID;
|
||||
file_type = FILE_TYPE_SID;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -55,20 +55,14 @@ void playbackWatchdog(void* infoIn)
|
||||
|
||||
if(*info->errInfo->error > 0)
|
||||
{
|
||||
continue;
|
||||
consoleSelect(info->screen);
|
||||
printf("Error %d: %s", *info->errInfo->error,
|
||||
printf("Error %d: %s\n", *info->errInfo->error,
|
||||
ctrmus_strerror(*info->errInfo->error));
|
||||
|
||||
if(info->errInfo->errstr != NULL)
|
||||
{
|
||||
printf(" %s", info->errInfo->errstr);
|
||||
delete(info->errInfo->errstr);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
else if (*info->errInfo->error == -1)
|
||||
{
|
||||
continue;
|
||||
/* Used to signify that playback has stopped.
|
||||
* Not technically an error.
|
||||
*/
|
||||
@@ -316,7 +310,6 @@ int main(int argc, char **argv)
|
||||
svcCreateEvent(&playbackFailEvent, RESET_ONESHOT);
|
||||
errInfo.error = &error;
|
||||
errInfo.failEvent = &playbackFailEvent;
|
||||
errInfo.errstr = NULL;
|
||||
|
||||
watchdogInfoIn.screen = &topScreenLog;
|
||||
watchdogInfoIn.errInfo = &errInfo;
|
||||
|
||||
Reference in New Issue
Block a user