Fix console rendering old strings, refactor audio

Removed duplication of audio buffering code in audio update and streaming
vorbis.
This commit is contained in:
2016-07-27 01:40:22 +10:00
parent 84a0f755ea
commit 9c3df0c488
2 changed files with 10 additions and 19 deletions
+5
View File
@@ -32,8 +32,13 @@ void debug_init(MemoryArena *arena, v2 windowSize, Font font)
void debug_consoleLog(char *string, char *file, int lineNum)
{
i32 maxConsoleStrLen = ARRAY_COUNT(GLOBAL_debug.console[0]);
/* Completely clear out current console line */
for (i32 i = 0; i < maxConsoleStrLen; i++)
GLOBAL_debug.console[GLOBAL_debug.consoleIndex][i] = 0;
i32 strIndex = 0;
i32 fileStrLen = common_strlen(file);
for (i32 count = 0; strIndex < maxConsoleStrLen; strIndex++, count++)