Un altre punteret a pendre per cul: options
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
#include "logo.h"
|
||||
#include "param.h"
|
||||
#include "options.h"
|
||||
#include <iostream>
|
||||
|
||||
// Constructor
|
||||
Logo::Logo(Screen *screen, Asset *asset, Input *input, options_t *options, section_t *section)
|
||||
Logo::Logo(Screen *screen, Asset *asset, Input *input, section_t *section)
|
||||
{
|
||||
// Copia la dirección de los objetos
|
||||
this->screen = screen;
|
||||
this->asset = asset;
|
||||
this->input = input;
|
||||
this->options = options;
|
||||
this->section = section;
|
||||
SDL_Renderer *renderer = screen->getRenderer();
|
||||
|
||||
@@ -148,10 +148,10 @@ void Logo::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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user