mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-14 05:12:25 +08:00
chore: fix segfault after code cleanup
This commit is contained in:
parent
ae66deffb6
commit
d8ddc899fb
@ -375,28 +375,27 @@ void CWallpaperApplication::setupOutput () {
|
||||
new WallpaperEngine::Input::CInputContext (new WallpaperEngine::Input::Drivers::CGLFWMouseInput (
|
||||
reinterpret_cast<Render::Drivers::CGLFWOpenGLDriver*> (m_videoDriver)));
|
||||
}
|
||||
}
|
||||
|
||||
void CWallpaperApplication::setupAudio () {
|
||||
if (this->m_context.settings.audio.audioprocessing) {
|
||||
this->m_audioRecorder = new WallpaperEngine::Audio::Drivers::Recorders::CPulseAudioPlaybackRecorder ();
|
||||
} else {
|
||||
this->m_audioRecorder = new WallpaperEngine::Audio::Drivers::Recorders::CPlaybackRecorder ();
|
||||
}
|
||||
// initialize render context
|
||||
m_renderContext = new WallpaperEngine::Render::CRenderContext (*m_videoDriver, *m_inputContext, *this);
|
||||
}
|
||||
|
||||
void CWallpaperApplication::setupAudio () {
|
||||
// audio playing detector
|
||||
WallpaperEngine::Audio::Drivers::Detectors::CPulseAudioPlayingDetector audioDetector (this->m_context,
|
||||
*this->m_fullScreenDetector);
|
||||
m_audioDetector = new WallpaperEngine::Audio::Drivers::Detectors::CPulseAudioPlayingDetector (this->m_context, *this->m_fullScreenDetector);
|
||||
// initialize sdl audio driver
|
||||
m_audioDriver =
|
||||
new WallpaperEngine::Audio::Drivers::CSDLAudioDriver (this->m_context, audioDetector, *this->m_audioRecorder);
|
||||
new WallpaperEngine::Audio::Drivers::CSDLAudioDriver (this->m_context, *this->m_audioDetector, *this->m_audioRecorder);
|
||||
// initialize audio context
|
||||
m_audioContext = new WallpaperEngine::Audio::CAudioContext (*m_audioDriver);
|
||||
}
|
||||
|
||||
void CWallpaperApplication::prepareOutputs () {
|
||||
// initialize render context
|
||||
m_renderContext = new WallpaperEngine::Render::CRenderContext (*m_videoDriver, *m_inputContext, *this);
|
||||
// create a new background for each screen
|
||||
|
||||
// set all the specific wallpapers required
|
||||
|
@ -129,6 +129,7 @@ class CWallpaperApplication {
|
||||
/** Maps screens to backgrounds */
|
||||
std::map<std::string, Core::CProject*> m_backgrounds;
|
||||
|
||||
WallpaperEngine::Audio::Drivers::Detectors::CAudioPlayingDetector* m_audioDetector;
|
||||
WallpaperEngine::Audio::CAudioContext* m_audioContext;
|
||||
WallpaperEngine::Audio::Drivers::CSDLAudioDriver* m_audioDriver;
|
||||
WallpaperEngine::Audio::Drivers::Recorders::CPlaybackRecorder* m_audioRecorder;
|
||||
|
Loading…
Reference in New Issue
Block a user