Overhaul to console structure, a bit

This commit is contained in:
iikorni
2026-08-30 00:50:23 -05:00
parent de75b014b3
commit 216dd1aecd
70 changed files with 2081 additions and 2260 deletions
+6 -6
View File
@@ -86,7 +86,7 @@ bool SNDDMA_Init (dma_t *dma)
if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
{
Con_Printf("Couldn't init SDL audio: %s\n", SDL_GetError());
console::info("Couldn't init SDL audio: %s\n", SDL_GetError());
return false;
}
@@ -110,7 +110,7 @@ bool SNDDMA_Init (dma_t *dma)
/* Open the audio device */
if (SDL_OpenAudio(&desired, NULL) == -1)
{
Con_Printf("Couldn't open SDL audio: %s\n", SDL_GetError());
console::info("Couldn't open SDL audio: %s\n", SDL_GetError());
SDL_QuitSubSystem(SDL_INIT_AUDIO);
return false;
}
@@ -139,7 +139,7 @@ bool SNDDMA_Init (dma_t *dma)
shm->samplepos = 0;
shm->submission_chunk = 1;
Con_Printf ("SDL audio spec : %d Hz, %d samples, %d channels\n",
console::info ("SDL audio spec : %d Hz, %d samples, %d channels\n",
desired.freq, desired.samples, desired.channels);
#if defined(USE_SDL2)
{
@@ -154,7 +154,7 @@ bool SNDDMA_Init (dma_t *dma)
strcpy(drivername, "(UNKNOWN)");
#endif
buffersize = shm->samples * (shm->samplebits / 8);
Con_Printf ("SDL audio driver: %s, %d bytes buffer\n", drivername, buffersize);
console::info ("SDL audio driver: %s, %d bytes buffer\n", drivername, buffersize);
shm->buffer = (unsigned char *) calloc (1, buffersize);
if (!shm->buffer)
@@ -162,7 +162,7 @@ bool SNDDMA_Init (dma_t *dma)
SDL_CloseAudio();
SDL_QuitSubSystem(SDL_INIT_AUDIO);
shm = NULL;
Con_Printf ("Failed allocating memory for SDL audio\n");
console::info ("Failed allocating memory for SDL audio\n");
return false;
}
@@ -180,7 +180,7 @@ void SNDDMA_Shutdown (void)
{
if (shm)
{
Con_Printf ("Shutting down SDL sound\n");
console::info ("Shutting down SDL sound\n");
SDL_CloseAudio();
SDL_QuitSubSystem(SDL_INIT_AUDIO);
if (shm->buffer)