[Scummvm-git-logs] scummvm master -> 8ff38d740951fd1bcfcb5b319828735039567154
sev-
sev at scummvm.org
Sun May 10 23:35:10 UTC 2020
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e73fd6b2cd 3DS: Use PauseToken
ecd23a7e20 Android: Use PauseToken
7676efd0d9 Backends: Use PauseToken for showing the vkeyboard
84da618366 PS3: Use PauseToken.
8ff38d7409 PSP: Use PauseToken.
Commit: e73fd6b2cd2bab39552ed8c60f1721e9e92b89ec
https://github.com/scummvm/scummvm/commit/e73fd6b2cd2bab39552ed8c60f1721e9e92b89ec
Author: Henrik "Henke37" Andersson (henke at henke37.cjb.net)
Date: 2020-05-11T01:35:03+02:00
Commit Message:
3DS: Use PauseToken
Changed paths:
backends/platform/3ds/osystem-events.cpp
backends/platform/3ds/osystem.h
diff --git a/backends/platform/3ds/osystem-events.cpp b/backends/platform/3ds/osystem-events.cpp
index 87e7a033f8..525ef15444 100644
--- a/backends/platform/3ds/osystem-events.cpp
+++ b/backends/platform/3ds/osystem-events.cpp
@@ -208,7 +208,7 @@ static void aptHookFunc(APT_HookType hookType, void *param) {
case APTHOOK_ONSUSPEND:
case APTHOOK_ONSLEEP:
if (g_engine) {
- g_engine->pauseEngine(true);
+ osys->_sleepPauseToken = g_engine->pauseEngine();
}
osys->sleeping = true;
if (R_SUCCEEDED(gspLcdInit())) {
@@ -219,7 +219,7 @@ static void aptHookFunc(APT_HookType hookType, void *param) {
case APTHOOK_ONRESTORE:
case APTHOOK_ONWAKEUP:
if (g_engine) {
- g_engine->pauseEngine(false);
+ osys->_sleepPauseToken.clear();
}
osys->sleeping = false;
loadConfig();
diff --git a/backends/platform/3ds/osystem.h b/backends/platform/3ds/osystem.h
index d4fa6e4ed3..127bcd1982 100644
--- a/backends/platform/3ds/osystem.h
+++ b/backends/platform/3ds/osystem.h
@@ -282,6 +282,9 @@ private:
u16 _magX, _magY;
u16 _magWidth, _magHeight;
u16 _magCenterX, _magCenterY;
+
+ // Pause
+ PauseToken _sleepPauseToken;
};
} // namespace _3DS
Commit: ecd23a7e20d6325ec17343e509b6d3d4ea67fd36
https://github.com/scummvm/scummvm/commit/ecd23a7e20d6325ec17343e509b6d3d4ea67fd36
Author: Henrik "Henke37" Andersson (henke at henke37.cjb.net)
Date: 2020-05-11T01:35:03+02:00
Commit Message:
Android: Use PauseToken
Changed paths:
backends/platform/android/jni-android.cpp
backends/platform/android/jni-android.h
diff --git a/backends/platform/android/jni-android.cpp b/backends/platform/android/jni-android.cpp
index b4a4dac6f6..95c5fe5ef5 100644
--- a/backends/platform/android/jni-android.cpp
+++ b/backends/platform/android/jni-android.cpp
@@ -689,7 +689,10 @@ void JNI::setPause(JNIEnv *env, jobject self, jboolean value) {
if (g_engine) {
LOGD("pauseEngine: %d", value);
- g_engine->pauseEngine(value);
+ if (value)
+ _pauseToken = g_engine->pauseEngine(value);
+ else
+ _pauseToken.clear();
/*if (value &&
g_engine->hasFeature(Engine::kSupportsSavingDuringRuntime) &&
diff --git a/backends/platform/android/jni-android.h b/backends/platform/android/jni-android.h
index fe4b948070..f75d1741e9 100644
--- a/backends/platform/android/jni-android.h
+++ b/backends/platform/android/jni-android.h
@@ -139,6 +139,8 @@ private:
static void setPause(JNIEnv *env, jobject self, jboolean value);
static jstring getCurrentCharset(JNIEnv *env, jobject self);
+
+ static PauseToken _pauseToken;
};
inline bool JNI::haveSurface() {
Commit: 7676efd0d97e1a65caa43eaf8775713f07c07404
https://github.com/scummvm/scummvm/commit/7676efd0d97e1a65caa43eaf8775713f07c07404
Author: Henrik "Henke37" Andersson (henke at henke37.cjb.net)
Date: 2020-05-11T01:35:03+02:00
Commit Message:
Backends: Use PauseToken for showing the vkeyboard
Changed paths:
backends/events/default/default-events.cpp
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 8f0e621073..ed7b8b04b9 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -160,11 +160,10 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
if (_vk->isDisplaying()) {
_vk->close(true);
} else {
+ PauseToken pt;
if (g_engine)
- g_engine->pauseEngine(true);
+ pt = g_engine->pauseEngine();
_vk->show();
- if (g_engine)
- g_engine->pauseEngine(false);
forwardEvent = false;
}
break;
Commit: 84da618366b77077c875058881302e79d1f39e23
https://github.com/scummvm/scummvm/commit/84da618366b77077c875058881302e79d1f39e23
Author: Henrik "Henke37" Andersson (henke at henke37.cjb.net)
Date: 2020-05-11T01:35:03+02:00
Commit Message:
PS3: Use PauseToken.
Changed paths:
backends/events/ps3sdl/ps3sdl-events.cpp
diff --git a/backends/events/ps3sdl/ps3sdl-events.cpp b/backends/events/ps3sdl/ps3sdl-events.cpp
index 2aa2adbac6..15fe6407d1 100644
--- a/backends/events/ps3sdl/ps3sdl-events.cpp
+++ b/backends/events/ps3sdl/ps3sdl-events.cpp
@@ -37,9 +37,10 @@
*/
void PS3SdlEventSource::preprocessEvents(SDL_Event *event) {
if (event->type == SDL_APP_DIDENTERBACKGROUND) {
+ PauseToken pt;
// XMB opened
if (g_engine)
- g_engine->pauseEngine(true);
+ pt = g_engine->pauseEngine();
for (;;) {
if (!SDL_PollEvent(event)) {
@@ -56,8 +57,6 @@ void PS3SdlEventSource::preprocessEvents(SDL_Event *event) {
return;
if (event->type == SDL_APP_DIDENTERFOREGROUND) {
// XMB closed
- if (g_engine)
- g_engine->pauseEngine(false);
return;
}
}
Commit: 8ff38d740951fd1bcfcb5b319828735039567154
https://github.com/scummvm/scummvm/commit/8ff38d740951fd1bcfcb5b319828735039567154
Author: Henrik "Henke37" Andersson (henke at henke37.cjb.net)
Date: 2020-05-11T01:35:03+02:00
Commit Message:
PSP: Use PauseToken.
Changed paths:
backends/platform/psp/image_viewer.cpp
backends/platform/psp/image_viewer.h
backends/platform/psp/powerman.cpp
backends/platform/psp/powerman.h
diff --git a/backends/platform/psp/image_viewer.cpp b/backends/platform/psp/image_viewer.cpp
index 8a1a256469..885462c501 100644
--- a/backends/platform/psp/image_viewer.cpp
+++ b/backends/platform/psp/image_viewer.cpp
@@ -136,7 +136,7 @@ void ImageViewer::setVisible(bool visible) {
// from here on, we're making the loader visible
if (visible && g_engine) { // we can only run the image viewer when there's an engine
- g_engine->pauseEngine(true);
+ _pauseToken = g_engine->pauseEngine();
load(_imageNum ? _imageNum : 1); // load the 1st image or the current
}
@@ -157,7 +157,7 @@ void ImageViewer::setVisible(bool visible) {
setViewerButtons(false);
if (g_engine && g_engine->isPaused())
- g_engine->pauseEngine(false);
+ _pauseToken.clear();
}
setDirty();
}
diff --git a/backends/platform/psp/image_viewer.h b/backends/platform/psp/image_viewer.h
index 66b640b6f3..3aec580c89 100644
--- a/backends/platform/psp/image_viewer.h
+++ b/backends/platform/psp/image_viewer.h
@@ -54,6 +54,7 @@ private:
float _visibleHeight, _visibleWidth;
float _centerX, _centerY;
Event _movement;
+ PauseToken _pauseToken;
InputHandler *_inputHandler;
DisplayManager *_displayManager;
diff --git a/backends/platform/psp/powerman.cpp b/backends/platform/psp/powerman.cpp
index a656a37232..6a6266a090 100644
--- a/backends/platform/psp/powerman.cpp
+++ b/backends/platform/psp/powerman.cpp
@@ -121,12 +121,12 @@ void PowerManager::pollPauseEngine() {
if (g_engine) { // Check to see if we have an engine
if (pause && _pauseClientState == UNPAUSED) {
_pauseClientState = PAUSING; // Tell PM we're in the middle of pausing
- g_engine->pauseEngine(true);
PSP_DEBUG_PRINT_FUNC("Pausing engine\n");
+ _pauseToken = g_engine->pauseEngine();
_pauseClientState = PAUSED; // Tell PM we're done pausing
} else if (!pause && _pauseClientState == PAUSED) {
- g_engine->pauseEngine(false);
PSP_DEBUG_PRINT_FUNC("Unpausing for resume\n");
+ _pauseToken.clear();
_pauseClientState = UNPAUSED; // Tell PM we're unpaused
}
}
diff --git a/backends/platform/psp/powerman.h b/backends/platform/psp/powerman.h
index 77cfb26720..de6d264533 100644
--- a/backends/platform/psp/powerman.h
+++ b/backends/platform/psp/powerman.h
@@ -80,6 +80,7 @@ private:
volatile bool _pauseFlag; // For pausing, which is before suspending
volatile bool _pauseFlagOld; // Save the last state of the flag while polling
volatile PauseState _pauseClientState; // Pause state of the target
+ PauseToken _pauseToken;
volatile bool _suspendFlag; // protected variable
PspMutex _flagMutex; // mutex to access access flag
More information about the Scummvm-git-logs
mailing list