mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-14 13:22:23 +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 (
|
new WallpaperEngine::Input::CInputContext (new WallpaperEngine::Input::Drivers::CGLFWMouseInput (
|
||||||
reinterpret_cast<Render::Drivers::CGLFWOpenGLDriver*> (m_videoDriver)));
|
reinterpret_cast<Render::Drivers::CGLFWOpenGLDriver*> (m_videoDriver)));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CWallpaperApplication::setupAudio () {
|
||||||
if (this->m_context.settings.audio.audioprocessing) {
|
if (this->m_context.settings.audio.audioprocessing) {
|
||||||
this->m_audioRecorder = new WallpaperEngine::Audio::Drivers::Recorders::CPulseAudioPlaybackRecorder ();
|
this->m_audioRecorder = new WallpaperEngine::Audio::Drivers::Recorders::CPulseAudioPlaybackRecorder ();
|
||||||
} else {
|
} else {
|
||||||
this->m_audioRecorder = new WallpaperEngine::Audio::Drivers::Recorders::CPlaybackRecorder ();
|
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
|
// audio playing detector
|
||||||
WallpaperEngine::Audio::Drivers::Detectors::CPulseAudioPlayingDetector audioDetector (this->m_context,
|
m_audioDetector = new WallpaperEngine::Audio::Drivers::Detectors::CPulseAudioPlayingDetector (this->m_context, *this->m_fullScreenDetector);
|
||||||
*this->m_fullScreenDetector);
|
|
||||||
// initialize sdl audio driver
|
// initialize sdl audio driver
|
||||||
m_audioDriver =
|
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
|
// initialize audio context
|
||||||
m_audioContext = new WallpaperEngine::Audio::CAudioContext (*m_audioDriver);
|
m_audioContext = new WallpaperEngine::Audio::CAudioContext (*m_audioDriver);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWallpaperApplication::prepareOutputs () {
|
void CWallpaperApplication::prepareOutputs () {
|
||||||
|
// initialize render context
|
||||||
|
m_renderContext = new WallpaperEngine::Render::CRenderContext (*m_videoDriver, *m_inputContext, *this);
|
||||||
// create a new background for each screen
|
// create a new background for each screen
|
||||||
|
|
||||||
// set all the specific wallpapers required
|
// set all the specific wallpapers required
|
||||||
|
@ -129,6 +129,7 @@ class CWallpaperApplication {
|
|||||||
/** Maps screens to backgrounds */
|
/** Maps screens to backgrounds */
|
||||||
std::map<std::string, Core::CProject*> m_backgrounds;
|
std::map<std::string, Core::CProject*> m_backgrounds;
|
||||||
|
|
||||||
|
WallpaperEngine::Audio::Drivers::Detectors::CAudioPlayingDetector* m_audioDetector;
|
||||||
WallpaperEngine::Audio::CAudioContext* m_audioContext;
|
WallpaperEngine::Audio::CAudioContext* m_audioContext;
|
||||||
WallpaperEngine::Audio::Drivers::CSDLAudioDriver* m_audioDriver;
|
WallpaperEngine::Audio::Drivers::CSDLAudioDriver* m_audioDriver;
|
||||||
WallpaperEngine::Audio::Drivers::Recorders::CPlaybackRecorder* m_audioRecorder;
|
WallpaperEngine::Audio::Drivers::Recorders::CPlaybackRecorder* m_audioRecorder;
|
||||||
|
Loading…
Reference in New Issue
Block a user