mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +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;
|
||||
|
||||
@@ -78,10 +78,6 @@ private:
|
||||
static std::map<SDL_Keycode, love::keyboard::Keyboard::Key> createKeyMap();
|
||||
static std::map<SDL_Keycode, love::keyboard::Keyboard::Key> keys;
|
||||
|
||||
#ifdef LOVE_ANDROID
|
||||
std::vector<love::audio::Source*> pausedSources;
|
||||
#endif
|
||||
|
||||
}; // Event
|
||||
|
||||
} // sdl
|
||||
|
||||
Reference in New Issue
Block a user