Add unloadSDLTTF
call to RSDL destructor
This commit is contained in:
parent
c4f097d6b1
commit
cb6e2efead
|
@ -65,6 +65,7 @@ class RSDL : Renderer {
|
||||||
SDL_DestroyWindow(window);
|
SDL_DestroyWindow(window);
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
|
|
||||||
|
unloadSDLTTF();
|
||||||
unloadSDL();
|
unloadSDL();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,13 @@ import hibis.resources.resource;
|
||||||
import sdl_ttf;
|
import sdl_ttf;
|
||||||
import std.string : toStringz;
|
import std.string : toStringz;
|
||||||
import std.stdio;
|
import std.stdio;
|
||||||
|
import std.format : format;
|
||||||
|
|
||||||
class Font : Resource {
|
class Font : Resource {
|
||||||
this(string path, uint size) {
|
this(string path, uint size) {
|
||||||
const char* nPath = cast(const(char)*)toStringz(path);
|
const char* nPath = cast(const(char)*)toStringz(path);
|
||||||
loadedFont = TTF_OpenFont(nPath, size);
|
loadedFont = TTF_OpenFont(nPath, size);
|
||||||
writeln("Loaded font");
|
writeln(format("Loaded font at '%s'", path));
|
||||||
}
|
}
|
||||||
|
|
||||||
~this() {
|
~this() {
|
||||||
|
|
Loading…
Reference in a new issue