From: SiegeLord <sie...@us...> - 2014-05-10 23:23:09
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Allegro". The branch, 5.1 has been updated via cbd4c0442ddd4dcd9955cdff2a54e1530c2fc053 (commit) via 1a8ba6e7b5c92c091fa7b537b1351db6ed18765c (commit) via 9a71fe6533c671eeb06ba3fbf17a10fd934c4231 (commit) via 870718493ce84c5e62d2c7dd166d35aa369612e2 (commit) from 947cf965059f8986edb56677a292bc2cb8d6771f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit cbd4c0442ddd4dcd9955cdff2a54e1530c2fc053 Author: SiegeLord <sie...@us...> Date: Sat May 10 16:00:18 2014 -0400 Make al_load_ttf_font_stretch return NULL if invalid width/height are passed. Previously this was undefined behavior, but it seems pointless to keep it that way. If this feature is supported in the future, it makes a lot more sense to have a clear signal when this feature is not supported than silently doing something random. commit 1a8ba6e7b5c92c091fa7b537b1351db6ed18765c Author: SiegeLord <sie...@us...> Date: Sat May 10 14:22:56 2014 -0400 Disallow attaching a mixer to itself. This is somewhat of a corner case that was previous undocumented. I can't think of a realistic usage for this that wouldn't imply an infinite recursion somewhere. commit 9a71fe6533c671eeb06ba3fbf17a10fd934c4231 Author: SiegeLord <sie...@us...> Date: Sat May 10 14:03:41 2014 -0400 Document that al_set_new_bitmap_format takes ALLEGRO_PIXEL_FORMAT as an argument commit 870718493ce84c5e62d2c7dd166d35aa369612e2 Author: SiegeLord <sie...@us...> Date: Sat May 10 14:01:29 2014 -0400 Clarify which mixer is which in al_attach_mixer_to_mixer's documentation ----------------------------------------------------------------------- Summary of changes: addons/audio/kcm_mixer.c | 1 + addons/ttf/ttf.c | 5 +++++ docs/src/refman/audio.txt | 8 +++++--- docs/src/refman/font.txt | 4 ++-- docs/src/refman/graphics.txt | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/addons/audio/kcm_mixer.c b/addons/audio/kcm_mixer.c index 6154cf5..168a9f2 100644 --- a/addons/audio/kcm_mixer.c +++ b/addons/audio/kcm_mixer.c @@ -804,6 +804,7 @@ bool al_attach_mixer_to_mixer(ALLEGRO_MIXER *stream, ALLEGRO_MIXER *mixer) { ASSERT(mixer); ASSERT(stream); + ASSERT(mixer != stream); if (mixer->ss.spl_data.frequency != stream->ss.spl_data.frequency) { _al_set_error(ALLEGRO_INVALID_OBJECT, diff --git a/addons/ttf/ttf.c b/addons/ttf/ttf.c index 631780f..f32f398 100644 --- a/addons/ttf/ttf.c +++ b/addons/ttf/ttf.c @@ -737,6 +737,11 @@ ALLEGRO_FONT *al_load_ttf_font_stretch_f(ALLEGRO_FILE *file, FT_Open_Args args; int result; + if ((h > 0 && w < 0) || (h < 0 && w > 0)) { + ALLEGRO_ERROR("Height/width have opposite signs (w = %d, h = %d).\n", w, h); + return NULL; + } + data = al_calloc(1, sizeof *data); data->stream.read = ftread; data->stream.close = ftclose; diff --git a/docs/src/refman/audio.txt b/docs/src/refman/audio.txt index dad2d06..5cd83b8 100644 --- a/docs/src/refman/audio.txt +++ b/docs/src/refman/audio.txt @@ -714,14 +714,16 @@ See also: [al_get_default_mixer], [al_set_default_mixer], [al_reserve_samples]. ### API: al_attach_mixer_to_mixer -Attaches a mixer onto another mixer. The same rules as with -[al_attach_sample_instance_to_mixer] apply, with the added caveat that both -mixers must be the same frequency. +Attaches the mixer passed as the first argument onto the mixer passed as the +second argument. The same rules as with [al_attach_sample_instance_to_mixer] +apply, with the added caveat that both mixers must be the same frequency. Returns true on success, false on error. Currently both mixers must have the same audio depth, otherwise the function fails. +It is invalid to attach a mixer to itself. + See also: [al_detach_mixer]. ### API: al_attach_sample_instance_to_mixer diff --git a/docs/src/refman/font.txt b/docs/src/refman/font.txt index 079c6a1..a381269 100644 --- a/docs/src/refman/font.txt +++ b/docs/src/refman/font.txt @@ -413,8 +413,8 @@ As with [al_load_ttf_font], the height may be a negative value to specify the total height in pixels. Then the width must also be a negative value, or zero. -The behaviour is undefined if the height is positive while width is negative, -or if the height is negative while the width is positive. +Returns `NULL` if the height is positive while width is negative, or if the +height is negative while the width is positive. Since: 5.0.6, 5.1.0 diff --git a/docs/src/refman/graphics.txt b/docs/src/refman/graphics.txt index bc22cb8..6a0dd75 100644 --- a/docs/src/refman/graphics.txt +++ b/docs/src/refman/graphics.txt @@ -510,7 +510,7 @@ See also: [al_set_new_bitmap_flags], [al_get_new_bitmap_flags], [al_get_bitmap_f ### API: al_set_new_bitmap_format -Sets the pixel format for newly created bitmaps. +Sets the pixel format ([ALLEGRO_PIXEL_FORMAT]) for newly created bitmaps. The default format is 0 and means the display driver will choose the best format. hooks/post-receive -- Allegro |