billyquith / GWork

Skinnable GUI with useful widget collection. Fork of GWEN.
https://billyquith.github.io/GWork/
Other
218 stars 30 forks source link

TTF_Quit(); crash fix in SDL2Sample.cpp #62

Closed elix22 closed 7 years ago

elix22 commented 7 years ago

Nice work on the SDL port . Anyway to fix this crash just add skin.ReleaseFont(skin.GetDefaultFont());👍 SDL_DestroyWindow(window); SDL_Quit(); skin.ReleaseFont(skin.GetDefaultFont()); TTF_Quit();

One more thing In windows "DefaultSkin.png" and "OpenSans.ttf" will fail to load The following will fix it 👍 `

ifdef _WINDOWS

include

endif

... ...

ifdef _WINDOWS

char * dir = SDL_GetBasePath();
SetCurrentDirectory(dir);

endif

`

billyquith commented 7 years ago

Thanks for the fixes. I put the font clean up one in.

I'd like to put cross-platform fixes in for the resource path. I had similar problems with SFML2. I don't have a Windows setup to test this on at the moment.

billyquith commented 7 years ago

Closing. Mentioned in #66