Change m_SoundEnabled from int to bool

This commit is contained in:
Robert Müller 2022-06-26 22:00:18 +02:00
parent 82425f20d7
commit 757d7d0068
2 changed files with 4 additions and 4 deletions

View file

@ -277,7 +277,7 @@ static void SdlCallback(void *pUnused, Uint8 *pStream, int Len)
int CSound::Init()
{
m_SoundEnabled = 0;
m_SoundEnabled = false;
m_pGraphics = Kernel()->RequestInterface<IEngineGraphics>();
m_pStorage = Kernel()->RequestInterface<IStorage>();
@ -321,7 +321,7 @@ int CSound::Init()
SDL_PauseAudioDevice(m_Device, 0);
m_SoundEnabled = 1;
m_SoundEnabled = true;
Update(); // update the volume
return 0;
}

View file

@ -13,7 +13,7 @@ class IStorage;
class CSound : public IEngineSound
{
int m_SoundEnabled;
bool m_SoundEnabled;
SDL_AudioDeviceID m_Device;
public:
@ -32,7 +32,7 @@ public:
static int DecodeWV(int SampleID, const void *pData, unsigned DataSize);
static int DecodeOpus(int SampleID, const void *pData, unsigned DataSize);
bool IsSoundEnabled() override { return m_SoundEnabled != 0; }
bool IsSoundEnabled() override { return m_SoundEnabled; }
int LoadWV(const char *pFilename) override;
int LoadWVFromMem(const void *pData, unsigned DataSize, bool FromEditor) override;