AGS: Properly destroy platform driver on exit

This commit is contained in:
Paul Gilbert 2021-08-20 20:36:55 -07:00
parent 34f4cf5ffc
commit d450abb40b
2 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,8 @@ namespace AGS3 {
using AGS::Shared::String;
struct ScummVMPlatformDriver : AGSPlatformDriver {
virtual ~ScummVMPlatformDriver() {}
int CDPlayerCommand(int cmdd, int datt) override;
void DisplayAlert(const char *, ...) override;
const char *GetAllUsersDataDirectory() override;

View File

@ -87,6 +87,7 @@
#include "ags/engine/main/graphics_mode.h"
#include "ags/engine/media/audio/ambient_sound.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/executing_script.h"
#include "ags/engine/script/non_blocking_script_function.h"
@ -359,6 +360,9 @@ Globals::Globals() {
Globals::~Globals() {
g_globals = nullptr;
// ags_platform_driver.cpp globals
delete _platform;
// ags_plugin.cpp globals
delete _glVirtualScreenWrap;