Skip to content

Commit 6d33993

Browse files
maia-sslouken
authored andcommitted
Add missing property type suffixes
1 parent 4dbfe74 commit 6d33993

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

include/SDL3_ttf/SDL_ttf.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ extern SDL_DECLSPEC TTF_Font * SDLCALL TTF_OpenFontIO(SDL_IOStream *src, bool cl
187187
* - `TTF_PROP_FONT_CREATE_FILENAME_STRING`: the font file to open, if an
188188
* SDL_IOStream isn't being used. This is required if
189189
* `TTF_PROP_FONT_CREATE_IOSTREAM_POINTER` and
190-
* `TTF_PROP_FONT_CREATE_EXISTING_FONT` aren't set.
190+
* `TTF_PROP_FONT_CREATE_EXISTING_FONT_POINTER` aren't set.
191191
* - `TTF_PROP_FONT_CREATE_IOSTREAM_POINTER`: an SDL_IOStream containing the
192192
* font to be opened. This should not be closed until the font is closed.
193193
* This is required if `TTF_PROP_FONT_CREATE_FILENAME_STRING` and
194-
* `TTF_PROP_FONT_CREATE_EXISTING_FONT` aren't set.
194+
* `TTF_PROP_FONT_CREATE_EXISTING_FONT_POINTER` aren't set.
195195
* - `TTF_PROP_FONT_CREATE_IOSTREAM_OFFSET_NUMBER`: the offset in the iostream
196196
* for the beginning of the font, defaults to 0.
197197
* - `TTF_PROP_FONT_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN`: true if closing the
@@ -208,7 +208,7 @@ extern SDL_DECLSPEC TTF_Font * SDLCALL TTF_OpenFontIO(SDL_IOStream *src, bool cl
208208
* - `TTF_PROP_FONT_CREATE_VERTICAL_DPI_NUMBER`: the vertical DPI to use for
209209
* font rendering, defaults to `TTF_PROP_FONT_CREATE_HORIZONTAL_DPI_NUMBER`
210210
* if set, or 72 otherwise.
211-
* - `TTF_PROP_FONT_CREATE_EXISTING_FONT`: an optional TTF_Font that, if set,
211+
* - `TTF_PROP_FONT_CREATE_EXISTING_FONT_POINTER`: an optional TTF_Font that, if set,
212212
* will be used as the font data source and the initial size and style of
213213
* the new font.
214214
*
@@ -232,7 +232,7 @@ extern SDL_DECLSPEC TTF_Font * SDLCALL TTF_OpenFontWithProperties(SDL_Properties
232232
#define TTF_PROP_FONT_CREATE_FACE_NUMBER "SDL_ttf.font.create.face"
233233
#define TTF_PROP_FONT_CREATE_HORIZONTAL_DPI_NUMBER "SDL_ttf.font.create.hdpi"
234234
#define TTF_PROP_FONT_CREATE_VERTICAL_DPI_NUMBER "SDL_ttf.font.create.vdpi"
235-
#define TTF_PROP_FONT_CREATE_EXISTING_FONT "SDL_ttf.font.create.existing_font"
235+
#define TTF_PROP_FONT_CREATE_EXISTING_FONT_POINTER "SDL_ttf.font.create.existing_font"
236236

237237
/**
238238
* Create a copy of an existing font.
@@ -1813,9 +1813,9 @@ extern SDL_DECLSPEC TTF_TextEngine * SDLCALL TTF_CreateRendererTextEngine(SDL_Re
18131813
*
18141814
* These are the supported properties:
18151815
*
1816-
* - `TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER`: the renderer to use for
1816+
* - `TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER_POINTER`: the renderer to use for
18171817
* creating textures and drawing text
1818-
* - `TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE`: the size of the
1818+
* - `TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER`: the size of the
18191819
* texture atlas
18201820
*
18211821
* \param props the properties to use.
@@ -1833,8 +1833,8 @@ extern SDL_DECLSPEC TTF_TextEngine * SDLCALL TTF_CreateRendererTextEngine(SDL_Re
18331833
*/
18341834
extern SDL_DECLSPEC TTF_TextEngine * SDLCALL TTF_CreateRendererTextEngineWithProperties(SDL_PropertiesID props);
18351835

1836-
#define TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER "SDL_ttf.renderer_text_engine.create.renderer"
1837-
#define TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE "SDL_ttf.renderer_text_engine.create.atlas_texture_size"
1836+
#define TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER_POINTER "SDL_ttf.renderer_text_engine.create.renderer"
1837+
#define TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER "SDL_ttf.renderer_text_engine.create.atlas_texture_size"
18381838

18391839
/**
18401840
* Draw text to an SDL renderer.
@@ -1904,9 +1904,9 @@ extern SDL_DECLSPEC TTF_TextEngine * SDLCALL TTF_CreateGPUTextEngine(SDL_GPUDevi
19041904
*
19051905
* These are the supported properties:
19061906
*
1907-
* - `TTF_PROP_GPU_TEXT_ENGINE_DEVICE`: the SDL_GPUDevice to use for creating
1907+
* - `TTF_PROP_GPU_TEXT_ENGINE_DEVICE_POINTER`: the SDL_GPUDevice to use for creating
19081908
* textures and drawing text.
1909-
* - `TTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE`: the size of the texture
1909+
* - `TTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER`: the size of the texture
19101910
* atlas
19111911
*
19121912
* \param props the properties to use.
@@ -1924,8 +1924,8 @@ extern SDL_DECLSPEC TTF_TextEngine * SDLCALL TTF_CreateGPUTextEngine(SDL_GPUDevi
19241924
*/
19251925
extern SDL_DECLSPEC TTF_TextEngine * SDLCALL TTF_CreateGPUTextEngineWithProperties(SDL_PropertiesID props);
19261926

1927-
#define TTF_PROP_GPU_TEXT_ENGINE_DEVICE "SDL_ttf.gpu_text_engine.create.device"
1928-
#define TTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE "SDL_ttf.gpu_text_engine.create.atlas_texture_size"
1927+
#define TTF_PROP_GPU_TEXT_ENGINE_DEVICE_POINTER "SDL_ttf.gpu_text_engine.create.device"
1928+
#define TTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER "SDL_ttf.gpu_text_engine.create.atlas_texture_size"
19291929

19301930
/**
19311931
* Draw sequence returned by TTF_GetGPUTextDrawData

src/SDL_gpu_textengine.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -960,14 +960,14 @@ TTF_TextEngine *TTF_CreateGPUTextEngine(SDL_GPUDevice *device)
960960
SDL_SetError("Failed to create GPU text engine.");
961961
return NULL;
962962
}
963-
SDL_SetPointerProperty(props, TTF_PROP_GPU_TEXT_ENGINE_DEVICE, device);
963+
SDL_SetPointerProperty(props, TTF_PROP_GPU_TEXT_ENGINE_DEVICE_POINTER, device);
964964

965965
return TTF_CreateGPUTextEngineWithProperties(props);
966966
}
967967

968968
TTF_TextEngine *TTF_CreateGPUTextEngineWithProperties(SDL_PropertiesID props)
969969
{
970-
SDL_GPUDevice *device = SDL_GetPointerProperty(props, TTF_PROP_GPU_TEXT_ENGINE_DEVICE, NULL);
970+
SDL_GPUDevice *device = SDL_GetPointerProperty(props, TTF_PROP_GPU_TEXT_ENGINE_DEVICE_POINTER, NULL);
971971
if (!device) {
972972
SDL_SetError("Failed to create GPU text engine: Invalid device.");
973973
return NULL;
@@ -978,7 +978,7 @@ TTF_TextEngine *TTF_CreateGPUTextEngineWithProperties(SDL_PropertiesID props)
978978
return NULL;
979979
}
980980

981-
int atlas_texture_size = (int)SDL_GetNumberProperty(props, TTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE, 1024);
981+
int atlas_texture_size = (int)SDL_GetNumberProperty(props, TTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER, 1024);
982982
if (atlas_texture_size <= 0) {
983983
SDL_SetError("Failed to create GPU text engine: Invalid texture atlas size.");
984984
return NULL;

src/SDL_renderer_textengine.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -862,14 +862,14 @@ TTF_TextEngine *TTF_CreateRendererTextEngine(SDL_Renderer *renderer)
862862
SDL_SetError("Failed to create renderer text engine.");
863863
return NULL;
864864
}
865-
SDL_SetPointerProperty(props, TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER, renderer);
865+
SDL_SetPointerProperty(props, TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER_POINTER, renderer);
866866

867867
return TTF_CreateRendererTextEngineWithProperties(props);
868868
}
869869

870870
TTF_TextEngine *TTF_CreateRendererTextEngineWithProperties(SDL_PropertiesID props)
871871
{
872-
SDL_Renderer *renderer = SDL_GetPointerProperty(props, TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER, NULL);
872+
SDL_Renderer *renderer = SDL_GetPointerProperty(props, TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER_POINTER, NULL);
873873
if (!renderer) {
874874
SDL_SetError("Failed to create renderer text engine: Invalid renderer.");
875875
return NULL;
@@ -881,7 +881,7 @@ TTF_TextEngine *TTF_CreateRendererTextEngineWithProperties(SDL_PropertiesID prop
881881
}
882882

883883
int max_atlas_texture_size = (int)SDL_GetNumberProperty(SDL_GetRendererProperties(renderer), SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER, 0);
884-
int atlas_texture_size = (int)SDL_GetNumberProperty(props, TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE, 1024);
884+
int atlas_texture_size = (int)SDL_GetNumberProperty(props, TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER, 1024);
885885
if (max_atlas_texture_size && atlas_texture_size > max_atlas_texture_size) {
886886
atlas_texture_size = max_atlas_texture_size;
887887
}

src/SDL_ttf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,7 @@ static void TTF_CloseFontSource(SDL_IOStream *src)
19341934

19351935
TTF_Font *TTF_OpenFontWithProperties(SDL_PropertiesID props)
19361936
{
1937-
TTF_Font *existing_font = SDL_GetPointerProperty(props, TTF_PROP_FONT_CREATE_EXISTING_FONT, NULL);
1937+
TTF_Font *existing_font = SDL_GetPointerProperty(props, TTF_PROP_FONT_CREATE_EXISTING_FONT_POINTER, NULL);
19381938
const char *file = SDL_GetStringProperty(props, TTF_PROP_FONT_CREATE_FILENAME_STRING, NULL);
19391939
SDL_IOStream *src = SDL_GetPointerProperty(props, TTF_PROP_FONT_CREATE_IOSTREAM_POINTER, NULL);
19401940
Sint64 src_offset = SDL_GetNumberProperty(props, TTF_PROP_FONT_CREATE_IOSTREAM_OFFSET_NUMBER, 0);
@@ -2214,7 +2214,7 @@ TTF_Font *TTF_CopyFont(TTF_Font *existing_font)
22142214
TTF_Font *font = NULL;
22152215
SDL_PropertiesID props = SDL_CreateProperties();
22162216
if (props) {
2217-
SDL_SetPointerProperty(props, TTF_PROP_FONT_CREATE_EXISTING_FONT, existing_font);
2217+
SDL_SetPointerProperty(props, TTF_PROP_FONT_CREATE_EXISTING_FONT_POINTER, existing_font);
22182218
font = TTF_OpenFontWithProperties(props);
22192219
SDL_DestroyProperties(props);
22202220
}

0 commit comments

Comments
 (0)