blob: 4ee65499eda35cffcadc84be726f2ce9e7ccac15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include "FLD.hpp"
#include <SDL2/SDL.h>
FLD::~FLD()
{
soloud.deinit();
for (auto [_, e] : images)
if (e.ptr != nullptr)
SDL_DestroyTexture(e.ptr);
if (_target != nullptr) {
SDL_DestroyTexture(_target);
_target = nullptr;
}
if (_renderer != nullptr) {
SDL_DestroyRenderer(_renderer);
_renderer = nullptr;
}
if (_window != nullptr) {
SDL_DestroyWindow(_window);
_window = nullptr;
}
SDL_Quit();
}
|