diff --git a/changelog.txt b/changelog.txt index b12b53e7..2bef666f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,5 @@ ---version 2.0.4 yet to be released--- +18-dec-2008 - adelikat - win32 - turbo bypasses sound better if muteturbo is checked 18-dec-2008 - shinydoofy - sdl - fixed compiling errors for SDL due to r1037 18-dec-2008 - adelikat - win32 - fullscreen mode fixed (both enters and returns to fullscreen just fine) 16-dec-2008 - adelikat - win32 - debugger - added "Restore original window size" button diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index c2ca5392..7552d33e 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -692,7 +692,8 @@ doloopy: else { frameSkipCounter--; - skippy = 1; + if (muteTurbo) skippy = 2; //If mute turbo is on, we want to bypass sound too, so set it to 2 + skippy = 1; //Else set it to 1 to just frameskip } } diff --git a/src/fceu.cpp b/src/fceu.cpp index cc8c9aa3..16ba494c 100644 --- a/src/fceu.cpp +++ b/src/fceu.cpp @@ -544,6 +544,8 @@ void UpdateAutosave(void); ///Skip may be passed in, if FRAMESKIP is #defined, to cause this to emulate more than one frame void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int skip) { + //skip initiates frame skip if 1, or frame skip and sound skip if 2 + int r,ssize; JustFrameAdvanced = false; @@ -581,8 +583,8 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski if(geniestage!=1) FCEU_ApplyPeriodicCheats(); r = FCEUPPU_Loop(skip); - ssize=FlushEmulateSound(); - + if (skip != 2) ssize=FlushEmulateSound(); //If skip = 2 we are skipping sound processing + #ifdef WIN32 UpdateCheatList(); UpdateTextHooker(); @@ -594,9 +596,17 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski timestamp = 0; *pXBuf=skip?0:XBuf; - *SoundBuf=WaveFinal; - *SoundBufSize=ssize; - + if (skip == 2) //If skip = 2, then bypass sound + { + *SoundBuf=0; + *SoundBufSize=0; + } + else + { + *SoundBuf=WaveFinal; + *SoundBufSize=ssize; + } + if (EmulationPaused&2 && ( !frameAdvanceLagSkip || !lagFlag) ) //Lots of conditions here. EmulationPaused&2 must be true. In addition frameAdvanceLagSkip or lagFlag must be false {