mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 13:11:30 +00:00
Bug 5178 - Sound quality menu option has no effect
This commit is contained in:
parent
bc3e989967
commit
af4607c026
2 changed files with 0 additions and 33 deletions
|
@ -77,7 +77,6 @@ int s_numSfx = 0;
|
||||||
static sfx_t *sfxHash[LOOP_HASH];
|
static sfx_t *sfxHash[LOOP_HASH];
|
||||||
|
|
||||||
cvar_t *s_testsound;
|
cvar_t *s_testsound;
|
||||||
cvar_t *s_khz;
|
|
||||||
cvar_t *s_show;
|
cvar_t *s_show;
|
||||||
cvar_t *s_mixahead;
|
cvar_t *s_mixahead;
|
||||||
cvar_t *s_mixPreStep;
|
cvar_t *s_mixPreStep;
|
||||||
|
@ -1494,7 +1493,6 @@ qboolean S_Base_Init( soundInterface_t *si ) {
|
||||||
return qfalse;
|
return qfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_khz = Cvar_Get ("s_khz", "22", CVAR_ARCHIVE);
|
|
||||||
s_mixahead = Cvar_Get ("s_mixahead", "0.2", CVAR_ARCHIVE);
|
s_mixahead = Cvar_Get ("s_mixahead", "0.2", CVAR_ARCHIVE);
|
||||||
s_mixPreStep = Cvar_Get ("s_mixPreStep", "0.05", CVAR_ARCHIVE);
|
s_mixPreStep = Cvar_Get ("s_mixPreStep", "0.05", CVAR_ARCHIVE);
|
||||||
s_show = Cvar_Get ("s_show", "0", CVAR_CHEAT);
|
s_show = Cvar_Get ("s_show", "0", CVAR_CHEAT);
|
||||||
|
|
|
@ -42,15 +42,10 @@ SOUND OPTIONS MENU
|
||||||
#define ID_NETWORK 13
|
#define ID_NETWORK 13
|
||||||
#define ID_EFFECTSVOLUME 14
|
#define ID_EFFECTSVOLUME 14
|
||||||
#define ID_MUSICVOLUME 15
|
#define ID_MUSICVOLUME 15
|
||||||
#define ID_QUALITY 16
|
|
||||||
//#define ID_A3D 17
|
//#define ID_A3D 17
|
||||||
#define ID_BACK 18
|
#define ID_BACK 18
|
||||||
|
|
||||||
|
|
||||||
static const char *quality_items[] = {
|
|
||||||
"Low", "High", NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
menuframework_s menu;
|
menuframework_s menu;
|
||||||
|
|
||||||
|
@ -65,7 +60,6 @@ typedef struct {
|
||||||
|
|
||||||
menuslider_s sfxvolume;
|
menuslider_s sfxvolume;
|
||||||
menuslider_s musicvolume;
|
menuslider_s musicvolume;
|
||||||
menulist_s quality;
|
|
||||||
// menuradiobutton_s a3d;
|
// menuradiobutton_s a3d;
|
||||||
|
|
||||||
menubitmap_s back;
|
menubitmap_s back;
|
||||||
|
@ -110,19 +104,6 @@ static void UI_SoundOptionsMenu_Event( void* ptr, int event ) {
|
||||||
case ID_MUSICVOLUME:
|
case ID_MUSICVOLUME:
|
||||||
trap_Cvar_SetValue( "s_musicvolume", soundOptionsInfo.musicvolume.curvalue / 10 );
|
trap_Cvar_SetValue( "s_musicvolume", soundOptionsInfo.musicvolume.curvalue / 10 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_QUALITY:
|
|
||||||
if( soundOptionsInfo.quality.curvalue ) {
|
|
||||||
trap_Cvar_SetValue( "s_khz", 22 );
|
|
||||||
trap_Cvar_SetValue( "s_compression", 0 );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
trap_Cvar_SetValue( "s_khz", 11 );
|
|
||||||
trap_Cvar_SetValue( "s_compression", 1 );
|
|
||||||
}
|
|
||||||
UI_ForceMenuOff();
|
|
||||||
trap_Cmd_ExecuteText( EXEC_APPEND, "snd_restart\n" );
|
|
||||||
break;
|
|
||||||
/*
|
/*
|
||||||
case ID_A3D:
|
case ID_A3D:
|
||||||
if( soundOptionsInfo.a3d.curvalue ) {
|
if( soundOptionsInfo.a3d.curvalue ) {
|
||||||
|
@ -240,16 +221,6 @@ static void UI_SoundOptionsMenu_Init( void ) {
|
||||||
soundOptionsInfo.musicvolume.generic.y = y;
|
soundOptionsInfo.musicvolume.generic.y = y;
|
||||||
soundOptionsInfo.musicvolume.minvalue = 0;
|
soundOptionsInfo.musicvolume.minvalue = 0;
|
||||||
soundOptionsInfo.musicvolume.maxvalue = 10;
|
soundOptionsInfo.musicvolume.maxvalue = 10;
|
||||||
|
|
||||||
y += BIGCHAR_HEIGHT+2;
|
|
||||||
soundOptionsInfo.quality.generic.type = MTYPE_SPINCONTROL;
|
|
||||||
soundOptionsInfo.quality.generic.name = "Sound Quality:";
|
|
||||||
soundOptionsInfo.quality.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
|
|
||||||
soundOptionsInfo.quality.generic.callback = UI_SoundOptionsMenu_Event;
|
|
||||||
soundOptionsInfo.quality.generic.id = ID_QUALITY;
|
|
||||||
soundOptionsInfo.quality.generic.x = 400;
|
|
||||||
soundOptionsInfo.quality.generic.y = y;
|
|
||||||
soundOptionsInfo.quality.itemnames = quality_items;
|
|
||||||
/*
|
/*
|
||||||
y += BIGCHAR_HEIGHT+2;
|
y += BIGCHAR_HEIGHT+2;
|
||||||
soundOptionsInfo.a3d.generic.type = MTYPE_RADIOBUTTON;
|
soundOptionsInfo.a3d.generic.type = MTYPE_RADIOBUTTON;
|
||||||
|
@ -280,13 +251,11 @@ static void UI_SoundOptionsMenu_Init( void ) {
|
||||||
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.network );
|
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.network );
|
||||||
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.sfxvolume );
|
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.sfxvolume );
|
||||||
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.musicvolume );
|
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.musicvolume );
|
||||||
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.quality );
|
|
||||||
// Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.a3d );
|
// Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.a3d );
|
||||||
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.back );
|
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.back );
|
||||||
|
|
||||||
soundOptionsInfo.sfxvolume.curvalue = trap_Cvar_VariableValue( "s_volume" ) * 10;
|
soundOptionsInfo.sfxvolume.curvalue = trap_Cvar_VariableValue( "s_volume" ) * 10;
|
||||||
soundOptionsInfo.musicvolume.curvalue = trap_Cvar_VariableValue( "s_musicvolume" ) * 10;
|
soundOptionsInfo.musicvolume.curvalue = trap_Cvar_VariableValue( "s_musicvolume" ) * 10;
|
||||||
soundOptionsInfo.quality.curvalue = !trap_Cvar_VariableValue( "s_compression" );
|
|
||||||
// soundOptionsInfo.a3d.curvalue = (int)trap_Cvar_VariableValue( "s_usingA3D" );
|
// soundOptionsInfo.a3d.curvalue = (int)trap_Cvar_VariableValue( "s_usingA3D" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue