From 0316809ac980a556aed8e8724207e620543ae3f5 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Thu, 9 Jul 2015 06:25:46 +0000 Subject: [PATCH] Some more changes by Jochen Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3924 --- src/gui/sdlmain.cpp | 6 +++++- src/hardware/mixer.cpp | 7 ++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index bb11162a..5c063057 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -232,6 +232,7 @@ SDL_Surface* SDL_SetVideoMode_Wrap(int width,int height,int bpp,Bit32u flags){ // I don't see a difference, so disabled for now, as the code isn't finished either #if SETMODE_SAVES_CLEAR //TODO clear it. +#ifdef C_OPENGL if ((flags & SDL_OPENGL)==0) SDL_FillRect(sdl.surface,NULL,SDL_MapRGB(sdl.surface->format,0,0,0)); else { @@ -239,7 +240,10 @@ SDL_Surface* SDL_SetVideoMode_Wrap(int width,int height,int bpp,Bit32u flags){ glClear(GL_COLOR_BUFFER_BIT); SDL_GL_SwapBuffers(); } -#endif +#else //C_OPENGL + SDL_FillRect(sdl.surface,NULL,SDL_MapRGB(sdl.surface->format,0,0,0)); +#endif //C_OPENGL +#endif //SETMODE_SAVES_CLEAR return sdl.surface; } diff --git a/src/hardware/mixer.cpp b/src/hardware/mixer.cpp index 0e74a0ce..41ebcc2b 100644 --- a/src/hardware/mixer.cpp +++ b/src/hardware/mixer.cpp @@ -410,11 +410,8 @@ static void MIXER_Mix_NoSound(void) { mixer.tick_remain&=MIXER_REMAIN; mixer.done=0; } -#ifdef OS2 -static void SDL_CALL MIXER_CallBack(void * userdata, Uint8 *stream, int len) { -#else -static void MIXER_CallBack(void * userdata, Uint8 *stream, int len) { -#endif + +static void SDLCALL MIXER_CallBack(void * userdata, Uint8 *stream, int len) { Bitu need=(Bitu)len/MIXER_SSIZE; Bit16s * output=(Bit16s *)stream; Bitu reduce;