From 09f9bd81fdf1ce68b0a5bea31adae6fc2985e9c8 Mon Sep 17 00:00:00 2001 From: Bart Trzynadlowski Date: Thu, 9 Feb 2012 17:12:13 +0000 Subject: [PATCH] Fixed left/right stereo channels -- they were reversed by default. --- Src/OSD/SDL/Audio.cpp | 4 ++-- Src/OSD/SDL/Main.cpp | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Src/OSD/SDL/Audio.cpp b/Src/OSD/SDL/Audio.cpp index 686f83f..f134521 100755 --- a/Src/OSD/SDL/Audio.cpp +++ b/Src/OSD/SDL/Audio.cpp @@ -201,16 +201,16 @@ static void MixChannels(unsigned numSamples, INT16 *leftBuffer, INT16 *rightBuff { for (unsigned i = 0; i < numSamples; i++) { - *p++ = rightBuffer[i]; *p++ = leftBuffer[i]; + *p++ = rightBuffer[i]; } } else // stereo as God intended! { for (unsigned i = 0; i < numSamples; i++) { - *p++ = leftBuffer[i]; *p++ = rightBuffer[i]; + *p++ = leftBuffer[i]; } } #endif // NUM_CHANNELS diff --git a/Src/OSD/SDL/Main.cpp b/Src/OSD/SDL/Main.cpp index 7161b6d..325362d 100644 --- a/Src/OSD/SDL/Main.cpp +++ b/Src/OSD/SDL/Main.cpp @@ -24,6 +24,11 @@ * * Main program driver for the SDL port. * + * To Do Before Next Release + * ------------------------- + * - Add UI keys for balance setting? + * - 5.1 audio support? + * * Compile-Time Options * -------------------- * - SUPERMODEL_WIN32: Define this if compiling on Windows. @@ -201,7 +206,13 @@ static bool CreateGLScreen(const char *caption, unsigned *xOffsetPtr, unsigned * glLoadIdentity(); gluPerspective(90.0,(GLfloat)xRes/(GLfloat)yRes,0.1,1e5); glMatrixMode(GL_MODELVIEW); - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); // clear at least once to ensure black border + + // Clear the screen to ensure black border + for (int i = 0; i < 2; i++) + { + glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); + SDL_GL_SwapBuffers(); + } // Write back resolution parameters *xResPtr = (unsigned) xRes;