Check that SDL_ShowSimpleMessageBox has been bound first

This function can be called before DFSDL is initialized
develop
lethosor 2023-09-21 01:18:56 -04:00
parent aa6c4094c5
commit 3af118dce9
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
1 changed files with 2 additions and 0 deletions

@ -162,6 +162,8 @@ SDL_Surface* DFSDL::DFSDL_CreateRGBSurfaceWithFormat(uint32_t flags, int width,
}
int DFSDL::DFSDL_ShowSimpleMessageBox(uint32_t flags, const char *title, const char *message, SDL_Window *window) {
if (!g_SDL_ShowSimpleMessageBox)
return -1;
return g_SDL_ShowSimpleMessageBox(flags, title, message, window);
}