early-access version 1617
This commit is contained in:
@@ -175,8 +175,10 @@ Android_PumpEvents_NonBlocking(_THIS)
|
||||
SDL_UnlockMutex(Android_ActivityMutex);
|
||||
}
|
||||
|
||||
ANDROIDAUDIO_PauseDevices();
|
||||
openslES_PauseDevices();
|
||||
if (videodata->pauseAudio) {
|
||||
ANDROIDAUDIO_PauseDevices();
|
||||
openslES_PauseDevices();
|
||||
}
|
||||
|
||||
backup_context = 0;
|
||||
}
|
||||
@@ -191,8 +193,10 @@ Android_PumpEvents_NonBlocking(_THIS)
|
||||
SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND);
|
||||
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESTORED, 0, 0);
|
||||
|
||||
ANDROIDAUDIO_ResumeDevices();
|
||||
openslES_ResumeDevices();
|
||||
if (videodata->pauseAudio) {
|
||||
ANDROIDAUDIO_ResumeDevices();
|
||||
openslES_ResumeDevices();
|
||||
}
|
||||
|
||||
/* Restore the GL Context from here, as this operation is thread dependent */
|
||||
if (!isContextExternal && !SDL_HasEvent(SDL_QUIT)) {
|
||||
|
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_androidtouch.h"
|
||||
#include "../../events/SDL_mouse_c.h"
|
||||
#include "../../events/SDL_touch_c.h"
|
||||
|
@@ -70,12 +70,6 @@ SDL_sem *Android_PauseSem = NULL;
|
||||
SDL_sem *Android_ResumeSem = NULL;
|
||||
SDL_mutex *Android_ActivityMutex = NULL;
|
||||
|
||||
static int
|
||||
Android_Available(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
Android_SuspendScreenSaver(_THIS)
|
||||
{
|
||||
@@ -173,7 +167,7 @@ Android_CreateDevice(int devindex)
|
||||
|
||||
VideoBootStrap Android_bootstrap = {
|
||||
ANDROID_VID_DRIVER_NAME, "SDL Android video driver",
|
||||
Android_Available, Android_CreateDevice
|
||||
Android_CreateDevice
|
||||
};
|
||||
|
||||
|
||||
@@ -187,6 +181,7 @@ Android_VideoInit(_THIS)
|
||||
|
||||
videodata->isPaused = SDL_FALSE;
|
||||
videodata->isPausing = SDL_FALSE;
|
||||
videodata->pauseAudio = SDL_GetHintBoolean(SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO, SDL_TRUE);
|
||||
|
||||
mode.format = Android_ScreenFormat;
|
||||
mode.w = Android_DeviceWidth;
|
||||
|
@@ -38,6 +38,7 @@ typedef struct SDL_VideoData
|
||||
SDL_Rect textRect;
|
||||
int isPaused;
|
||||
int isPausing;
|
||||
int pauseAudio;
|
||||
} SDL_VideoData;
|
||||
|
||||
extern int Android_SurfaceWidth;
|
||||
|
@@ -30,7 +30,6 @@
|
||||
|
||||
#include "SDL_androidvideo.h"
|
||||
#include "SDL_androidwindow.h"
|
||||
#include "SDL_assert.h"
|
||||
|
||||
#include "SDL_loadso.h"
|
||||
#include "SDL_androidvulkan.h"
|
||||
|
Reference in New Issue
Block a user