From af4e8e1717405963ff89a114832d376f937786da Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 9 Mar 2022 00:42:12 +0100 Subject: Changed to use Video's cache invalidation method directly --- Stars45/Sim.cpp | 6 +++--- Stars45/Starshatter.cpp | 9 --------- Stars45/Starshatter.h | 2 -- 3 files changed, 3 insertions(+), 14 deletions(-) (limited to 'Stars45') diff --git a/Stars45/Sim.cpp b/Stars45/Sim.cpp index 3933855..9e193b9 100644 --- a/Stars45/Sim.cpp +++ b/Stars45/Sim.cpp @@ -268,9 +268,9 @@ Sim::UnloadMission() RadioTraffic::DiscardMessages(); // release texture memory for 2D screens: - Starshatter* stars = Starshatter::GetInstance(); - if (stars) - stars->InvalidateTextureCache(); + Video* video = Video::GetInstance(); + if (video) + video->InvalidateCache(); cam_dir = CameraDirector::GetInstance(); if (cam_dir) diff --git a/Stars45/Starshatter.cpp b/Stars45/Starshatter.cpp index 19cbb64..8572169 100644 --- a/Stars45/Starshatter.cpp +++ b/Stars45/Starshatter.cpp @@ -2635,15 +2635,6 @@ Starshatter::SaveVideoConfig(const char* filename) // +--------------------------------------------------------------------+ void -Starshatter::InvalidateTextureCache() -{ - if (video) - video->InvalidateCache(); -} - -// +--------------------------------------------------------------------+ - -void Starshatter::ExecCutscene(const char* msn_file, const char* path) { if (InCutscene() || !msn_file || !*msn_file) return; diff --git a/Stars45/Starshatter.h b/Stars45/Starshatter.h index 41e7ccd..2d26b00 100644 --- a/Stars45/Starshatter.h +++ b/Stars45/Starshatter.h @@ -108,8 +108,6 @@ public: int GetLoadProgress() { return load_progress; } const char* GetLoadActivity() { return load_activity; } - void InvalidateTextureCache(); - int GetChatMode() const { return chat_mode; } void SetChatMode(int c); const char* GetChatText() const { return chat_text.data(); } -- cgit v1.1