mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 20:51:14 +00:00
SLUDGE: Close resources properly in stopMovie()
This commit is contained in:
parent
434d82a9bb
commit
a121c1034a
@ -26,6 +26,7 @@
|
||||
#include "sludge/graphics.h"
|
||||
#include "sludge/freeze.h"
|
||||
#include "sludge/function.h"
|
||||
#include "sludge/movie.h"
|
||||
#include "sludge/newfatal.h"
|
||||
#include "sludge/objtypes.h"
|
||||
#include "sludge/region.h"
|
||||
@ -297,6 +298,8 @@ bool EventManager::handleInput() {
|
||||
}
|
||||
|
||||
if (!tempString.empty()) {
|
||||
if (isMoviePlaying())
|
||||
stopMovie();
|
||||
VariableStack *tempStack = new VariableStack;
|
||||
if (!checkNew(tempStack))
|
||||
return false;
|
||||
|
@ -93,9 +93,17 @@ int playMovie(int fileNumber) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
MovieStates isMoviePlaying() {
|
||||
return movieIsPlaying;
|
||||
}
|
||||
|
||||
int stopMovie() {
|
||||
int r = movieIsPlaying;
|
||||
movieIsPlaying = kMovieNothing;
|
||||
|
||||
g_sludge->_resMan->finishAccess();
|
||||
setResourceForFatal(-1);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ extern int movieIsEnding;
|
||||
|
||||
int playMovie(int fileNumber);
|
||||
int stopMovie();
|
||||
MovieStates isMoviePlaying();
|
||||
int pauseMovie();
|
||||
|
||||
} // End of namespace Sludge
|
||||
|
Loading…
x
Reference in New Issue
Block a user