mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
AGS: Properly destroy platform driver on exit
This commit is contained in:
parent
34f4cf5ffc
commit
d450abb40b
@ -37,6 +37,8 @@ namespace AGS3 {
|
|||||||
using AGS::Shared::String;
|
using AGS::Shared::String;
|
||||||
|
|
||||||
struct ScummVMPlatformDriver : AGSPlatformDriver {
|
struct ScummVMPlatformDriver : AGSPlatformDriver {
|
||||||
|
virtual ~ScummVMPlatformDriver() {}
|
||||||
|
|
||||||
int CDPlayerCommand(int cmdd, int datt) override;
|
int CDPlayerCommand(int cmdd, int datt) override;
|
||||||
void DisplayAlert(const char *, ...) override;
|
void DisplayAlert(const char *, ...) override;
|
||||||
const char *GetAllUsersDataDirectory() override;
|
const char *GetAllUsersDataDirectory() override;
|
||||||
|
@ -87,6 +87,7 @@
|
|||||||
#include "ags/engine/main/graphics_mode.h"
|
#include "ags/engine/main/graphics_mode.h"
|
||||||
#include "ags/engine/media/audio/ambient_sound.h"
|
#include "ags/engine/media/audio/ambient_sound.h"
|
||||||
#include "ags/engine/media/audio/audio_defines.h"
|
#include "ags/engine/media/audio/audio_defines.h"
|
||||||
|
#include "ags/engine/platform/base/ags_platform_driver.h"
|
||||||
#include "ags/engine/script/cc_instance.h"
|
#include "ags/engine/script/cc_instance.h"
|
||||||
#include "ags/engine/script/executing_script.h"
|
#include "ags/engine/script/executing_script.h"
|
||||||
#include "ags/engine/script/non_blocking_script_function.h"
|
#include "ags/engine/script/non_blocking_script_function.h"
|
||||||
@ -359,6 +360,9 @@ Globals::Globals() {
|
|||||||
Globals::~Globals() {
|
Globals::~Globals() {
|
||||||
g_globals = nullptr;
|
g_globals = nullptr;
|
||||||
|
|
||||||
|
// ags_platform_driver.cpp globals
|
||||||
|
delete _platform;
|
||||||
|
|
||||||
// ags_plugin.cpp globals
|
// ags_plugin.cpp globals
|
||||||
delete _glVirtualScreenWrap;
|
delete _glVirtualScreenWrap;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user