Merge branch 'main' into 12.0-development

This commit is contained in:
slime
2022-10-10 14:35:52 -03:00
4 changed files with 51 additions and 18 deletions
+2 -13
View File
@@ -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;
-4
View File
@@ -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