afegida opció per habilitar o deshabilitar el audio desde el teclat. De moment soles desde el joc. En poder ho integraré en jail_audio
This commit is contained in:
@@ -123,6 +123,7 @@ void Director::initInput()
|
||||
input->bindKey(input_window_inc_size, SDL_SCANCODE_F2);
|
||||
input->bindKey(input_window_fullscreen, SDL_SCANCODE_F3);
|
||||
input->bindKey(input_video_shaders, SDL_SCANCODE_F4);
|
||||
input->bindKey(input_mute, SDL_SCANCODE_F5);
|
||||
input->bindKey(input_reset, SDL_SCANCODE_F10);
|
||||
|
||||
const int numGamePads = input->getNumControllers();
|
||||
|
||||
@@ -2137,6 +2137,18 @@ void Game::checkInput()
|
||||
return;
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_mute, DO_NOT_ALLOW_REPEAT))
|
||||
{
|
||||
const bool value = !options->audio.music.enabled;
|
||||
options->audio.music.enabled = value;
|
||||
options->audio.sound.enabled = value;
|
||||
JA_EnableMusic(value);
|
||||
JA_EnableSound(value);
|
||||
const std::string text = value ? "on" : "off";
|
||||
screen->showNotification("Audio " + text);
|
||||
return;
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_pause, DO_NOT_ALLOW_REPEAT))
|
||||
{
|
||||
pause(!paused);
|
||||
|
||||
Reference in New Issue
Block a user