Skip to content

Commit

Permalink
Include SDL_ttf.h in SDL_textengine.h for SDL_Font, fix type redefini…
Browse files Browse the repository at this point in the history
…tion errors
  • Loading branch information
sezero committed Sep 30, 2024
1 parent 9444674 commit 968eef3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
9 changes: 6 additions & 3 deletions include/SDL3_ttf/SDL_textengine.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#define SDL_TTF_TEXTENGINE_H_

#include <SDL3/SDL.h>
#include <SDL3_ttf/SDL_ttf.h>

#include <SDL3/SDL_begin_code.h>

/* Set up for C function definitions, even when using C++ */
Expand All @@ -37,7 +39,7 @@ extern "C" {
#endif

/* Text created with the text engine */
typedef struct TTF_Text TTF_Text;
struct TTF_Text;

/* Private data in TTF_Text, available to implementations */
struct TTF_TextData
Expand Down Expand Up @@ -109,7 +111,7 @@ typedef union TTF_DrawOperation
*
* \sa SDL_INIT_INTERFACE
*/
typedef struct TTF_TextEngine
struct TTF_TextEngine
{
Uint32 version; /**< The version of this interface */

Expand All @@ -132,7 +134,7 @@ typedef struct TTF_TextEngine
*/
void (SDLCALL *DestroyText)(void *userdata, TTF_Text *text);

} TTF_TextEngine;
};

/* Check the size of TTF_TextEngine
*
Expand All @@ -149,6 +151,7 @@ SDL_COMPILE_TIME_ASSERT(TTF_TextEngine_SIZE,
#ifdef __cplusplus
}
#endif

#include <SDL3/SDL_close_code.h>

#endif /* SDL_TTF_TEXTENGINE_H_ */
Expand Down
1 change: 0 additions & 1 deletion src/SDL_hashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/

#include <SDL3/SDL.h>
#include "SDL_hashtable.h"

Expand Down
2 changes: 0 additions & 2 deletions src/SDL_renderer_textengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include <SDL3_ttf/SDL_ttf.h>
#include <SDL3_ttf/SDL_textengine.h>

#include "SDL_hashtable.h"
Expand Down Expand Up @@ -366,4 +365,3 @@ void TTF_DestroyRendererTextEngine(TTF_TextEngine *engine)
engine->CreateText = NULL;
SDL_free(engine);
}

1 change: 0 additions & 1 deletion src/SDL_surface_textengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include <SDL3_ttf/SDL_ttf.h>
#include <SDL3_ttf/SDL_textengine.h>

#include "SDL_hashtable.h"
Expand Down

0 comments on commit 968eef3

Please sign in to comment.