mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Change m_SoundEnabled
from int
to bool
This commit is contained in:
parent
82425f20d7
commit
757d7d0068
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue