mirror of
https://github.com/Oibaf66/fbzx-wii.git
synced 2024-11-24 17:16:57 +01:00
Added GUI volume setting
This commit is contained in:
parent
c69af76e53
commit
91da875796
@ -142,7 +142,7 @@ void computer_init () { //Called only on start-up
|
|||||||
ordenador.ay_emul = 0;
|
ordenador.ay_emul = 0;
|
||||||
ordenador.fuller_box_sound = 0;
|
ordenador.fuller_box_sound = 0;
|
||||||
ordenador.currah_active = 0;
|
ordenador.currah_active = 0;
|
||||||
ordenador.gui_sound = 1;
|
ordenador.gui_volume = 3;
|
||||||
ordenador.aych_a = 0;
|
ordenador.aych_a = 0;
|
||||||
ordenador.aych_b = 0;
|
ordenador.aych_b = 0;
|
||||||
ordenador.aych_c = 0;
|
ordenador.aych_c = 0;
|
||||||
|
@ -141,7 +141,7 @@ struct computer {
|
|||||||
unsigned char ay_emul; // 0: no AY emulation; 1: AY emulation
|
unsigned char ay_emul; // 0: no AY emulation; 1: AY emulation
|
||||||
unsigned char fuller_box_sound; // 0: no AY emulation; 1: AY emulation
|
unsigned char fuller_box_sound; // 0: no AY emulation; 1: AY emulation
|
||||||
unsigned char audio_mode; //mono, ABC, ACB, BAC
|
unsigned char audio_mode; //mono, ABC, ACB, BAC
|
||||||
unsigned char gui_sound;
|
unsigned int gui_volume;
|
||||||
unsigned int vol_a,vol_b,vol_c;
|
unsigned int vol_a,vol_b,vol_c;
|
||||||
unsigned int tst_ay;
|
unsigned int tst_ay;
|
||||||
unsigned int ay_latch;
|
unsigned int ay_latch;
|
||||||
|
@ -773,7 +773,7 @@ int save_config(struct computer *object, char *filename) {
|
|||||||
fprintf(fconfig,"fuller_box_sound=%c%c",48+object->fuller_box_sound,10);
|
fprintf(fconfig,"fuller_box_sound=%c%c",48+object->fuller_box_sound,10);
|
||||||
fprintf(fconfig,"currah_microspeech=%c%c",48+object->currah_active,10);
|
fprintf(fconfig,"currah_microspeech=%c%c",48+object->currah_active,10);
|
||||||
fprintf(fconfig,"audio_mode=%c%c",48+object->audio_mode,10);
|
fprintf(fconfig,"audio_mode=%c%c",48+object->audio_mode,10);
|
||||||
fprintf(fconfig,"gui_sound=%c%c",48+object->gui_sound,10);
|
fprintf(fconfig,"gui_volume=%c%c",48+object->gui_volume,10);
|
||||||
fprintf(fconfig,"interface1=%c%c",48+object->mdr_active,10);
|
fprintf(fconfig,"interface1=%c%c",48+object->mdr_active,10);
|
||||||
fprintf(fconfig,"doublescan=%c%c",48+object->dblscan,10);
|
fprintf(fconfig,"doublescan=%c%c",48+object->dblscan,10);
|
||||||
fprintf(fconfig,"framerate=%c%c",48+jump_frames,10);
|
fprintf(fconfig,"framerate=%c%c",48+jump_frames,10);
|
||||||
@ -962,7 +962,7 @@ int load_config(struct computer *object, char *filename) {
|
|||||||
unsigned char volume=255,mode128k=255,issue=255,ntsc=255, joystick1=255,joystick2=255,ay_emul=255,mdr_active=255,
|
unsigned char volume=255,mode128k=255,issue=255,ntsc=255, joystick1=255,joystick2=255,ay_emul=255,mdr_active=255,
|
||||||
dblscan=255,framerate =255, screen =255, text=255, precision=255, bw=255, tap_fast=255, audio_mode=255,
|
dblscan=255,framerate =255, screen =255, text=255, precision=255, bw=255, tap_fast=255, audio_mode=255,
|
||||||
joypad1=255, joypad2=255, rumble1=255, rumble2=255, joy_n=255, key_n=255, port=255, autoconf=255, turbo=225, vk_auto=255, vk_rumble=255,
|
joypad1=255, joypad2=255, rumble1=255, rumble2=255, joy_n=255, key_n=255, port=255, autoconf=255, turbo=225, vk_auto=255, vk_rumble=255,
|
||||||
rewind_on_reset=255, pause_instant_load =255, ignore_z80_joy_conf=255, gui_sound=255, fuller_box_sound=255, currah_active = 255, se_basic =255;
|
rewind_on_reset=255, pause_instant_load =255, ignore_z80_joy_conf=255, gui_volume=255, fuller_box_sound=255, currah_active = 255, se_basic =255;
|
||||||
|
|
||||||
if (filename) strcpy(config_path,filename);
|
if (filename) strcpy(config_path,filename);
|
||||||
else return -2;
|
else return -2;
|
||||||
@ -1036,8 +1036,8 @@ int load_config(struct computer *object, char *filename) {
|
|||||||
audio_mode=line[11]-'0';
|
audio_mode=line[11]-'0';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!strncmp(line,"gui_sound=",10)) {
|
if (!strncmp(line,"gui_volume=",11)) {
|
||||||
gui_sound=line[10]-'0';
|
gui_volume=line[11]-'0';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!strncmp(line,"interface1=",11)) {
|
if (!strncmp(line,"interface1=",11)) {
|
||||||
@ -1162,8 +1162,8 @@ int load_config(struct computer *object, char *filename) {
|
|||||||
if (audio_mode<4) {
|
if (audio_mode<4) {
|
||||||
object->audio_mode=audio_mode;
|
object->audio_mode=audio_mode;
|
||||||
}
|
}
|
||||||
if (gui_sound<2) {
|
if (gui_volume<6) {
|
||||||
object->gui_sound=gui_sound;
|
object->gui_volume=gui_volume;
|
||||||
}
|
}
|
||||||
if (mdr_active<2) {
|
if (mdr_active<2) {
|
||||||
object->mdr_active=mdr_active;
|
object->mdr_active=mdr_active;
|
||||||
|
@ -124,8 +124,8 @@ static const char *audio_messages[] = {
|
|||||||
/*07*/ "^|on|off",
|
/*07*/ "^|on|off",
|
||||||
/*08*/ "Audio mode",
|
/*08*/ "Audio mode",
|
||||||
/*09*/ "^|mono|ABC|ACB|BAC",
|
/*09*/ "^|mono|ABC|ACB|BAC",
|
||||||
/*10*/ "Gui sound",
|
/*10*/ "Gui Volume",
|
||||||
/*11*/ "^|on|off",
|
/*11*/ "^|0|1|2|3|4|5",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -723,7 +723,7 @@ static int audio_settings(void)
|
|||||||
submenus[2] = !ordenador.fuller_box_sound;
|
submenus[2] = !ordenador.fuller_box_sound;
|
||||||
submenus[3] = !ordenador.currah_active;
|
submenus[3] = !ordenador.currah_active;
|
||||||
submenus[4] = ordenador.audio_mode;
|
submenus[4] = ordenador.audio_mode;
|
||||||
submenus[5] = !ordenador.gui_sound;
|
submenus[5] = ordenador.gui_volume;
|
||||||
|
|
||||||
old_submenus_3 = submenus[3];
|
old_submenus_3 = submenus[3];
|
||||||
|
|
||||||
@ -739,7 +739,7 @@ static int audio_settings(void)
|
|||||||
else if (ordenador.currah_rom_unavailable) {ordenador.currah_active=0; msgInfo("currah.rom not present", 3000, NULL);}
|
else if (ordenador.currah_rom_unavailable) {ordenador.currah_active=0; msgInfo("currah.rom not present", 3000, NULL);}
|
||||||
else ordenador.currah_active = !submenus[3];
|
else ordenador.currah_active = !submenus[3];
|
||||||
ordenador.audio_mode = submenus[4];
|
ordenador.audio_mode = submenus[4];
|
||||||
ordenador.gui_sound = !submenus[5];
|
ordenador.gui_volume = submenus[5];
|
||||||
|
|
||||||
if (old_submenus_3 == ordenador.currah_active) {ResetComputer(); retorno = -2;}
|
if (old_submenus_3 == ordenador.currah_active) {ResetComputer(); retorno = -2;}
|
||||||
|
|
||||||
|
@ -1620,12 +1620,12 @@ int menu_is_inited(void)
|
|||||||
//Sound must be reseted before calling this function (except for ASND)
|
//Sound must be reseted before calling this function (except for ASND)
|
||||||
void play_click(int sound)
|
void play_click(int sound)
|
||||||
{
|
{
|
||||||
if (!ordenador.gui_sound) return;
|
if (!ordenador.gui_volume) return;
|
||||||
#ifdef GEKKO
|
#ifdef GEKKO
|
||||||
if (sound_type == SOUND_ASND)
|
if (sound_type == SOUND_ASND)
|
||||||
{
|
{
|
||||||
ASND_SetVoice(2,VOICE_STEREO_16BIT_BE,ordenador.freq,0, click_buffer_pointer[sound],len_click_buffer[sound],
|
ASND_SetVoice(2,VOICE_STEREO_16BIT_BE,ordenador.freq,0, click_buffer_pointer[sound],len_click_buffer[sound],
|
||||||
255, 255, NULL);
|
ordenador.gui_volume*51, ordenador.gui_volume*51, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user