early-access version 1617

This commit is contained in:
pineappleEA
2021-04-20 21:40:33 +02:00
parent 242b6f6b49
commit f46563104f
510 changed files with 141726 additions and 62846 deletions

View File

@@ -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)) {

View File

@@ -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"

View File

@@ -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;

View File

@@ -38,6 +38,7 @@ typedef struct SDL_VideoData
SDL_Rect textRect;
int isPaused;
int isPausing;
int pauseAudio;
} SDL_VideoData;
extern int Android_SurfaceWidth;

View File

@@ -30,7 +30,6 @@
#include "SDL_androidvideo.h"
#include "SDL_androidwindow.h"
#include "SDL_assert.h"
#include "SDL_loadso.h"
#include "SDL_androidvulkan.h"