Compare commits
2 Commits
958a4d1d99
...
bca688a9a7
| Author | SHA1 | Date | |
|---|---|---|---|
| bca688a9a7 | |||
| ad2d1cbd65 |
@@ -38,6 +38,7 @@ enum inputs_e
|
||||
input_window_dec_size,
|
||||
input_video_shaders,
|
||||
input_reset,
|
||||
input_mute,
|
||||
|
||||
// Input obligatorio
|
||||
input_number_of_inputs
|
||||
|
||||
@@ -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