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_Quit();
|
||||
|
||||
unloadSDLTTF();
|
||||
unloadSDL();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,12 +5,13 @@ import hibis.resources.resource;
|
|||
import sdl_ttf;
|
||||
import std.string : toStringz;
|
||||
import std.stdio;
|
||||
import std.format : format;
|
||||
|
||||
class Font : Resource {
|
||||
this(string path, uint size) {
|
||||
const char* nPath = cast(const(char)*)toStringz(path);
|
||||
loadedFont = TTF_OpenFont(nPath, size);
|
||||
writeln("Loaded font");
|
||||
writeln(format("Loaded font at '%s'", path));
|
||||
}
|
||||
|
||||
~this() {
|
||||
|
|
Loading…
Reference in a new issue