fix some warnings from vita builds (missing includes)

also some tidy-up to whitespace.
This commit is contained in:
Ozkan Sezer 2021-12-07 21:24:24 +03:00
parent 21d46b7e0c
commit 9409642e08
2 changed files with 12 additions and 22 deletions

View File

@ -117,6 +117,7 @@ static void PSPAUDIO_WaitDevice(_THIS)
{
/* Because we block when sending audio, there's no need for this function to do anything. */
}
static Uint8 *PSPAUDIO_GetDeviceBuf(_THIS)
{
return this->hidden->mixbufs[this->hidden->next_buffer];
@ -144,7 +145,6 @@ static void PSPAUDIO_ThreadInit(_THIS)
}
}
static int
PSPAUDIO_Init(SDL_AudioDriverImpl * impl)
{
@ -160,12 +160,7 @@ PSPAUDIO_Init(SDL_AudioDriverImpl * impl)
impl->OnlyHasDefaultOutputDevice = 1;
/*
impl->HasCaptureSupport = 1;
impl->OnlyHasDefaultCaptureDevice = 1;
*/
/*
impl->DetectDevices = DSOUND_DetectDevices;
impl->Deinitialize = DSOUND_Deinitialize;
*/
return 1; /* this audio target is available. */
}
@ -174,8 +169,6 @@ AudioBootStrap PSPAUDIO_bootstrap = {
"psp", "PSP audio driver", PSPAUDIO_Init, 0
};
/* SDL_AUDI */
#endif /* SDL_AUDIO_DRIVER_PSP */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -25,6 +25,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <malloc.h> /* memalign() */
#include "SDL_audio.h"
#include "SDL_error.h"
@ -135,10 +136,11 @@ static void VITAAUD_CloseDevice(_THIS)
}
if (this->hidden->rawbuf != NULL) {
free(this->hidden->rawbuf);
free(this->hidden->rawbuf); /* this uses memalign(), not SDL_malloc(). */
this->hidden->rawbuf = NULL;
}
}
static void VITAAUD_ThreadInit(_THIS)
{
/* Increase the priority of this audio thread by 1 to put it
@ -152,11 +154,9 @@ static void VITAAUD_ThreadInit(_THIS)
}
}
static int
VITAAUD_Init(SDL_AudioDriverImpl * impl)
{
/* Set the function pointers */
impl->OpenDevice = VITAAUD_OpenDevice;
impl->PlayDevice = VITAAUD_PlayDevice;
@ -169,7 +169,6 @@ VITAAUD_Init(SDL_AudioDriverImpl * impl)
impl->OnlyHasDefaultOutputDevice = 1;
/*
impl->HasCaptureSupport = 1;
impl->OnlyHasDefaultInputDevice = 1;
*/
return 1; /* this audio target is available. */
@ -179,8 +178,6 @@ AudioBootStrap VITAAUD_bootstrap = {
"vita", "VITA audio driver", VITAAUD_Init, 0
};
/* SDL_AUDI */
#endif /* SDL_AUDIO_DRIVER_VITA */
/* vi: set ts=4 sw=4 expandtab: */