Un altre punteret a pendre per cul: options

This commit is contained in:
2024-09-27 19:00:09 +02:00
parent 0de9188547
commit 20de9e4b72
26 changed files with 677 additions and 679 deletions

View File

@@ -1,8 +1,9 @@
#include "intro.h"
#include "param.h"
#include "options.h"
// Constructor
Intro::Intro(Screen *screen, Asset *asset, Input *input, options_t *options, section_t *section, JA_Music_t *music)
Intro::Intro(Screen *screen, Asset *asset, Input *input, section_t *section, JA_Music_t *music)
{
// Copia los punteros
this->screen = screen;
@@ -228,10 +229,10 @@ void Intro::checkInput()
// Comprueba si se va a activar o desactivar el audio
if (input->checkModInput(input_service, input_mute, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
{
options->audio.sound.enabled = options->audio.music.enabled = !options->audio.music.enabled;
JA_EnableMusic(options->audio.music.enabled);
JA_EnableSound(options->audio.sound.enabled);
screen->showNotification("Audio " + boolToOnOff(options->audio.music.enabled));
options.audio.sound.enabled = options.audio.music.enabled = !options.audio.music.enabled;
JA_EnableMusic(options.audio.music.enabled);
JA_EnableSound(options.audio.sound.enabled);
screen->showNotification("Audio " + boolToOnOff(options.audio.music.enabled));
return;
}
}