X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fsdl%2FInitTTF.cpp;fp=src%2Fsdl%2FInitTTF.cpp;h=5818a7307bfc03f3d44915928c98430e572a71ff;hb=8b4877fe48d21d7e789cf52f81c1d6a87b06bcbc;hp=0000000000000000000000000000000000000000;hpb=42db59e3850c958821e8396fadc20fbeb71050c4;p=sdl-test8.git diff --git a/src/sdl/InitTTF.cpp b/src/sdl/InitTTF.cpp new file mode 100644 index 0000000..5818a73 --- /dev/null +++ b/src/sdl/InitTTF.cpp @@ -0,0 +1,28 @@ +/* + * InitTTF.cpp + * + * Created on: Apr 22, 2012 + * Author: holy + */ + +#include "InitTTF.h" + +#include +#include + +using std::runtime_error; + + +namespace sdl { + +InitTTF::InitTTF(void) { + if (TTF_Init() != 0) { + throw runtime_error("failed to initialize SDL TTF"); + } +} + +InitTTF::~InitTTF(void) { + TTF_Quit(); +} + +}