mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Merge branch 'main' into 12.0-development
This commit is contained in:
@@ -640,20 +640,9 @@ Message *Event::convertWindowEvent(const SDL_Event &e)
|
||||
if (auto audio = Module::getInstance<audio::Audio>(Module::M_AUDIO))
|
||||
{
|
||||
if (e.window.event == SDL_WINDOWEVENT_MINIMIZED)
|
||||
{
|
||||
for (auto &src : pausedSources)
|
||||
src->release();
|
||||
pausedSources = audio->pause();
|
||||
for (auto &src : pausedSources)
|
||||
src->retain();
|
||||
}
|
||||
audio->pauseContext();
|
||||
else if (e.window.event == SDL_WINDOWEVENT_RESTORED)
|
||||
{
|
||||
audio->play(pausedSources);
|
||||
for (auto &src : pausedSources)
|
||||
src->release();
|
||||
pausedSources.resize(0);
|
||||
}
|
||||
audio->resumeContext();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user