Mute Turbo option in sound config dialog (still need to resolve conflict with turbo toggle hotkey)

This commit is contained in:
adelikat 2008-08-07 16:50:37 +00:00
parent 7d03ee4fc9
commit 20998006a7
8 changed files with 25 additions and 6 deletions

View File

@ -1,5 +1,6 @@
---version 2.0.2 released---
07-aug-2008 - adelikat - added a mute turbo option in sound config
07-aug-2008 - adelikat - new toggle - frame adv. - lag skip (menu item + hotkey mapping + saved in config)
07-aug-2008 - adelikat - put in -32000 protection on all dialogs that remember x,y
06-aug-2008 - adelikat - change config filename from fceu98.cfg to fceux.cfg

View File

@ -116,6 +116,7 @@ static CFGSTRUCT fceuconfig[] = {
AC(soundoptions),
AC(soundquality),
AC(soundvolume),
AC(muteTurbo),
AC(goptions),
NAC("eoptions",eoptions),

View File

@ -33,11 +33,12 @@
#include "fceu.h"
#include "movie.h"
#include "window.h"
#include "sound.h"
#include "keyscan.h"
LPDIRECTINPUT7 lpDI=0;
//UsrInputType[] is user-specified. InputType[] is current
// (game/savestate/movie loading can override user settings)
@ -1441,8 +1442,16 @@ int FCEUD_TestCommandState(int c)
return keys[cmdmask] ? 1 : 0;
}
void FCEUD_TurboOn (void) { turbo = true; }
void FCEUD_TurboOff (void) { turbo = false; }
void FCEUD_TurboOn (void)
{
turbo = true;
if (muteTurbo) TrashSound();
}
void FCEUD_TurboOff (void)
{
turbo = false;
if (muteTurbo) InitSound();
}
void FCEUD_TurboToggle(void) { turbo = !turbo; }
void FCEUI_UseInputPreset(int preset)

View File

@ -74,6 +74,7 @@ extern int soundrate;
extern int soundbuftime;
extern int soundvolume;
extern int soundquality;
extern bool muteTurbo;
extern uint8 cpalette[192];
extern int srendlinen;

View File

@ -674,8 +674,9 @@ BEGIN
COMBOBOX COMBO_SOUND_RATE,57,78,53,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX COMBO_SOUND_QUALITY,57,54,77,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Quality:",65455,17,54,35,10
CONTROL "Mute frame advance.",CHECK_SOUND_MUTEFA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,110,117,11
CONTROL "Mute frame advance.",CHECK_SOUND_MUTEFA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,110,87,11
CTEXT "(disabled until config system change)",65462,156,57,120,8
CONTROL "Mute Turbo.",CHECK_SOUND_MUTETURBO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,111,55,10
END
TIMINGCONFIG DIALOGEX 23, 157, 203, 60

View File

@ -357,6 +357,8 @@
#define IDC_EDIT1 1147
#define IDC_BUTTON9 1148
#define IDC_LIST2 1149
#define SOUND_MUTETURBO 1179
#define CHECK_SOUND_MUTETURBO 1179
#define MENU_NETWORK 40040
#define MENU_PALETTE 40041
#define MENU_SOUND 40042
@ -527,7 +529,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 124
#define _APS_NEXT_COMMAND_VALUE 40240
#define _APS_NEXT_CONTROL_VALUE 1179
#define _APS_NEXT_CONTROL_VALUE 1180
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@ -36,7 +36,7 @@ static int bits;
#include "oakra.h"
OAKRA_Module_OutputDS *dsout;
bool muteTurbo=false;
//manages a set of small buffers which together work as one large buffer capable of resizing itsself and
//shrinking when a larger buffer is no longer necessary
class BufferSet {
@ -538,6 +538,9 @@ case WM_COMMAND:
}
break;
#endif
case CHECK_SOUND_MUTETURBO:
muteTurbo ^= 1;
break;
case CHECK_SOUND_ENABLED:soundo=!soundo;
if(!soundo) TrashSound();
else soundo=InitSound();

View File

@ -6,3 +6,4 @@ void TrashSound();
void win_SoundSetScale(int scale);
void win_SoundWriteData(int32 *buffer, int count);
void win_Throttle();
extern bool muteTurbo;