[allegro5] 01/04: New upstream version 5.2.2

Tobias Hansen thansen at moszumanska.debian.org
Mon Dec 19 02:49:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository allegro5.

commit cbdb5f52f0a9b0c059deb6b8d9b0fa6a0ce509ed
Author: Tobias Hansen <thansen at debian.org>
Date:   Mon Dec 19 02:41:54 2016 +0000

    New upstream version 5.2.2
---
 CHANGES-5.2.txt                                    | 240 +++++++++++
 CMakeLists.txt                                     |  58 ++-
 CONTRIBUTORS.txt                                   |   1 +
 README.txt                                         |   3 +
 README_android.txt                                 |  11 +-
 README_make.txt                                    |   4 +-
 README_releasing.txt                               |  34 +-
 addons/acodec/CMakeLists.txt                       |  60 ++-
 addons/acodec/acodec.c                             |   7 +
 addons/acodec/acodec.h                             |   8 +
 .../allegro5/internal/aintern_acodec_cfg.h.cmake   |   2 +
 addons/acodec/opus.c                               | 472 +++++++++++++++++++++
 addons/audio/CMakeLists.txt                        |   2 +-
 addons/audio/allegro5/internal/aintern_audio.h     |  12 +-
 addons/audio/kcm_dtor.c                            |   8 +-
 addons/audio/kcm_instance.c                        |   5 +-
 addons/audio/kcm_mixer.c                           |   4 +-
 addons/audio/kcm_sample.c                          |   4 +-
 addons/audio/kcm_stream.c                          |  30 +-
 addons/audio/kcm_voice.c                           |   4 +-
 addons/font/allegro5/allegro_font.h                |  46 +-
 addons/font/allegro5/internal/aintern_font.h       |  41 ++
 addons/font/font.c                                 |  25 +-
 addons/font/font.h                                 |   2 +
 addons/font/fontbmp.c                              |   2 +-
 addons/font/text.c                                 |   9 +-
 addons/image/CMakeLists.txt                        |   2 +-
 addons/image/allegro5/allegro_image.h              |   2 +
 addons/image/png.c                                 |   4 +-
 addons/native_dialog/CMakeLists.txt                |   2 +-
 .../allegro5/internal/aintern_native_dialog.h      |   3 +
 addons/native_dialog/dialog.c                      |   4 +-
 addons/native_dialog/gtk_xgtk.c                    |   4 +
 addons/native_dialog/osx_dialog.m                  |  16 +-
 addons/native_dialog/textlog.c                     |   4 +-
 addons/primitives/prim_opengl.c                    |   2 +
 addons/ttf/CMakeLists.txt                          |   2 +-
 addons/ttf/ttf.c                                   | 124 ++++--
 addons/video/CMakeLists.txt                        |   2 +-
 allegro.mft                                        |  24 ++
 android/Activity.cmake                             |  17 +-
 android/allegro_activity/src/AllegroActivity.java  |  40 +-
 android/allegro_activity/src/AllegroEGL.java       |   7 +-
 android/allegro_activity/src/AllegroJoystick.java  |  86 ++++
 android/allegro_activity/src/AllegroSurface.java   |  81 +---
 android/allegro_activity/src/Sensors.java          |   2 +-
 android/example/AndroidManifest.xml                |   2 +-
 cmake/Common.cmake                                 |  23 +
 cmake/FindENet.cmake                               |  29 ++
 cmake/FindGDIPLUS.cmake                            |  26 +-
 cmake/FindOpus.cmake                               |  38 ++
 cmake/Toolchain-android.cmake                      |  69 ++-
 cmake/Toolchain-raspberrypi.cmake                  |   4 +-
 demos/cosmic_protector/CMakeLists.txt              |  12 +-
 demos/skater/CMakeLists.txt                        |  12 +-
 demos/speed/CMakeLists.txt                         |   8 +-
 docs/html/refman/acodec.html                       |  10 +-
 docs/html/refman/audio.html                        | 288 ++++++-------
 docs/html/refman/color.html                        |  70 +--
 docs/html/refman/config.html                       |  46 +-
 docs/html/refman/direct3d.html                     |  24 +-
 docs/html/refman/display.html                      |  92 ++--
 docs/html/refman/events.html                       |  60 +--
 docs/html/refman/file.html                         |  84 ++--
 docs/html/refman/fixed.html                        |  48 +--
 docs/html/refman/font.html                         | 131 +++---
 docs/html/refman/fshook.html                       |  60 +--
 docs/html/refman/fullscreen_mode.html              |  10 +-
 docs/html/refman/getting_started.html              |   6 +-
 docs/html/refman/graphics.html                     | 292 ++++++++-----
 docs/html/refman/haptic.html                       |  74 ++--
 docs/html/refman/image.html                        |  10 +-
 docs/html/refman/index.html                        |   5 +-
 docs/html/refman/index_all.html                    |  17 +-
 docs/html/refman/joystick.html                     |  46 +-
 docs/html/refman/keyboard.html                     |  22 +-
 docs/html/refman/main.html                         |   4 +-
 docs/html/refman/memfile.html                      |   8 +-
 docs/html/refman/memory.html                       |  24 +-
 docs/html/refman/misc.html                         |   8 +-
 docs/html/refman/monitor.html                      |  14 +-
 docs/html/refman/mouse.html                        |  54 +--
 docs/html/refman/native_dialog.html                |  88 ++--
 docs/html/refman/opengl.html                       |  31 +-
 docs/html/refman/path.html                         |  50 +--
 docs/html/refman/physfs.html                       |   8 +-
 docs/html/refman/platform.html                     |  52 ++-
 docs/html/refman/primitives.html                   | 122 +++---
 docs/html/refman/search_index.js                   |   4 +-
 docs/html/refman/shader.html                       |  48 +--
 docs/html/refman/state.html                        |  22 +-
 docs/html/refman/system.html                       |  36 +-
 docs/html/refman/threads.html                      |  46 +-
 docs/html/refman/time.html                         |  12 +-
 docs/html/refman/timer.html                        |  38 +-
 docs/html/refman/touch.html                        |  30 +-
 docs/html/refman/transformations.html              |  58 +--
 docs/html/refman/utf8.html                         | 140 +++---
 docs/html/refman/video.html                        |  42 +-
 docs/man/ALLEGRO_GLYPH.3                           |  54 +++
 docs/man/al_android_get_activity.3                 |  26 ++
 docs/man/al_android_get_jni_env.3                  |  40 ++
 docs/man/al_backup_dirty_bitmap.3                  |  36 ++
 docs/man/al_backup_dirty_bitmaps.3                 |  26 ++
 docs/man/al_color_hsl.3                            |   8 +
 docs/man/al_color_hsl_to_rgb.3                     |   8 +-
 docs/man/al_color_hsv.3                            |   8 +
 docs/man/al_color_hsv_to_rgb.3                     |   8 +-
 docs/man/al_get_bitmap_depth.3                     |  25 ++
 docs/man/al_get_bitmap_samples.3                   |  25 ++
 docs/man/al_get_errno.3                            |   1 +
 docs/man/al_get_glyph.3                            |  32 ++
 docs/man/al_get_glyph_advance.3                    |   6 +-
 docs/man/al_get_new_bitmap_depth.3                 |  26 ++
 docs/man/al_get_new_bitmap_samples.3               |  26 ++
 docs/man/al_get_opengl_extension_list.3            |   7 +
 docs/man/al_init_acodec_addon.3                    |   2 +-
 docs/man/al_set_errno.3                            |   1 +
 docs/man/al_set_new_bitmap_depth.3                 |  28 ++
 docs/man/al_set_new_bitmap_samples.3               |  54 +++
 docs/man/al_set_shader_float_vector.3              |   2 +-
 docs/man/al_set_shader_int_vector.3                |   2 +-
 docs/man/al_set_shader_matrix.3                    |   2 +-
 docs/man/al_set_target_bitmap.3                    |   7 +
 docs/scripts/make_doc.c                            |   2 +-
 docs/src/changes-5.2.txt                           | 236 +++++++++++
 docs/src/refman/acodec.txt                         |   2 +-
 docs/src/refman/color.txt                          |  28 +-
 docs/src/refman/font.txt                           |  55 ++-
 docs/src/refman/getting_started.txt                |   4 +-
 docs/src/refman/graphics.txt                       | 118 ++++++
 docs/src/refman/index.txt                          |   1 +
 docs/src/refman/opengl.txt                         |   4 +
 docs/src/refman/platform.txt                       |  33 ++
 docs/src/refman/transformations.txt                |   4 +-
 examples/CMakeLists.txt                            |  17 +-
 examples/Helper.cmake                              |   7 +-
 examples/enet_common.h                             |  48 +++
 examples/ex_audio_props.cpp                        |  24 +-
 examples/ex_bitmap_flip.c                          |  26 +-
 examples/ex_camera.c                               |  50 ++-
 examples/ex_depth_target.c                         | 236 +++++++++++
 examples/ex_enet_client.c                          | 259 +++++++++++
 examples/ex_enet_server.c                          | 240 +++++++++++
 examples/ex_glext.c                                |   2 +
 examples/ex_multisample_target.c                   | 249 +++++++++++
 examples/ex_opengl.c                               |   2 +
 examples/ex_opengl_pixel_shader.c                  |   2 +
 examples/ex_stream_seek.c                          |  22 +-
 examples/ex_ttf.c                                  |  96 +++--
 include/allegro5/allegro_android.h                 |   6 +
 include/allegro5/allegro_opengl.h                  |   8 +
 include/allegro5/allegro_x.h                       |   3 +
 include/allegro5/base.h                            |   6 +-
 include/allegro5/bitmap.h                          |  15 +
 include/allegro5/blender.h                         |   3 +
 include/allegro5/display.h                         |   4 +
 include/allegro5/fullscreen_mode.h                 |   2 +
 include/allegro5/inline/fmaths.inl                 |  24 +-
 include/allegro5/internal/aintern_bitmap.h         |  10 +-
 include/allegro5/internal/aintern_display.h        |   1 -
 include/allegro5/internal/aintern_dtor.h           |   6 +-
 include/allegro5/internal/aintern_opengl.h         |  28 ++
 include/allegro5/internal/aintern_pixels.h         |   8 +-
 include/allegro5/internal/aintern_raspberrypi.h    |   3 +-
 include/allegro5/internal/aintern_shader.h         |   8 +-
 include/allegro5/internal/alconfig.h               |  45 +-
 include/allegro5/memory.h                          |   2 +
 include/allegro5/monitor.h                         |   2 +
 include/allegro5/opengl/GLext/gl_ext_defs.h        |  48 +++
 include/allegro5/opengl/gl_ext.h                   |   5 +-
 include/allegro5/platform/albcc32.h                |   1 -
 include/allegro5/platform/almsvc.h                 |   2 -
 include/allegro5/platform/alosx.h                  |   1 -
 include/allegro5/platform/alplatf.h.cmake          |   1 +
 include/allegro5/platform/alwatcom.h               |   1 -
 include/allegro5/render_state.h                    |   2 +
 include/allegro5/shader.h                          |   6 +-
 include/allegro5/timer.h                           |   1 +
 .../Allegro5_iOS.xcodeproj/project.pbxproj         |  37 +-
 .../allegro5/internal/aintern_image_cfg.h          |   6 +-
 misc/install_test.c                                |  50 +++
 misc/make_android_project.py                       |   2 +-
 python/CMakeLists.txt                              |  16 +-
 python/checkdocs.py                                |   7 +-
 python/generate_python_ctypes.py                   |   2 +-
 src/android/android_clipboard.c                    |   3 +-
 src/android/android_display.c                      |   2 +-
 src/android/android_system.c                       |  39 +-
 src/bitmap.c                                       |  44 +-
 src/bitmap_io.c                                    |   8 +-
 src/bitmap_type.c                                  |   8 +
 src/display.c                                      |  21 +-
 src/dtor.c                                         |  69 +--
 src/events.c                                       |   5 +-
 src/file_stdio.c                                   |   4 +
 src/fshook_stdio.c                                 |   4 +
 src/iphone/iphone_clipboard.m                      |   3 +-
 src/iphone/iphone_display.m                        |   7 -
 src/linux/lmseev.c                                 |  10 -
 src/macosx/osx_app_delegate.m                      |   5 +-
 src/macosx/osxgl.m                                 | 106 ++---
 src/macosx/qzmouse.m                               |  12 +-
 src/memdraw.c                                      |  11 +-
 src/opengl/extensions.c                            |  44 +-
 src/opengl/ogl_bitmap.c                            | 110 +++--
 src/opengl/ogl_display.c                           |  20 +-
 src/opengl/ogl_draw.c                              |  33 +-
 src/opengl/ogl_fbo.c                               | 326 +++++++++++++-
 src/opengl/ogl_helpers.h                           |  16 +
 src/opengl/ogl_lock_es.c                           |   3 +-
 src/opengl/ogl_shader.c                            |   8 +-
 src/raspberrypi/picursor.h                         | 108 ++---
 src/raspberrypi/pidisplay.c                        | 173 +++++---
 src/raspberrypi/pisystem.c                         |   2 +-
 src/sdl/sdl_display.c                              |   2 +-
 src/shader.c                                       |  10 +-
 src/shader_source.inc                              |   2 +-
 src/system.c                                       |   9 +-
 src/timernu.c                                      |  84 ++--
 src/tls.c                                          |  71 ++--
 src/unix/upath.c                                   |   3 +
 src/win/d3d.h                                      |   1 -
 src/win/d3d_bmp.cpp                                |  51 +--
 src/win/d3d_disp.cpp                               |   8 +-
 src/win/d3d_shader.cpp                             |  12 +-
 src/win/wkeyboard.c                                |   7 +-
 src/win/wmcursor.c                                 |   2 +-
 src/win/wwindow.c                                  |  28 +-
 src/x/xdisplay.c                                   |   7 +-
 src/x/xmousenu.c                                   |  40 +-
 tests/test_compressed.ini                          |   9 +
 tests/test_convert.ini                             |   2 +
 tests/test_driver.c                                |  20 +-
 tests/test_prim2.ini                               |  16 +-
 235 files changed, 6116 insertions(+), 2150 deletions(-)

diff --git a/CHANGES-5.2.txt b/CHANGES-5.2.txt
index 518fb40..eff5b28 100644
--- a/CHANGES-5.2.txt
+++ b/CHANGES-5.2.txt
@@ -1,4 +1,7 @@
 Allegro changelog for 5.2.x series
+Changes from 5.2.1.1 to 5.2.2 (December 2016)
+Changes from 5.2.1 to 5.2.1.1 (August 2016)
+Changes from 5.2.0 to 5.2.1 (July 2016)
 Changes from 5.1.13.1 to 5.2.0 (April 2016)
 Allegro changelog for 5.2.x series
 **********************************
@@ -6,6 +9,243 @@ Allegro changelog for 5.2.x series
 These lists serve as summaries; the full histories are in the git
 repository.
 
+Changes from 5.2.1.1 to 5.2.2 (December 2016)
+*********************************************
+
+The main developers this time were: Trent Gamblin, SiegeLord, Elias
+Pschernig.
+
+Core:
+
+   • Don’t accumulate time in the timer while it is stopped.
+
+   • Use dynamic OpenGL ES checks, so binaries produced on newer
+     platforms don’t crash on older ones.
+
+   • Destabilize the OpenGL extensions API (BREAKING CHANGE!).
+
+Raspberry Pi port:
+
+   • Add various optimizations.
+
+   • Fix ‘al_set_mouse_xy’ under X.
+
+Android port:
+
+   • Fix buffer overrun and memory leak in the clipboard support.
+
+   • Add WANT_GLES3 to disable some of the newer features on platforms
+     where they aren’t supported.
+
+   • Fix build in Android versions below 3.1.
+
+   • Fix a crash when activity is destroyed/paused.
+
+   • Allow building for android mips, arm64 and mips64.
+
+   • Add ‘al_android_get_jni_env’ and ‘al_android_get_activity’ utility
+     functions.
+
+   • Update manifest files for newer Android versions.
+
+Windows port:
+
+   • Handle keyboard input properly when Ctrl is pressed (Tobias
+     Scheuer).
+
+Hurd port:
+
+   • Define a fallback PATH_MAX (Andreas Rönnquist).
+
+OSX port:
+
+   • Clear window to black when going in/out of fullscreen.
+
+   • Fix window centering when going out of FULLSCREEN_WINDOW mode.
+
+   • Fix OSX 10.12 build.
+
+   • Allow 32 bit builds on OSX (MarcusCalhoun-Lopez).
+
+Build system:
+
+   • Fix issues with building on GCC6 on Windows.
+
+   • Fix source directory littering while configuring the Android build.
+
+Python binding:
+
+   • Add support Python 3 (Gabriel Queiroz).
+
+Documentation:
+
+   • Document the behavior of ‘al_set_target_bitmap’ with respect to
+     transformations (Edgar Reynaldo).
+
+   • Fix typo in ‘al_use_transform’ docs (Ryan Roden-Corrent).
+
+Examples:
+
+   • Add kerning to the ‘al_get_glyph’ example in ex_ttf.
+
+   • Various fixes in ex_camera (Erich Erstu).
+
+Changes from 5.2.1 to 5.2.1.1 (August 2016)
+*******************************************
+
+The main developers this time were: Trent Gamblin, SiegeLord.
+
+Core:
+
+   • Enforce backwards compatibility in the version check, rather than
+     erroneously allowing forwards compatiblity.
+
+   • Temporarily remove new extensions in ALLEGRO_OGL_EXT_LIST as that
+     broke ABI compatibility.
+
+OSX port:
+
+   • Temporarily revert changes in joystick detection, as it did not
+     interact well with some joysticks.
+
+Windows port:
+
+   • Fix the clear display to black right away to avoid an ugly white
+     flash change.
+
+Changes from 5.2.0 to 5.2.1 (July 2016)
+***************************************
+
+The main developers this time were: Elias Pschernig, Trent Gamblin,
+SiegeLord, Ryan Roden-Corrent, Boris Carvajal and Peter Hull.
+
+Core:
+
+   • Optimize bitmap holding a bit (Bruce Pascoe).
+
+   • Add ‘al_get/set_depth/samples’ (OpenGL only for now).
+
+   • Optimize destruction performance when you have thousands of objects
+     (e.g.  sub-bitmaps).
+
+   • Use low floating point precision for the OpenGL fragment shaders,
+     which helps performance a lot on mobile platforms.
+
+   • Don’t stop and join the timer thread when stopping the last timer
+     (prevents unnecessary delay in this situation on some platforms).
+
+   • Add ‘al_backup_dirty_bitmap’ and ‘al_backup_dirty_bitmaps’ to more
+     finely control when bitmap context backup is performed.
+
+Android port:
+
+   • Fix Android app issues when woken up during sleep.
+
+   • Specify the Android toolchain file on the command line now.
+     ANDROID_NDK_TOOLCHAIN_ROOT now has to be specified in an
+     environment variable.
+
+OSX port:
+
+   • Improve joystick enumeration (Todd Cope).
+
+   • Make ‘al_set_new_window_title’ work correctly.
+
+   • Don’t send duplicate mouse move events.
+
+   • Fix mouse warping behavior.
+
+   • Exit fullscreen mode if ALLEGRO_FULLSCREEN_WINDOW is set when
+     destroying a display (otherwise if you destroy and recreate display
+     without terminating the program, a white window kicks around).
+
+iOS port:
+
+   • Make it compile again.
+
+   • Don’t backup textures as it is unnecessary.
+
+   • Update minimum iOS to version to 6.1.
+
+   • Disable the native png loader in favor of libpng, as it is broken
+     on Apple’s end.
+
+   • Create library when creating the archive.
+
+Windows port:
+
+   • Fix the D3D target bitmap bug.
+
+   • Clear display to black right away to avoid an ugly white flash.
+
+Raspberry Pi port:
+
+   • Fix system cursor support.
+
+Linux port:
+
+   • Make ‘al_set_new_window_title’ work correctly.
+
+Build system:
+
+   • Use PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR instead of
+     CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR. This lets you use Allegro as
+     a sub-project in your CMake project.
+
+   • Fix GDIPlus finding in cmake-gui (Bruce Pascoe).
+
+   • Add .gitignore and ignore build/ dir (Mark Oates).
+
+   • Fix building examples with non-Allegro dependencies with the
+     monolith build.
+
+Documentation:
+
+   • Various documentation updates (Daniel Johnson and others).
+
+Other:
+
+   • Add more ‘#include’ statements in Allegro headers, so it’s easier
+     to use them in isolation (Jordan Woehr).
+
+   • Allow marking tests as being hardware only.
+
+   • Prefix some private Allegro macros and types to not pollute the
+     namespace.
+
+   • Make set_shader_uniform api const-correct (Bruce Pascoe).
+
+Audio addon:
+
+   • Adjust loop end position when calling
+     ‘al_set_sample_instance_length’.
+
+Acodec addon:
+
+   • Allow file-backed audio streams to be restarted after they finish.
+
+   • Add Opus codec support.
+
+Image addon:
+
+   • Fail gracefully if not built with PNG/JPG loaders.
+
+Native dialog addon:
+
+Font addon:
+
+   • Make ‘al_get_text_dimensions’ and ‘al_get_glyph_dimensions’ return
+     exact bounding boxes (koro).
+
+   • Add ‘ALLEGRO_GLYPH’ structure and ‘al_get_glyph’, allowing for some
+     additional optimization when drawing fonts.
+
+Examples:
+
+   • Add more controls to ‘ex_audio_props’.
+
+   • Add an example of using Enet with Allegro.
+
 Changes from 5.1.13.1 to 5.2.0 (April 2016)
 *******************************************
 
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a3e2ef..f77c318 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,6 +12,10 @@
 #
 #-----------------------------------------------------------------------------#
 
+# Set the project name.
+# We use C++ in a few cases.
+project(ALLEGRO C CXX)
+
 cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
 if(COMMAND cmake_policy)
     cmake_policy(SET CMP0003 NEW)
@@ -29,33 +33,28 @@ endif()
 # Note: This needs to be done before the project command
 set(CMAKE_CONFIGURATION_TYPES "${CMAKE_BUILD_TYPE}" CACHE INTERNAL "internal")
 
-option(WANT_ANDROID "Build for Android" OFF)
-option(WANT_ANDROID_LEGACY "Build for Android 4 (1.6)" OFF)
-option(WANT_GLES2 "Compile with GLES2 support" ON)
-if(WANT_ANDROID)
-    include(${CMAKE_SOURCE_DIR}/cmake/Toolchain-android.cmake)
+if(ANDROID)
+    option(WANT_ANDROID_LEGACY "Build for Android 4 (1.6)" OFF)
     set(ANDROID_TARGET "android-12" CACHE STRING "What Android target to compile for.")
-endif(WANT_ANDROID)
+endif(ANDROID)
+option(WANT_GLES2 "Compile with GLES2 support" ON)
+option(WANT_GLES3 "Compile with GLES3 support" OFF)
 option(ALLEGRO_SDL "Build using the SDL backend (experimental)" OFF)
 option(WANT_STATIC_RUNTIME "Whether or not to link the C and C++ runtimes statically (currently only implemented for MSVC)" OFF)
 
-# Set the project name.
-# We use C++ in a few cases.
-project(ALLEGRO C CXX)
-
-set(ALLEGRO_VERSION 5.2.0)
+set(ALLEGRO_VERSION 5.2.2)
 string(REGEX MATCH "^[0-9]+[.][0-9]+" ALLEGRO_SOVERSION ${ALLEGRO_VERSION})
 string(REPLACE "." "" ALLEGRO_DLL_SHORTVER ${ALLEGRO_SOVERSION})
 
 # Search in the `cmake' directory for additional CMake modules.
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
 
 # Search in `deps' directories for dependency files.
 file(GLOB deps_subdirs
-    "${CMAKE_SOURCE_DIR}/deps"
-    "${CMAKE_SOURCE_DIR}/deps/*"
-    "${CMAKE_BINARY_DIR}/deps"
-    "${CMAKE_BINARY_DIR}/deps/*"
+    "${PROJECT_SOURCE_DIR}/deps"
+    "${PROJECT_SOURCE_DIR}/deps/*"
+    "${PROJECT_BINARY_DIR}/deps"
+    "${PROJECT_BINARY_DIR}/deps/*"
     )
 foreach(subdir ${deps_subdirs})
     if(EXISTS "${subdir}/include" OR EXISTS "${subdir}/lib")
@@ -71,12 +70,12 @@ endforeach(subdir)
 
 # Search for C header files in these directories.
 include_directories(
-    ${CMAKE_SOURCE_DIR}/include
-    ${CMAKE_BINARY_DIR}/include
+    ${PROJECT_SOURCE_DIR}/include
+    ${PROJECT_BINARY_DIR}/include
     )
 
 # Put libraries into `lib'.
-set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
+set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
 
 # Lists of all the source files.
 include(FileList)
@@ -198,6 +197,16 @@ include(CheckCSourceCompiles)
 include(CheckCXXSourceCompiles)
 
 if(CMAKE_COMPILER_IS_GNUCC)
+   get_gcc_system_include_dirs("c" "${CMAKE_C_COMPILER}" "${CMAKE_C_FLAGS}" SYSTEM_INCLUDE_DIRS)
+   set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRS})
+endif()
+
+if(CMAKE_COMPILER_IS_GNUCXX)
+   get_gcc_system_include_dirs("c++" "${CMAKE_CXX_COMPILER}" "${CMAKE_CXX_FLAGS}" SYSTEM_INCLUDE_DIRS)
+   set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRS})
+endif()
+
+if(CMAKE_COMPILER_IS_GNUCC)
     set(COMPILER_GCC 1)
     set(COMPILER_GCC_OR_CLANG 1)
 endif()
@@ -304,7 +313,7 @@ if(IPHONE)
     set(ALLEGRO_UNIX 0)
     set(WANT_X11 off)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
-    set(CMAKE_EXE_LINKER_FLAGS "-framework CoreGraphics -framework QuartzCore -framework UIKit -framework Foundation -framework CoreFoundation")
+    set(CMAKE_EXE_LINKER_FLAGS "-framework CoreGraphics -framework QuartzCore -framework UIKit -framework Foundation -framework CoreFoundation -framework MobileCoreServices")
 endif(IPHONE)
 
 if(BORLAND)
@@ -558,6 +567,9 @@ if(WANT_OPENGL)
         set(OPENGL_LIBRARIES ${OPENGLES_LIBRARIES})
         if(OPENGLES2_FOUND)
             set(ALLEGRO_CFG_OPENGLES2 1)
+            if(WANT_GLES3)
+                set(ALLEGRO_CFG_OPENGLES3 1)
+            endif()
             set(ALLEGRO_CFG_OPENGL_PROGRAMMABLE_PIPELINE 1)
             list(APPEND OPENGL_LIBRARIES ${OPENGLES2_LIBRARIES})
         endif()
@@ -922,7 +934,7 @@ endif(NO_FPU)
 # All relevant variables must be set before here.
 configure_file(
     include/allegro5/platform/alplatf.h.cmake
-    ${CMAKE_BINARY_DIR}/include/allegro5/platform/alplatf.h
+    ${PROJECT_BINARY_DIR}/include/allegro5/platform/alplatf.h
     )
 
 #-----------------------------------------------------------------------------#
@@ -931,10 +943,10 @@ configure_file(
 #
 #-----------------------------------------------------------------------------#
 
-if(WANT_ANDROID)
+if(ANDROID)
     include(AndroidApp)
     add_subdirectory(android)
-endif(WANT_ANDROID)
+endif(ANDROID)
 
 #-----------------------------------------------------------------------------#
 #
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 748034a..2b94aa6 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -16,6 +16,7 @@ Edgar Reynaldo
 ElectricSolstice
 Elias Pschernig
 Eric Botcazou
+Erich Erstu
 Evert Glebbeek
 gameovera
 George Foot
diff --git a/README.txt b/README.txt
index d851163..32dfe53 100644
--- a/README.txt
+++ b/README.txt
@@ -110,6 +110,9 @@ These are the dependencies required for the addons:
 - Ogg Vorbis, a free lossy audio format. (libogg, libvorbis, libvorbisfile)
   Home page: <http://www.vorbis.com/>
 
+- Opus, a free lossy audio codec. (libogg, libopus, libopusfile)
+  Home page: <http://www.opus-codec.org/>
+
 - FLAC, a free lossless audio codec. (libFLAC, libogg)
   Home page: <http://flac.sourceforge.net/>
 
diff --git a/README_android.txt b/README_android.txt
index 542cca2..6e5a905 100644
--- a/README_android.txt
+++ b/README_android.txt
@@ -45,18 +45,18 @@ Make NDK standalone toolchain
 Next you need to setup a standalone NDK toolchain. Set an environment
 variable to point to the desired location of the Android toolchain:
 
-    export TC=$HOME/android-toolchain
+    export ANDROID_NDK_TOOLCHAIN_ROOT=$HOME/android-toolchain
 
 Assuming the NDK was extracted into $HOME/android-ndk run the following
 command:
 
     $HOME/android-ndk/build/tools/make-standalone-toolchain.sh \
-        --platform=android-9 --install-dir=$TC --stl=stlport
+        --platform=android-9 --install-dir=$ANDROID_NDK_TOOLCHAIN_ROOT
 
 You can use any platform 9 or higher. This command was last tested on ndk10d.
 You may need to add --arch=arm if the auto-configuration fails.
 
-Add $TC/bin to your PATH.
+Add $ANDROID_NDK_TOOLCHAIN_ROOT/bin to your PATH.
 
 
 Build dependencies for Allegro
@@ -108,11 +108,12 @@ or modify the paths in CMake variables manually.
 Building Allegro
 ================
 
-The following steps will build Allegro for Android:
+The following steps will build Allegro for Android. Note that you still
+need ANDROID_NDK_TOOLCHAIN_ROOT (see above) in your environment.
 
     mkdir build
     cd build
-    cmake .. -DANDROID_NDK_TOOLCHAIN_ROOT=$TC -DWANT_ANDROID=on \
+    cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-android.cmake
         -DCMAKE_BUILD_TYPE=Debug -DANDROID_TARGET=android-12 \
         # -G"MSYS Makefiles"
     make
diff --git a/README_make.txt b/README_make.txt
index 6833917..cce2144 100644
--- a/README_make.txt
+++ b/README_make.txt
@@ -10,8 +10,8 @@ Linux, and also Mac OS X and MinGW.
 2. Create a build directory under the Allegro directory and go there.
 
         cd /path/to/allegro
-        mkdir Build
-        cd Build
+        mkdir build
+        cd build
 
 3. Run `cmake` with whatever options you want.  See README_cmake.txt
 for details about options you can set.
diff --git a/README_releasing.txt b/README_releasing.txt
index 1ca1d47..5f9424b 100644
--- a/README_releasing.txt
+++ b/README_releasing.txt
@@ -4,36 +4,36 @@ How to Make a Release
 This guide explains how to make an Allegro release. This all assumes that we're
 on Linux.
 
-1.  Starting with the 5.1 branch, pick a commit which you want to be the base of
+1.  Starting with the master branch, pick a commit which you want to be the base of
     the release branch. Typically this will be HEAD, but if there are some
     unbaked commits there, you may want to use an earlier commit. Call this
-    branch with the new release name (e.g. 5.1.12 in this case):
+    branch with the new release name (e.g. 5.2.2 in this case):
 
-        git branch 5.1.12 5.1
+        git branch 5.2.2 master
 
     From now on, aside from changing the version numbers, all commits on this
-    release branch should be cherry-picked from the 5.1 branch. For all
+    release branch should be cherry-picked from the master branch. For all
     cherry-picks, prefer using the -x switch, like so:
 
         git cherry-pick -x badf00d
 
-2.  On the 5.1 branch, bump the version to the next release and update the
+2.  On the master branch, bump the version to the next release and update the
     dates. This is done in `include/allegro5/base.h`. Also, change
     ALLEGRO_VERSION in `CMakeLists.txt`. Commit this change.
 
-3.  Write a changelog file. This is located in docs/src/changes-5.x.txt.
+3.  Write a changelog file. This is located in docs/src/changes-5.2.txt.
 
     Typically you will want to look through the commits made since the last
     release, e.g. using `git log <last_release>..<this_release>` (e.g. `git log
-    5.1.11..5.1.12`). Follow the format of the previous changelogs. It's up to
+    5.2.1..5.2.2`). Follow the format of the previous changelogs. It's up to
     you how to determine who are the 'main developers'. For the 5.1.9+ release,
     I've abitrarily determined it to be developers who've committed 95% of the
     lines of code (this isn't very important). You probably will want to have
     other developers check it over in case something is wrong/missing. Commit
     this change.
 
-4.  We are now done with the 5.1 branch. You can push these changes to github.
-    Check out the release branch now.
+4.  We are now done with the master branch. You can push these changes to 
+    github. Check out the release branch now.
 
 5.  Cherry-pick the commit with the changelog onto this branch.
 
@@ -43,27 +43,27 @@ on Linux.
     This is all done in `include/allegro5/base.h`. Commit this change.
 
 7.  Tag the previous commit with the same version number and the release number
-    (e.g. "5.1.12.0" if you're releasing 5.1.12. An example command would be:
+    (e.g. "5.2.2.0" if you're releasing 5.2.2. An example command would be:
 
-        git tag -a -m "Tag 5.1.12.0 (WIP)" 5.1.12.0
+        git tag -a -m "Tag 5.2.2.0 (WIP)" 5.2.2.0
 
 8.  Create the source archives by running `misc/create_release_archives.sh` and
     passing in the release version. This will create 3 source archives (.tar.gz,
     .7z and .zip) in the current directory. And example invocation would be:
 
-        ./misc/create_release_archives.sh 5.1.12.0
+        ./misc/create_release_archives.sh 5.2.2.0
 
     Typically for the first release we drop the release number, so rename the
     archives accordingly.
 
 9.  Upload the source archives to gna.org. The command to use would be something like this:
 
-        rsync -avr --rsh="ssh" --numeric-ids allegro-5.1.12.* <user>@download.gna.org:/upload/allegro/allegro-unstable/5.1.12
+        rsync -avr --rsh="ssh" --numeric-ids allegro-5.2.2.* <user>@download.gna.org:/upload/allegro/allegro/5.2.2
 
-10. Make an announcement on the website. This involves making a news item,
-    changing the download area and copy-pasting the change list.
+10. Build the docs, including the pdf. Add these to the website via the
+    liballeg.github.io repository.
 
-11. For unstable releases, nothing else needs to be done. For stable releases,
-    you'll have to upload the docs.
+11. Make an announcement on the website. This involves making a news item,
+    changing the download area and copy-pasting the change list.
 
 12. Make an announcement on allegro.cc. You're done!
diff --git a/addons/acodec/CMakeLists.txt b/addons/acodec/CMakeLists.txt
index 38f1fbf..2e4c71f 100644
--- a/addons/acodec/CMakeLists.txt
+++ b/addons/acodec/CMakeLists.txt
@@ -6,6 +6,7 @@ if(WIN32)
 endif()
 option(WANT_VORBIS "Enable Ogg Vorbis support using libvorbis" on)
 option(WANT_TREMOR "Enable Ogg Vorbis support using Tremor" off)
+option(WANT_OPUS "Enable Opus support using libopus" on)
 option(WANT_MODAUDIO "Enable MOD Audio support" on)
 option(WANT_ACODEC_DYNAMIC_LOAD "Enable DLL loading in acodec (Windows)" off)
 
@@ -268,9 +269,66 @@ if(SUPPORT_VORBIS)
     endif()
 endif(SUPPORT_VORBIS)
 
+#
+# Opus
+#
+
+if(WANT_OPUS)
+    find_package(Opus)
+    if(OPUS_FOUND)
+        set(CMAKE_REQUIRED_INCLUDES ${OGG_INCLUDE_DIR} ${OPUS_INCLUDE_DIR})
+        if(COMPILER_GCC_OR_CLANG)
+            # libm is required when linking statically.
+            set(CMAKE_REQUIRED_LIBRARIES "${OPUS_LIBRARIES};m")
+        else()
+            set(CMAKE_REQUIRED_LIBRARIES "${OPUS_LIBRARIES}")
+        endif(COMPILER_GCC_OR_CLANG)
+        run_c_compile_test("
+            #include <opus/opusfile.h>
+            int main(void)
+            {
+                OggOpusFile *f;
+                OpusHead *v = 0;
+                (void)v;
+                op_free(f);
+                return 0;
+            }"
+            OPUS_COMPILES)
+        set(CMAKE_REQUIRED_INCLUDES)
+        set(CMAKE_REQUIRED_LIBRARIES)
+        if(OPUS_COMPILES)
+            set(SUPPORT_OPUS 1)
+        endif()
+    endif(OPUS_FOUND)
+    if(NOT SUPPORT_OPUS)
+        message("WARNING: libopus not found or compile test failed, disabling support.")
+    endif(NOT SUPPORT_OPUS)
+endif()
+
+if(SUPPORT_OPUS)
+    include_directories(SYSTEM ${OGG_INCLUDE_DIR} ${OPUS_INCLUDE_DIR})
+    set(ALLEGRO_CFG_ACODEC_OPUS 1)
+    list(APPEND ACODEC_SOURCES opus.c)
+
+    list(APPEND ACODEC_INCLUDE_DIRECTORIES ${OGG_INCLUDE_DIR} ${OPUS_INCLUDE_DIR})
+
+    if(WIN32 AND WANT_ACODEC_DYNAMIC_LOAD)
+        if(OPUSFILE_LIBRARY MATCHES "${WIN32_STATIC_LIB_REGEX}")
+            message("WARNING: Dynamic loading will be disabled for Opus"
+                    " as static library was found: ${OPUSFILE_LIBRARY}")
+        else()
+            get_dll_name(${OPUSFILE_LIBRARY} ALLEGRO_CFG_ACODEC_OPUSFILE_DLL)
+        endif()
+    endif()
+
+    if(NOT ALLEGRO_CFG_ACODEC_OPUSFILE_DLL)
+        list(APPEND ACODEC_LIBRARIES ${OPUS_LIBRARIES})
+    endif()
+endif(SUPPORT_OPUS)
+
 configure_file(
     allegro5/internal/aintern_acodec_cfg.h.cmake
-    ${CMAKE_BINARY_DIR}/include/allegro5/internal/aintern_acodec_cfg.h
+    ${PROJECT_BINARY_DIR}/include/allegro5/internal/aintern_acodec_cfg.h
     )
 
 add_our_addon_library(allegro_acodec
diff --git a/addons/acodec/acodec.c b/addons/acodec/acodec.c
index 72cfc17..0082d2d 100644
--- a/addons/acodec/acodec.c
+++ b/addons/acodec/acodec.c
@@ -55,6 +55,13 @@ bool al_init_acodec_addon(void)
    ret &= al_register_audio_stream_loader_f(".ogg", _al_load_ogg_vorbis_audio_stream_f);
 #endif
 
+#ifdef ALLEGRO_CFG_ACODEC_OPUS
+   ret &= al_register_sample_loader(".opus", _al_load_ogg_opus);
+   ret &= al_register_audio_stream_loader(".opus", _al_load_ogg_opus_audio_stream);
+   ret &= al_register_sample_loader_f(".opus", _al_load_ogg_opus_f);
+   ret &= al_register_audio_stream_loader_f(".opus", _al_load_ogg_opus_audio_stream_f);
+#endif
+
    return ret;
 }
 
diff --git a/addons/acodec/acodec.h b/addons/acodec/acodec.h
index bb6218d..87454f1 100644
--- a/addons/acodec/acodec.h
+++ b/addons/acodec/acodec.h
@@ -58,6 +58,14 @@ ALLEGRO_AUDIO_STREAM *_al_load_ogg_vorbis_audio_stream_f(ALLEGRO_FILE* file,
    size_t buffer_count, unsigned int samples);
 #endif
 
+#ifdef ALLEGRO_CFG_ACODEC_OPUS
+ALLEGRO_SAMPLE *_al_load_ogg_opus(const char *filename);
+ALLEGRO_SAMPLE *_al_load_ogg_opus_f(ALLEGRO_FILE *file);
+ALLEGRO_AUDIO_STREAM *_al_load_ogg_opus_audio_stream(const char *filename,
+   size_t buffer_count, unsigned int samples);
+ALLEGRO_AUDIO_STREAM *_al_load_ogg_opus_audio_stream_f(ALLEGRO_FILE* file,
+   size_t buffer_count, unsigned int samples);
+#endif
 
 
 #endif
diff --git a/addons/acodec/allegro5/internal/aintern_acodec_cfg.h.cmake b/addons/acodec/allegro5/internal/aintern_acodec_cfg.h.cmake
index fbaab02..56f3f19 100644
--- a/addons/acodec/allegro5/internal/aintern_acodec_cfg.h.cmake
+++ b/addons/acodec/allegro5/internal/aintern_acodec_cfg.h.cmake
@@ -2,9 +2,11 @@
 #cmakedefine ALLEGRO_CFG_ACODEC_MODAUDIO
 #cmakedefine ALLEGRO_CFG_ACODEC_VORBIS
 #cmakedefine ALLEGRO_CFG_ACODEC_TREMOR
+#cmakedefine ALLEGRO_CFG_ACODEC_OPUS
 
 
 /* Define if the library should be loaded dynamically. */
 #cmakedefine ALLEGRO_CFG_ACODEC_FLAC_DLL "@ALLEGRO_CFG_ACODEC_FLAC_DLL@"
 #cmakedefine ALLEGRO_CFG_ACODEC_DUMB_DLL "@ALLEGRO_CFG_ACODEC_DUMB_DLL@"
 #cmakedefine ALLEGRO_CFG_ACODEC_VORBISFILE_DLL "@ALLEGRO_CFG_ACODEC_VORBISFILE_DLL@"
+#cmakedefine ALLEGRO_CFG_ACODEC_OPUSFILE_DLL "@ALLEGRO_CFG_ACODEC_OPUSFILE_DLL@"
diff --git a/addons/acodec/opus.c b/addons/acodec/opus.c
new file mode 100644
index 0000000..7ca9754
--- /dev/null
+++ b/addons/acodec/opus.c
@@ -0,0 +1,472 @@
+/*
+ * Allegro5 Opus reader.
+ * author: Boris Carvajal (c) 2016
+ * Based on ogg.c code
+ */
+
+#include "allegro5/allegro.h"
+#include "allegro5/allegro_acodec.h"
+#include "allegro5/allegro_audio.h"
+#include "allegro5/internal/aintern.h"
+#include "allegro5/internal/aintern_audio.h"
+#include "allegro5/internal/aintern_exitfunc.h"
+#include "allegro5/internal/aintern_system.h"
+#include "acodec.h"
+#include "helper.h"
+
+#ifndef ALLEGRO_CFG_ACODEC_OPUS
+   #error configuration problem, ALLEGRO_CFG_ACODEC_OPUS not set
+#endif
+
+ALLEGRO_DEBUG_CHANNEL("acodec")
+
+#include <opus/opusfile.h>
+
+typedef struct AL_OP_DATA AL_OP_DATA;
+
+struct AL_OP_DATA {
+   OggOpusFile *of;
+   ALLEGRO_FILE *file;
+   int channels;
+   int bitstream;
+   double loop_start;
+   double loop_end;
+};
+
+/* dynamic loading support (Windows only currently) */
+#ifdef ALLEGRO_CFG_ACODEC_OPUSFILE_DLL
+static void *op_dll = NULL;
+static bool op_virgin = true;
+#endif
+
+static struct
+{
+   void (*op_free)(OggOpusFile *_of);
+   int (*op_channel_count)(const OggOpusFile *_of,int _li);
+   OggOpusFile *(*op_open_callbacks)(void *_source, const OpusFileCallbacks *_cb, const unsigned char *_initial_data, size_t _initial_bytes, int *_error);
+   ogg_int64_t (*op_pcm_total)(const OggOpusFile *_of, int _li);
+   int (*op_pcm_seek)(OggOpusFile *_of, ogg_int64_t _pcm_offset);
+   ogg_int64_t (*op_pcm_tell)(const OggOpusFile *_of);
+   int (*op_read)(OggOpusFile *_of, opus_int16 *_pcm, int _buf_size, int *_li);
+} lib;
+
+
+#ifdef ALLEGRO_CFG_ACODEC_OPUSFILE_DLL
+static void shutdown_dynlib(void)
+{
+   if (op_dll) {
+      _al_close_library(op_dll);
+      op_dll = NULL;
+      op_virgin = true;
+   }
+}
+#endif
+
+
+static bool init_dynlib(void)
+{
+#ifdef ALLEGRO_CFG_ACODEC_OPUSFILE_DLL
+   if (op_dll) {
+      return true;
+   }
+
+   if (!op_virgin) {
+      return false;
+   }
+
+   op_virgin = false;
+
+   op_dll = _al_open_library(ALLEGRO_CFG_ACODEC_OPUSFILE_DLL);
+   if (!op_dll) {
+      ALLEGRO_WARN("Could not load " ALLEGRO_CFG_ACODEC_OPUSFILE_DLL "\n");
+      return false;
+   }
+
+   _al_add_exit_func(shutdown_dynlib, "shutdown_dynlib");
+
+   #define INITSYM(x)                                                         \
+      do                                                                      \
+      {                                                                       \
+         lib.x = _al_import_symbol(op_dll, #x);                               \
+         if (lib.x == 0) {                                                    \
+            ALLEGRO_ERROR("undefined symbol in lib structure: " #x "\n");     \
+            return false;                                                     \
+         }                                                                    \
+      } while(0)
+#else
+   #define INITSYM(x)   (lib.x = (x))
+#endif
+
+   memset(&lib, 0, sizeof(lib));
+
+   INITSYM(op_free);
+   INITSYM(op_channel_count);
+   INITSYM(op_open_callbacks);
+   INITSYM(op_pcm_total);
+   INITSYM(op_pcm_seek);
+   INITSYM(op_pcm_tell);
+   INITSYM(op_read);
+
+   return true;
+
+#undef INITSYM
+}
+
+
+static int read_callback(void *stream, unsigned char *ptr, int nbytes)
+{
+   AL_OP_DATA *op = (AL_OP_DATA *)stream;
+   size_t ret = 0;
+
+   ret = al_fread(op->file, ptr, nbytes);
+
+   return ret;
+}
+
+
+static int seek_callback(void *stream, opus_int64 offset, int whence)
+{
+   AL_OP_DATA *op = (AL_OP_DATA *)stream;
+
+   switch(whence) {
+      case SEEK_SET: whence = ALLEGRO_SEEK_SET; break;
+      case SEEK_CUR: whence = ALLEGRO_SEEK_CUR; break;
+      case SEEK_END: whence = ALLEGRO_SEEK_END; break;
+   }
+
+   if (!al_fseek(op->file, offset, whence)) {
+      return -1;
+   }
+
+   return 0;
+}
+
+
+static opus_int64 tell_callback(void *stream)
+{
+   AL_OP_DATA *op = (AL_OP_DATA *)stream;
+   int64_t ret = 0;
+
+   ret = al_ftell(op->file);
+   if (ret == -1)
+      return -1;
+
+   return ret;
+}
+
+
+static int close_callback(void *stream)
+{
+   /* Don't close stream->file here. */
+   (void)stream;
+   return 0;
+}
+
+
+static OpusFileCallbacks callbacks = {
+   read_callback,
+   seek_callback,
+   tell_callback,
+   close_callback
+};
+
+
+ALLEGRO_SAMPLE *_al_load_ogg_opus(const char *filename)
+{
+   ALLEGRO_FILE *f;
+   ALLEGRO_SAMPLE *spl;
+   ASSERT(filename);
+
+   ALLEGRO_INFO("Loading sample %s.\n", filename);
+   f = al_fopen(filename, "rb");
+   if (!f) {
+      ALLEGRO_WARN("Failed reading %s.\n", filename);
+      return NULL;
+   }
+
+   spl = _al_load_ogg_opus_f(f);
+
+   al_fclose(f);
+
+   return spl;
+}
+
+
+ALLEGRO_SAMPLE *_al_load_ogg_opus_f(ALLEGRO_FILE *file)
+{
+   /* Note: decoding library can return 16-bit or floating-point output,
+    * both using native endian ordering. (TODO: Implement float output,
+    * individual links in the stream...)
+    */
+   int word_size = 2; /* 2 = 16-bit. */
+   const int packet_size = 5760; /* suggestion for size to read at a time */
+   OggOpusFile *of;
+   opus_int16 *buffer;
+   ALLEGRO_SAMPLE *sample;
+   int channels;
+   long rate;
+   ogg_int64_t total_samples;
+   int bitstream;
+   ogg_int64_t total_size;
+   AL_OP_DATA op;
+   ogg_int64_t pos;
+   long read;
+
+   if (!init_dynlib()) {
+      return NULL;
+   }
+
+   op.file = file;
+   of = lib.op_open_callbacks(&op, &callbacks, NULL, 0, NULL);
+   if (!of) {
+      ALLEGRO_WARN("Audio file does not appear to be an Ogg bitstream.\n");
+      return NULL;
+   }
+
+   bitstream = -1;
+   channels = lib.op_channel_count(of, bitstream);
+   rate = 48000;
+   total_samples = lib.op_pcm_total(of, bitstream);
+   total_size = total_samples * channels * word_size;
+
+   ALLEGRO_DEBUG("channels %d\n", channels);
+   ALLEGRO_DEBUG("word_size %d\n", word_size);
+   ALLEGRO_DEBUG("rate %ld\n", rate);
+   ALLEGRO_DEBUG("total_samples %ld\n", (long)total_samples);
+   ALLEGRO_DEBUG("total_size %ld\n", (long)total_size);
+
+   buffer = al_malloc(total_size);
+   if (!buffer) {
+      return NULL;
+   }
+
+   pos = 0;
+   while (pos < total_samples) {
+      const int read_size = _ALLEGRO_MIN(packet_size, total_samples - pos);
+      ASSERT(pos + read_size <= total_samples);
+
+      /* XXX error handling */
+      read = lib.op_read(of, buffer + pos * channels, read_size, NULL);
+
+      pos += read;
+      if (read == 0)
+         break;
+   }
+
+   lib.op_free(of);
+
+   sample = al_create_sample(buffer, total_samples, rate,
+      _al_word_size_to_depth_conf(word_size),
+      _al_count_to_channel_conf(channels), true);
+
+   if (!sample) {
+      al_free(buffer);
+   }
+
+   return sample;
+}
+
+
+static bool ogg_stream_seek(ALLEGRO_AUDIO_STREAM *stream, double time)
+{
+   AL_OP_DATA *extra = (AL_OP_DATA *) stream->extra;
+
+   if (time >= extra->loop_end)
+      return false;
+
+   return !lib.op_pcm_seek(extra->of, time * 48000);;
+}
+
+
+static bool ogg_stream_rewind(ALLEGRO_AUDIO_STREAM *stream)
+{
+   AL_OP_DATA *extra = (AL_OP_DATA *) stream->extra;
+
+   return ogg_stream_seek(stream, extra->loop_start);
+}
+
+
+static double ogg_stream_get_position(ALLEGRO_AUDIO_STREAM *stream)
+{
+   AL_OP_DATA *extra = (AL_OP_DATA *) stream->extra;
+
+   return lib.op_pcm_tell(extra->of)/48000.0;
+}
+
+
+static double ogg_stream_get_length(ALLEGRO_AUDIO_STREAM *stream)
+{
+   AL_OP_DATA *extra = (AL_OP_DATA *) stream->extra;
+
+   return lib.op_pcm_total(extra->of, -1)/48000.0;
+}
+
+
+static bool ogg_stream_set_loop(ALLEGRO_AUDIO_STREAM *stream, double start, double end)
+{
+   AL_OP_DATA *extra = (AL_OP_DATA *) stream->extra;
+
+   extra->loop_start = start;
+   extra->loop_end = end;
+
+   return true;
+}
+
+
+/* To be called when stream is destroyed */
+static void ogg_stream_close(ALLEGRO_AUDIO_STREAM *stream)
+{
+   AL_OP_DATA *extra = (AL_OP_DATA *) stream->extra;
+
+   _al_acodec_stop_feed_thread(stream);
+
+   al_fclose(extra->file);
+
+   lib.op_free(extra->of);
+   al_free(extra);
+   stream->extra = NULL;
+}
+
+
+static size_t ogg_stream_update(ALLEGRO_AUDIO_STREAM *stream, void *data,
+                                size_t buf_size)
+{
+   AL_OP_DATA *extra = (AL_OP_DATA *) stream->extra;
+
+   const int word_size = 2;   /* 2 = 16-bit. opus_int16 size, for use in op_read */
+
+   unsigned long pos = 0;
+   int read_length = buf_size;
+   int buf_in_word;
+   long rate = 48000;
+   int channels = extra->channels;
+
+   double ctime = lib.op_pcm_tell(extra->of)/(double)rate;
+
+   double btime = ((double)buf_size / (word_size * channels)) / rate;
+   long read;
+
+   if (stream->spl.loop == _ALLEGRO_PLAYMODE_STREAM_ONEDIR) {
+      if (ctime + btime > extra->loop_end) {
+         read_length = (extra->loop_end - ctime) * rate * word_size * channels;
+         if (read_length < 0)
+            return 0;
+         read_length += read_length % word_size;
+      }
+   }
+
+   buf_in_word= read_length/word_size;
+
+   while (pos < (unsigned long) read_length) {
+      read = lib.op_read(extra->of, (opus_int16 *)data + pos, buf_in_word - pos, NULL);
+      pos += read * channels;
+
+      if (read == 0) {
+         /* Return the number of useful bytes written. */
+         return pos*word_size;
+      }
+   }
+
+   return pos;
+}
+
+
+ALLEGRO_AUDIO_STREAM *_al_load_ogg_opus_audio_stream(const char *filename,
+   size_t buffer_count, unsigned int samples)
+{
+   ALLEGRO_FILE *f;
+   ALLEGRO_AUDIO_STREAM *stream;
+   ASSERT(filename);
+
+   ALLEGRO_INFO("Loading stream %s.\n", filename);
+   f = al_fopen(filename, "rb");
+   if (!f) {
+      ALLEGRO_WARN("Failed reading %s.\n", filename);
+      return NULL;
+   }
+
+   stream = _al_load_ogg_opus_audio_stream_f(f, buffer_count, samples);
+   if (!stream) {
+      al_fclose(f);
+   }
+
+   return stream;
+}
+
+
+ALLEGRO_AUDIO_STREAM *_al_load_ogg_opus_audio_stream_f(ALLEGRO_FILE *file,
+   size_t buffer_count, unsigned int samples)
+{
+   const int word_size = 2; /* 1 = 8bit, 2 = 16-bit. nothing else */
+   OggOpusFile* of;
+   int channels;
+   long rate;
+   long total_samples;
+   long total_size;
+   int bitstream;
+   AL_OP_DATA* extra;
+   ALLEGRO_AUDIO_STREAM* stream;
+
+   if (!init_dynlib()) {
+      return NULL;
+   }
+
+   extra = al_malloc(sizeof(AL_OP_DATA));
+   if (extra == NULL) {
+      ALLEGRO_ERROR("Failed to allocate AL_OP_DATA struct.\n");
+      return NULL;
+   }
+
+   extra->file = file;
+
+   of = lib.op_open_callbacks(extra, &callbacks, NULL, 0, NULL);
+   if (!of) {
+      ALLEGRO_WARN("ogg: Input does not appear to be an Ogg bitstream.\n");
+      return NULL;
+   }
+
+   extra->of = of;
+   extra->bitstream = -1;
+   bitstream = extra->bitstream;
+
+   extra->channels = lib.op_channel_count(of, bitstream);
+   channels = extra->channels;
+
+   rate = 48000;
+   total_samples = lib.op_pcm_total(of, bitstream);
+   total_size = total_samples * channels * word_size;
+
+
+   ALLEGRO_DEBUG("channels %d\n", channels);
+   ALLEGRO_DEBUG("word_size %d\n", word_size);
+   ALLEGRO_DEBUG("rate %ld\n", rate);
+   ALLEGRO_DEBUG("total_samples %ld\n", total_samples);
+   ALLEGRO_DEBUG("total_size %ld\n", total_size);
+
+   stream = al_create_audio_stream(buffer_count, samples, rate,
+            _al_word_size_to_depth_conf(word_size),
+            _al_count_to_channel_conf(channels));
+   if (!stream) {
+      lib.op_free(of);
+      return NULL;
+   }
+
+   stream->extra = extra;
+
+   extra->loop_start = 0.0;
+   extra->loop_end = ogg_stream_get_length(stream);
+   stream->quit_feed_thread = false;
+   stream->feeder = ogg_stream_update;
+   stream->rewind_feeder = ogg_stream_rewind;
+   stream->seek_feeder = ogg_stream_seek;
+   stream->get_feeder_position = ogg_stream_get_position;
+   stream->get_feeder_length = ogg_stream_get_length;
+   stream->set_feeder_loop = ogg_stream_set_loop;
+   stream->unload_feeder = ogg_stream_close;
+   _al_acodec_start_feed_thread(stream);
+
+   return stream;
+}
+
+
+/* vim: set sts=3 sw=3 et: */
diff --git a/addons/audio/CMakeLists.txt b/addons/audio/CMakeLists.txt
index 543db99..ca3ab15 100644
--- a/addons/audio/CMakeLists.txt
+++ b/addons/audio/CMakeLists.txt
@@ -166,7 +166,7 @@ endif(ALLEGRO_SDL)
 
 configure_file(
     allegro5/internal/aintern_audio_cfg.h.cmake
-    ${CMAKE_BINARY_DIR}/include/allegro5/internal/aintern_audio_cfg.h
+    ${PROJECT_BINARY_DIR}/include/allegro5/internal/aintern_audio_cfg.h
     )
 
 if(NOT SUPPORT_AUDIO)
diff --git a/addons/audio/allegro5/internal/aintern_audio.h b/addons/audio/allegro5/internal/aintern_audio.h
index 46b03fe..935c92b 100644
--- a/addons/audio/allegro5/internal/aintern_audio.h
+++ b/addons/audio/allegro5/internal/aintern_audio.h
@@ -6,6 +6,7 @@
 #define AINTERN_AUDIO_H
 
 #include "allegro5/allegro.h"
+#include "allegro5/internal/aintern_list.h"
 #include "allegro5/internal/aintern_vector.h"
 #include "../allegro_audio.h"
 
@@ -116,6 +117,8 @@ struct ALLEGRO_VOICE {
    ALLEGRO_MUTEX        *mutex;
    ALLEGRO_COND         *cond;
 
+   _AL_LIST_ITEM        *dtor_item;
+
    ALLEGRO_AUDIO_DRIVER *driver;
                         /* XXX shouldn't there only be one audio driver active
                          * at a time?
@@ -147,6 +150,7 @@ struct ALLEGRO_SAMPLE {
                         /* Whether `buffer' needs to be freed when the sample
                          * is destroyed, or when `buffer' changes.
                          */
+   _AL_LIST_ITEM        *dtor_item;
 };
 
 /* Read some samples into a mixer buffer.
@@ -232,6 +236,7 @@ struct ALLEGRO_SAMPLE_INSTANCE {
    sample_parent_t      parent;
                         /* The object that this sample is attached to, if any.
                          */
+   _AL_LIST_ITEM        *dtor_item;
 };
 
 void _al_kcm_destroy_sample(ALLEGRO_SAMPLE_INSTANCE *sample, bool unregister);
@@ -308,6 +313,8 @@ struct ALLEGRO_AUDIO_STREAM {
                           * streams don't need to be fed by the user.
                           */
 
+   _AL_LIST_ITEM        *dtor_item;
+
    void                  *extra;
                          /* Extra data for use by the flac/vorbis addons. */
 };
@@ -337,6 +344,7 @@ struct ALLEGRO_MIXER {
                            /* Vector of ALLEGRO_SAMPLE_INSTANCE*.  Holds the list of
                             * streams being mixed together.
                             */
+   _AL_LIST_ITEM           *dtor_item;
 };
 
 extern void _al_kcm_mixer_rejig_sample_matrix(ALLEGRO_MIXER *mixer,
@@ -362,9 +370,9 @@ void _al_kcm_emit_stream_events(ALLEGRO_AUDIO_STREAM *stream);
 
 void _al_kcm_init_destructors(void);
 void _al_kcm_shutdown_destructors(void);
-void _al_kcm_register_destructor(char const *name, void *object,
+_AL_LIST_ITEM *_al_kcm_register_destructor(char const *name, void *object,
    void (*func)(void*));
-void _al_kcm_unregister_destructor(void *object);
+void _al_kcm_unregister_destructor(_AL_LIST_ITEM *dtor_item);
 void _al_kcm_foreach_destructor(
       void (*callback)(void *object, void (*func)(void *), void *udata),
       void *userdata);
diff --git a/addons/audio/kcm_dtor.c b/addons/audio/kcm_dtor.c
index e57c813..030ff16 100644
--- a/addons/audio/kcm_dtor.c
+++ b/addons/audio/kcm_dtor.c
@@ -53,19 +53,19 @@ void _al_kcm_shutdown_destructors(void)
 /* _al_kcm_register_destructor:
  *  Register an object to be destroyed.
  */
-void _al_kcm_register_destructor(char const *name, void *object,
+_AL_LIST_ITEM *_al_kcm_register_destructor(char const *name, void *object,
    void (*func)(void*))
 {
-   _al_register_destructor(kcm_dtors, name, object, func);
+   return _al_register_destructor(kcm_dtors, name, object, func);
 }
 
 
 /* _al_kcm_unregister_destructor:
  *  Unregister an object to be destroyed.
  */
-void _al_kcm_unregister_destructor(void *object)
+void _al_kcm_unregister_destructor(_AL_LIST_ITEM *dtor_item)
 {
-   _al_unregister_destructor(kcm_dtors, object);
+   _al_unregister_destructor(kcm_dtors, dtor_item);
 }
 
 
diff --git a/addons/audio/kcm_instance.c b/addons/audio/kcm_instance.c
index b29fe43..6924b32 100644
--- a/addons/audio/kcm_instance.c
+++ b/addons/audio/kcm_instance.c
@@ -178,7 +178,7 @@ ALLEGRO_SAMPLE_INSTANCE *al_create_sample_instance(ALLEGRO_SAMPLE *sample_data)
    spl->mutex = NULL;
    spl->parent.u.ptr = NULL;
 
-   _al_kcm_register_destructor("sample_instance", spl,
+   spl->dtor_item = _al_kcm_register_destructor("sample_instance", spl,
       (void (*)(void *))al_destroy_sample_instance);
 
    return spl;
@@ -200,7 +200,7 @@ void _al_kcm_destroy_sample(ALLEGRO_SAMPLE_INSTANCE *spl, bool unregister)
 {
    if (spl) {
       if (unregister) {
-         _al_kcm_unregister_destructor(spl);
+         _al_kcm_unregister_destructor(spl->dtor_item);
       }
 
       _al_kcm_detach_from_parent(spl);
@@ -397,6 +397,7 @@ bool al_set_sample_instance_length(ALLEGRO_SAMPLE_INSTANCE *spl,
    }
 
    spl->spl_data.len = val;
+   spl->loop_end = val;
    return true;
 }
 
diff --git a/addons/audio/kcm_mixer.c b/addons/audio/kcm_mixer.c
index e3a4375..ae38022 100644
--- a/addons/audio/kcm_mixer.c
+++ b/addons/audio/kcm_mixer.c
@@ -667,7 +667,7 @@ ALLEGRO_MIXER *al_create_mixer(unsigned int freq,
 
    _al_vector_init(&mixer->streams, sizeof(ALLEGRO_SAMPLE_INSTANCE *));
 
-   _al_kcm_register_destructor("mixer", mixer, (void (*)(void *)) al_destroy_mixer);
+   mixer->dtor_item = _al_kcm_register_destructor("mixer", mixer, (void (*)(void *)) al_destroy_mixer);
 
    return mixer;
 }
@@ -678,7 +678,7 @@ ALLEGRO_MIXER *al_create_mixer(unsigned int freq,
 void al_destroy_mixer(ALLEGRO_MIXER *mixer)
 {
    if (mixer) {
-      _al_kcm_unregister_destructor(mixer);
+      _al_kcm_unregister_destructor(mixer->dtor_item);
       _al_kcm_destroy_sample(&mixer->ss, false);
    }
 }
diff --git a/addons/audio/kcm_sample.c b/addons/audio/kcm_sample.c
index 6a36992..18dad6e 100644
--- a/addons/audio/kcm_sample.c
+++ b/addons/audio/kcm_sample.c
@@ -153,7 +153,7 @@ ALLEGRO_SAMPLE *al_create_sample(void *buf, unsigned int samples,
    spl->buffer.ptr = buf;
    spl->free_buf = free_buf;
 
-   _al_kcm_register_destructor("sample", spl, (void (*)(void *)) al_destroy_sample);
+   spl->dtor_item = _al_kcm_register_destructor("sample", spl, (void (*)(void *)) al_destroy_sample);
 
    return spl;
 }
@@ -184,7 +184,7 @@ void al_destroy_sample(ALLEGRO_SAMPLE *spl)
    if (spl) {
       _al_kcm_foreach_destructor(stop_sample_instances_helper,
          al_get_sample_data(spl));
-      _al_kcm_unregister_destructor(spl);
+      _al_kcm_unregister_destructor(spl->dtor_item);
 
       if (spl->free_buf && spl->buffer.ptr) {
          al_free(spl->buffer.ptr);
diff --git a/addons/audio/kcm_stream.c b/addons/audio/kcm_stream.c
index 8a2b87c..7692b05 100644
--- a/addons/audio/kcm_stream.c
+++ b/addons/audio/kcm_stream.c
@@ -135,7 +135,7 @@ ALLEGRO_AUDIO_STREAM *al_create_audio_stream(size_t fragment_count,
    al_init_user_event_source(&stream->spl.es);
 
    /* This can lead to deadlocks on shutdown, hence we don't do it. */
-   /* _al_kcm_register_destructor(stream, (void (*)(void *)) al_destroy_audio_stream); */
+   /* stream->dtor_item = _al_kcm_register_destructor(stream, (void (*)(void *)) al_destroy_audio_stream); */
 
    return stream;
 }
@@ -150,7 +150,7 @@ void al_destroy_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
          stream->unload_feeder(stream);
       }
       /* See commented out call to _al_kcm_register_destructor. */
-      /* _al_kcm_unregister_destructor(stream); */
+      /* _al_kcm_unregister_destructor(stream->dtor_item); */
       _al_kcm_detach_from_parent(&stream->spl);
 
       al_destroy_user_event_source(&stream->spl.es);
@@ -671,7 +671,7 @@ void *_al_kcm_feed_stream(ALLEGRO_THREAD *self, void *vstream)
 {
    ALLEGRO_AUDIO_STREAM *stream = vstream;
    ALLEGRO_EVENT_QUEUE *queue;
-   ALLEGRO_EVENT event;
+   bool finished_event_sent = false;
    (void)self;
 
    ALLEGRO_DEBUG("Stream feeder thread started.\n");
@@ -739,21 +739,33 @@ void *_al_kcm_feed_stream(ALLEGRO_THREAD *self, void *vstream)
             continue;
          }
 
-         /* The streaming source doesn't feed any more, drain buffers and quit. */
+         /* The streaming source doesn't feed any more, so drain buffers.
+          * Don't quit in case the user decides to seek and then restart the
+          * stream. */
          if (bytes_written != bytes &&
             stream->spl.loop == _ALLEGRO_PLAYMODE_STREAM_ONCE) {
             al_drain_audio_stream(stream);
-            stream->quit_feed_thread = true;
+
+            if (!finished_event_sent) {
+               ALLEGRO_EVENT fin_event;
+               fin_event.user.type = ALLEGRO_EVENT_AUDIO_STREAM_FINISHED;
+               fin_event.user.timestamp = al_get_time();
+               al_emit_user_event(&stream->spl.es, &fin_event, NULL);
+               finished_event_sent = true;
+            }
+         } else {
+            finished_event_sent = false;
          }
       }
       else if (event.type == _KCM_STREAM_FEEDER_QUIT_EVENT_TYPE) {
+         ALLEGRO_EVENT fin_event;
          stream->quit_feed_thread = true;
+
+         fin_event.user.type = ALLEGRO_EVENT_AUDIO_STREAM_FINISHED;
+         fin_event.user.timestamp = al_get_time();
+         al_emit_user_event(&stream->spl.es, &fin_event, NULL);
       }
    }
-   
-   event.user.type = ALLEGRO_EVENT_AUDIO_STREAM_FINISHED;
-   event.user.timestamp = al_get_time();
-   al_emit_user_event(&stream->spl.es, &event, NULL);
 
    al_destroy_event_queue(queue);
 
diff --git a/addons/audio/kcm_voice.c b/addons/audio/kcm_voice.c
index 49987c9..8443d1e 100644
--- a/addons/audio/kcm_voice.c
+++ b/addons/audio/kcm_voice.c
@@ -94,7 +94,7 @@ ALLEGRO_VOICE *al_create_voice(unsigned int freq,
       return NULL;
    }
 
-   _al_kcm_register_destructor("voice", voice,
+   voice->dtor_item = _al_kcm_register_destructor("voice", voice,
       (void (*)(void *)) al_destroy_voice);
 
    return voice;
@@ -106,7 +106,7 @@ ALLEGRO_VOICE *al_create_voice(unsigned int freq,
 void al_destroy_voice(ALLEGRO_VOICE *voice)
 {
    if (voice) {
-      _al_kcm_unregister_destructor(voice);
+      _al_kcm_unregister_destructor(voice->dtor_item);
 
       al_detach_voice(voice);
       ASSERT(al_get_voice_playing(voice) == false);
diff --git a/addons/font/allegro5/allegro_font.h b/addons/font/allegro5/allegro_font.h
index c32115e..68f7bc0 100644
--- a/addons/font/allegro5/allegro_font.h
+++ b/addons/font/allegro5/allegro_font.h
@@ -46,38 +46,25 @@
 /* Type: ALLEGRO_FONT
 */
 typedef struct ALLEGRO_FONT ALLEGRO_FONT;
-typedef struct ALLEGRO_FONT_VTABLE ALLEGRO_FONT_VTABLE;
+#if defined(ALLEGRO_UNSTABLE) || defined(ALLEGRO_INTERNAL_UNSTABLE) || defined(ALLEGRO_FONT_SRC)
 
-struct ALLEGRO_FONT
-{
-   void *data;
-   int height;
-   ALLEGRO_FONT *fallback;
-   ALLEGRO_FONT_VTABLE *vtable;
-};
+/* Type: ALLEGRO_GLYPH
+*/
+typedef struct ALLEGRO_GLYPH ALLEGRO_GLYPH;
 
-/* text- and font-related stuff */
-struct ALLEGRO_FONT_VTABLE
+struct ALLEGRO_GLYPH
 {
-   ALLEGRO_FONT_METHOD(int, font_height, (const ALLEGRO_FONT *f));
-   ALLEGRO_FONT_METHOD(int, font_ascent, (const ALLEGRO_FONT *f));
-   ALLEGRO_FONT_METHOD(int, font_descent, (const ALLEGRO_FONT *f));
-   ALLEGRO_FONT_METHOD(int, char_length, (const ALLEGRO_FONT *f, int ch));
-   ALLEGRO_FONT_METHOD(int, text_length, (const ALLEGRO_FONT *f, const ALLEGRO_USTR *text));
-   ALLEGRO_FONT_METHOD(int, render_char, (const ALLEGRO_FONT *f, ALLEGRO_COLOR color, int ch, float x, float y));
-   ALLEGRO_FONT_METHOD(int, render, (const ALLEGRO_FONT *f, ALLEGRO_COLOR color, const ALLEGRO_USTR *text, float x, float y));
-   ALLEGRO_FONT_METHOD(void, destroy, (ALLEGRO_FONT *f));
-   ALLEGRO_FONT_METHOD(void, get_text_dimensions, (const ALLEGRO_FONT *f,
-      const ALLEGRO_USTR *text, int *bbx, int *bby, int *bbw, int *bbh));
-   ALLEGRO_FONT_METHOD(int, get_font_ranges, (ALLEGRO_FONT *font,
-      int ranges_count, int *ranges));
-      
-   ALLEGRO_FONT_METHOD(bool, get_glyph_dimensions, (const ALLEGRO_FONT *f,
-      int codepoint, int *bbx, int *bby, int *bbw, int *bbh));      
-   ALLEGRO_FONT_METHOD(int, get_glyph_advance, (const ALLEGRO_FONT *font,
-      int codepoint1, int codepoint2));
-      
+   ALLEGRO_BITMAP *bitmap;
+   int x;
+   int y;
+   int w;
+   int h;
+   int kerning;
+   int offset_x;
+   int offset_y;
+   int advance;
 };
+#endif
 
 enum {
    ALLEGRO_NO_KERNING       = -1,
@@ -128,6 +115,9 @@ ALLEGRO_FONT_FUNC(bool, al_get_glyph_dimensions, (const ALLEGRO_FONT *f,
    int codepoint, int *bbx, int *bby, int *bbw, int *bbh));
 ALLEGRO_FONT_FUNC(int, al_get_glyph_advance, (const ALLEGRO_FONT *f,
    int codepoint1, int codepoint2));
+#if defined(ALLEGRO_UNSTABLE) || defined(ALLEGRO_INTERNAL_UNSTABLE) || defined(ALLEGRO_FONT_SRC)
+ALLEGRO_FONT_FUNC(bool, al_get_glyph, (const ALLEGRO_FONT *f, int prev_codepoint, int codepoint, ALLEGRO_GLYPH *glyph));
+#endif
 
 ALLEGRO_FONT_FUNC(void, al_draw_multiline_text, (const ALLEGRO_FONT *font, ALLEGRO_COLOR color, float x, float y, float max_width, float line_height, int flags, const char *text));
 ALLEGRO_FONT_FUNC(void, al_draw_multiline_textf, (const ALLEGRO_FONT *font, ALLEGRO_COLOR color, float x, float y, float max_width, float line_height, int flags, const char *format, ...));
diff --git a/addons/font/allegro5/internal/aintern_font.h b/addons/font/allegro5/internal/aintern_font.h
new file mode 100644
index 0000000..1336450
--- /dev/null
+++ b/addons/font/allegro5/internal/aintern_font.h
@@ -0,0 +1,41 @@
+#ifndef __al_included_allegro_aintern_font_h
+#define __al_included_allegro_aintern_font_h
+
+#include "allegro5/internal/aintern_list.h"
+
+typedef struct ALLEGRO_FONT_VTABLE ALLEGRO_FONT_VTABLE;
+
+struct ALLEGRO_FONT
+{
+   void *data;
+   int height;
+   ALLEGRO_FONT *fallback;
+   ALLEGRO_FONT_VTABLE *vtable;
+   _AL_LIST_ITEM *dtor_item;
+};
+
+/* text- and font-related stuff */
+struct ALLEGRO_FONT_VTABLE
+{
+   ALLEGRO_FONT_METHOD(int, font_height, (const ALLEGRO_FONT *f));
+   ALLEGRO_FONT_METHOD(int, font_ascent, (const ALLEGRO_FONT *f));
+   ALLEGRO_FONT_METHOD(int, font_descent, (const ALLEGRO_FONT *f));
+   ALLEGRO_FONT_METHOD(int, char_length, (const ALLEGRO_FONT *f, int ch));
+   ALLEGRO_FONT_METHOD(int, text_length, (const ALLEGRO_FONT *f, const ALLEGRO_USTR *text));
+   ALLEGRO_FONT_METHOD(int, render_char, (const ALLEGRO_FONT *f, ALLEGRO_COLOR color, int ch, float x, float y));
+   ALLEGRO_FONT_METHOD(int, render, (const ALLEGRO_FONT *f, ALLEGRO_COLOR color, const ALLEGRO_USTR *text, float x, float y));
+   ALLEGRO_FONT_METHOD(void, destroy, (ALLEGRO_FONT *f));
+   ALLEGRO_FONT_METHOD(void, get_text_dimensions, (const ALLEGRO_FONT *f,
+      const ALLEGRO_USTR *text, int *bbx, int *bby, int *bbw, int *bbh));
+   ALLEGRO_FONT_METHOD(int, get_font_ranges, (ALLEGRO_FONT *font,
+      int ranges_count, int *ranges));
+
+   ALLEGRO_FONT_METHOD(bool, get_glyph_dimensions, (const ALLEGRO_FONT *f,
+      int codepoint, int *bbx, int *bby, int *bbw, int *bbh));
+   ALLEGRO_FONT_METHOD(int, get_glyph_advance, (const ALLEGRO_FONT *font,
+      int codepoint1, int codepoint2));
+
+   ALLEGRO_FONT_METHOD(bool, get_glyph, (const ALLEGRO_FONT *f, int prev_codepoint, int codepoint, ALLEGRO_GLYPH *glyph));
+};
+
+#endif
diff --git a/addons/font/font.c b/addons/font/font.c
index 38c478c..e9335e1 100644
--- a/addons/font/font.c
+++ b/addons/font/font.c
@@ -17,6 +17,7 @@
 #include "allegro5/allegro_font.h"
 #include "allegro5/internal/aintern.h"
 #include "allegro5/internal/aintern_bitmap.h"
+#include "allegro5/internal/aintern_font.h"
 #include "allegro5/internal/aintern_exitfunc.h"
 #include "allegro5/internal/aintern_vector.h"
 
@@ -209,6 +210,27 @@ static int color_render(const ALLEGRO_FONT* f, ALLEGRO_COLOR color,
 }
 
 
+static bool color_get_glyph(const ALLEGRO_FONT *f, int prev_codepoint, int codepoint, ALLEGRO_GLYPH *glyph)
+{
+   ALLEGRO_BITMAP *g = _al_font_color_find_glyph(f, codepoint);
+   if (g) {
+      glyph->bitmap = g;
+      glyph->x = 0;
+      glyph->y = 0;
+      glyph->w = al_get_bitmap_width(g);
+      glyph->h = al_get_bitmap_height(g);
+      glyph->kerning = 0;
+      glyph->offset_x = 0;
+      glyph->offset_y = 0;
+      glyph->advance = glyph->w;
+      return true;
+   }
+   if (f->fallback) {
+      return f->fallback->vtable->get_glyph(f->fallback, prev_codepoint, codepoint, glyph);
+   }
+   return false;
+}
+
 
 /* color_destroy:
  *  (color vtable entry)
@@ -317,7 +339,8 @@ ALLEGRO_FONT_VTABLE _al_font_vtable_color = {
     color_get_text_dimensions,
     color_get_font_ranges,
     color_get_glyph_dimensions,
-    color_get_glyph_advance
+    color_get_glyph_advance,
+    color_get_glyph
 };
 
 
diff --git a/addons/font/font.h b/addons/font/font.h
index 4e592e0..7fb1b40 100644
--- a/addons/font/font.h
+++ b/addons/font/font.h
@@ -1,6 +1,8 @@
 #ifndef __al_included_allegro5_font_h
 #define __al_included_allegro5_font_h
 
+#include "allegro5/internal/aintern_font.h"
+
 extern ALLEGRO_FONT_VTABLE _al_font_vtable_color;
 
 typedef struct ALLEGRO_FONT_COLOR_DATA
diff --git a/addons/font/fontbmp.c b/addons/font/fontbmp.c
index 91f02dd..8645bf1 100644
--- a/addons/font/fontbmp.c
+++ b/addons/font/fontbmp.c
@@ -284,7 +284,7 @@ ALLEGRO_FONT *al_grab_font_from_bitmap(ALLEGRO_BITMAP *bmp,
    if (unmasked)
        al_destroy_bitmap(unmasked);
 
-   _al_register_destructor(_al_dtor_list, "font", f,
+   f->dtor_item = _al_register_destructor(_al_dtor_list, "font", f,
       (void (*)(void  *))al_destroy_font);
 
    return f;
diff --git a/addons/font/text.c b/addons/font/text.c
index 05fd0e5..c0d9aa3 100644
--- a/addons/font/text.c
+++ b/addons/font/text.c
@@ -26,6 +26,7 @@
 
 #include "allegro5/allegro_font.h"
 #include "allegro5/internal/aintern_dtor.h"
+#include "allegro5/internal/aintern_font.h"
 #include "allegro5/internal/aintern_system.h"
 
 /* If you call this, you're probably making a mistake. */
@@ -359,7 +360,7 @@ void al_destroy_font(ALLEGRO_FONT *f)
    if (!f)
       return;
 
-   _al_unregister_destructor(_al_dtor_list, f);
+   _al_unregister_destructor(_al_dtor_list, f->dtor_item);
 
    f->vtable->destroy(f);
 }
@@ -402,6 +403,12 @@ int al_get_glyph_advance(const ALLEGRO_FONT *f, int codepoint1, int codepoint2)
    return f->vtable->get_glyph_advance(f, codepoint1, codepoint2);
 }
 
+/* Function: al_get_glyph
+ */
+bool al_get_glyph(const ALLEGRO_FONT *f, int prev_codepoint, int codepoint, ALLEGRO_GLYPH *glyph)
+{
+   return f->vtable->get_glyph(f, prev_codepoint, codepoint, glyph);
+};
 
 
 /* This helper function helps splitting an ustr in several delimited parts.
diff --git a/addons/image/CMakeLists.txt b/addons/image/CMakeLists.txt
index 87ebf83..91b719a 100644
--- a/addons/image/CMakeLists.txt
+++ b/addons/image/CMakeLists.txt
@@ -136,7 +136,7 @@ endif(WANT_IMAGE_JPG AND NOT ALLEGRO_CFG_IIO_SUPPORT_JPG)
 
 configure_file(
     allegro5/internal/aintern_image_cfg.h.cmake
-    ${CMAKE_BINARY_DIR}/include/allegro5/internal/aintern_image_cfg.h
+    ${PROJECT_BINARY_DIR}/include/allegro5/internal/aintern_image_cfg.h
     )
 
 add_our_addon_library(allegro_image
diff --git a/addons/image/allegro5/allegro_image.h b/addons/image/allegro5/allegro_image.h
index 868f3da..75d6f5e 100644
--- a/addons/image/allegro5/allegro_image.h
+++ b/addons/image/allegro5/allegro_image.h
@@ -1,6 +1,8 @@
 #ifndef __al_included_allegro5_allegro_image_h
 #define __al_included_allegro5_allegro_image_h
 
+#include "allegro5/base.h"
+
 #if (defined ALLEGRO_MINGW32) || (defined ALLEGRO_MSVC) || (defined ALLEGRO_BCC32)
    #ifndef ALLEGRO_STATICLINK
       #ifdef ALLEGRO_IIO_SRC
diff --git a/addons/image/png.c b/addons/image/png.c
index 97badd0..4238557 100644
--- a/addons/image/png.c
+++ b/addons/image/png.c
@@ -288,7 +288,7 @@ static ALLEGRO_BITMAP *really_load_png(png_structp png_ptr, png_infop info_ptr,
 
             case 24:
                for (i = 0; i < width; i++) {
-                  uint32_t pix = READ3BYTES(ptr);
+                  uint32_t pix = _AL_READ3BYTES(ptr);
                   ptr += 3;
                   *(dest++) = pix & 0xff;
                   *(dest++) = (pix >> 8) & 0xff;
@@ -299,7 +299,7 @@ static ALLEGRO_BITMAP *really_load_png(png_structp png_ptr, png_infop info_ptr,
 
             case 32:
                for (i = 0; i < width; i++) {
-                  uint32_t pix = bmp_read32(ptr);
+                  uint32_t pix = *(uint32_t*)ptr;
                   int r = pix & 0xff;
                   int g = (pix >> 8) & 0xff;
                   int b = (pix >> 16) & 0xff;
diff --git a/addons/native_dialog/CMakeLists.txt b/addons/native_dialog/CMakeLists.txt
index c8e1d44..7d02dfa 100644
--- a/addons/native_dialog/CMakeLists.txt
+++ b/addons/native_dialog/CMakeLists.txt
@@ -57,7 +57,7 @@ endif()
 if(SUPPORT_NATIVE_DIALOG)
    configure_file(
        allegro5/internal/aintern_native_dialog_cfg.h.cmake
-       ${CMAKE_BINARY_DIR}/include/allegro5/internal/aintern_native_dialog_cfg.h
+       ${PROJECT_BINARY_DIR}/include/allegro5/internal/aintern_native_dialog_cfg.h
        )
    
    include_directories(SYSTEM ${NATIVE_DIALOG_INCLUDE_DIRECTORIES})
diff --git a/addons/native_dialog/allegro5/internal/aintern_native_dialog.h b/addons/native_dialog/allegro5/internal/aintern_native_dialog.h
index e7e3c1b..711b668 100644
--- a/addons/native_dialog/allegro5/internal/aintern_native_dialog.h
+++ b/addons/native_dialog/allegro5/internal/aintern_native_dialog.h
@@ -1,6 +1,7 @@
 #ifndef __al_included_allegro_aintern_native_dialog_h
 #define __al_included_allegro_aintern_native_dialog_h
 
+#include "allegro5/internal/aintern_list.h"
 #include "allegro5/internal/aintern_vector.h"
 #include "allegro5/internal/aintern_native_dialog_cfg.h"
 
@@ -41,6 +42,8 @@ struct ALLEGRO_NATIVE_DIALOG
    bool is_active;
    void *window;
    void *async_queue;
+   
+   _AL_LIST_ITEM *dtor_item;
 };
 
 extern bool _al_init_native_dialog_addon(void);
diff --git a/addons/native_dialog/dialog.c b/addons/native_dialog/dialog.c
index f407588..47a60ea 100644
--- a/addons/native_dialog/dialog.c
+++ b/addons/native_dialog/dialog.c
@@ -56,7 +56,7 @@ ALLEGRO_FILECHOOSER *al_create_native_file_dialog(
    fc->fc_patterns = al_ustr_new(patterns);
    fc->flags = mode;
 
-   _al_register_destructor(_al_dtor_list, "native_dialog", fc,
+   fc->dtor_item = _al_register_destructor(_al_dtor_list, "native_dialog", fc,
       (void (*)(void *))al_destroy_native_file_dialog);
 
    return (ALLEGRO_FILECHOOSER *)fc;
@@ -100,7 +100,7 @@ void al_destroy_native_file_dialog(ALLEGRO_FILECHOOSER *dialog)
    if (!fd)
       return;
 
-   _al_unregister_destructor(_al_dtor_list, fd);
+   _al_unregister_destructor(_al_dtor_list, fd->dtor_item);
 
    al_ustr_free(fd->title);
    al_destroy_path(fd->fc_initial_path);
diff --git a/addons/native_dialog/gtk_xgtk.c b/addons/native_dialog/gtk_xgtk.c
index b21b2e3..4ba61ae 100644
--- a/addons/native_dialog/gtk_xgtk.c
+++ b/addons/native_dialog/gtk_xgtk.c
@@ -21,6 +21,7 @@ typedef struct ARGS_CREATE
    ALLEGRO_DISPLAY_XGLX *display;
    int w;
    int h;
+   const char *title;
 } ARGS_CREATE;
 
 typedef struct
@@ -102,6 +103,8 @@ static gboolean do_create_display_hook(gpointer data)
    gtk_socket_add_id(GTK_SOCKET(socket), d->window);
    ALLEGRO_DEBUG("gtk_socket_add_id: window = %ld\n", d->window);
 
+   gtk_window_set_title(GTK_WINDOW(window), args->title);
+
    gtk_widget_show_all(window);
 
    if (display->flags & ALLEGRO_RESIZABLE) {
@@ -150,6 +153,7 @@ static bool xgtk_create_display_hook(ALLEGRO_DISPLAY *display, int w, int h)
    args.display = d;
    args.w = w;
    args.h = h;
+   args.title = al_get_new_window_title();
 
    return _al_gtk_wait_for_args(do_create_display_hook, &args);
 }
diff --git a/addons/native_dialog/osx_dialog.m b/addons/native_dialog/osx_dialog.m
index 20fd4f3..a4f2967 100644
--- a/addons/native_dialog/osx_dialog.m
+++ b/addons/native_dialog/osx_dialog.m
@@ -169,12 +169,14 @@ int _al_show_native_message_box(ALLEGRO_DISPLAY *display,
                                 ALLEGRO_NATIVE_DIALOG *fd)
 {
     (void)display;
-    @autoreleasepool {
+    {
+        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
         NSValue* fdValue = [NSValue valueWithPointer:fd];
         
         [ALLEGAlertWrapper performSelectorOnMainThread: @selector(displayAlert:)
                                          withObject: fdValue
                                       waitUntilDone: YES];
+        [pool release];
     }
     _al_osx_clear_mouse_state();
     return fd->mb_pressed_button;
@@ -353,7 +355,7 @@ void _al_append_native_text_log(ALLEGRO_NATIVE_DIALOG *textlog)
     NSMutableArray * _items;
 }
 +(ALLEGTargetManager*) sharedManager;
--(instancetype) init;
+-(id) init;
 -(void) dealloc;
 -(void) setMenu: (NSMenu*) menu forWindow:(NSWindow*) window;
 @end
@@ -372,7 +374,7 @@ void _al_append_native_text_log(ALLEGRO_NATIVE_DIALOG *textlog)
     NSMenu* _menu;
 }
 -(NSMenu*) menu;
--(instancetype) initWithMenu:(ALLEGRO_MENU*) amenu; // Designated initializer
+-(id) initWithMenu:(ALLEGRO_MENU*) amenu; // Designated initializer
 -(NSMenu*) menu;
 -(void) show;
 -(void) showPopup;
@@ -535,7 +537,7 @@ bool _al_show_popup_menu(ALLEGRO_DISPLAY *display, ALLEGRO_MENU *amenu)
     }
 }
 // Create target with ALLEGRO_MENU bound to it.
-- (instancetype)initWithMenu:(ALLEGRO_MENU*) source_menu
+- (id)initWithMenu:(ALLEGRO_MENU*) source_menu
 {
     self = [super init];
     if (self) {
@@ -546,7 +548,7 @@ bool _al_show_popup_menu(ALLEGRO_DISPLAY *display, ALLEGRO_MENU *amenu)
     }
     return self;
 }
--(instancetype) init
+-(id) init
 {
     /* This isn't a valid initializer */
     return nil;
@@ -657,7 +659,7 @@ static ALLEGTargetManager* _sharedmanager = nil;
     return _sharedmanager;
 }
 // Set up and register for notifications
--(instancetype) init
+-(id) init
 {
     self = [super init];
     if (self) {
@@ -714,7 +716,7 @@ static ALLEGTargetManager* _sharedmanager = nil;
 {
     NSUInteger index = [self indexForWindow:window];
     if (menu) {
-        NSDictionary* newentry = @{@"menu":menu, @"window":window};
+        NSDictionary* newentry = [NSDictionary dictionaryWithObjectsAndKeys:menu, @"menu", window, @"window", nil];
         if (index == NSNotFound) {
             [self->_items addObject: newentry];
         }
diff --git a/addons/native_dialog/textlog.c b/addons/native_dialog/textlog.c
index 3b1f3bd..aa7c645 100644
--- a/addons/native_dialog/textlog.c
+++ b/addons/native_dialog/textlog.c
@@ -80,7 +80,7 @@ ALLEGRO_TEXTLOG *al_open_native_text_log(char const *title, int flags)
       return NULL;
    }
 
-   _al_register_destructor(_al_dtor_list, "textlog", textlog,
+   textlog->dtor_item = _al_register_destructor(_al_dtor_list, "textlog", textlog,
       (void (*)(void *))al_close_native_text_log);
 
    return (ALLEGRO_TEXTLOG *)textlog;
@@ -111,7 +111,7 @@ void al_close_native_text_log(ALLEGRO_TEXTLOG *textlog)
          al_lock_mutex(dialog->tl_text_mutex);
       }
 
-      _al_unregister_destructor(_al_dtor_list, dialog);
+      _al_unregister_destructor(_al_dtor_list, dialog->dtor_item);
    }
 
    al_ustr_free(dialog->title);
diff --git a/addons/primitives/prim_opengl.c b/addons/primitives/prim_opengl.c
index 4c9ccc5..019be4c 100644
--- a/addons/primitives/prim_opengl.c
+++ b/addons/primitives/prim_opengl.c
@@ -16,6 +16,8 @@
  *      See readme.txt for copyright information.
  */
 
+#define ALLEGRO_INTERNAL_UNSTABLE
+
 #include "allegro5/allegro.h"
 #include "allegro5/allegro_primitives.h"
 #include "allegro5/allegro_opengl.h"
diff --git a/addons/ttf/CMakeLists.txt b/addons/ttf/CMakeLists.txt
index a84ab5a..3ecd666 100644
--- a/addons/ttf/CMakeLists.txt
+++ b/addons/ttf/CMakeLists.txt
@@ -9,7 +9,7 @@ set_our_header_properties(${TTF_INCLUDE_FILES})
 
 configure_file(
     allegro5/internal/aintern_ttf_cfg.h.cmake
-    ${CMAKE_BINARY_DIR}/include/allegro5/internal/aintern_ttf_cfg.h
+    ${PROJECT_BINARY_DIR}/include/allegro5/internal/aintern_ttf_cfg.h
     )
 
 set(TTF_LIBRARIES ${FREETYPE_LIBRARIES})
diff --git a/addons/ttf/ttf.c b/addons/ttf/ttf.c
index 4ec0d63..6540a00 100644
--- a/addons/ttf/ttf.c
+++ b/addons/ttf/ttf.c
@@ -1,3 +1,5 @@
+#define ALLEGRO_INTERNAL_UNSTABLE
+
 #include "allegro5/allegro.h"
 #ifdef ALLEGRO_CFG_OPENGL
 #include "allegro5/allegro_opengl.h"
@@ -6,6 +8,7 @@
 #include "allegro5/internal/aintern_vector.h"
 
 #include "allegro5/allegro_ttf.h"
+#include "allegro5/internal/aintern_font.h"
 #include "allegro5/internal/aintern_ttf_cfg.h"
 #include "allegro5/internal/aintern_dtor.h"
 #include "allegro5/internal/aintern_system.h"
@@ -495,8 +498,7 @@ static int get_kerning(ALLEGRO_TTF_FONT_DATA const *data, FT_Face face,
 }
 
 
-static int render_glyph(ALLEGRO_FONT const *f, ALLEGRO_COLOR color,
-   int prev_ft_index, int ft_index, int32_t ch, float xpos, float ypos)
+static bool ttf_get_glyph_worker(ALLEGRO_FONT const *f, int prev_ft_index, int ft_index, int prev_codepoint, int codepoint, ALLEGRO_GLYPH *info)
 {
    ALLEGRO_TTF_FONT_DATA *data = f->data;
    FT_Face face = data->face;
@@ -504,35 +506,73 @@ static int render_glyph(ALLEGRO_FONT const *f, ALLEGRO_COLOR color,
    int advance = 0;
 
    if (!get_glyph(data, ft_index, &glyph)) {
-      if (f->fallback) {
-         al_draw_glyph(f->fallback, color, xpos, ypos, ch);
-         return al_get_glyph_advance(f->fallback, ch,
-            ALLEGRO_NO_KERNING);
-      }
+      if (f->fallback)
+         return f->fallback->vtable->get_glyph(f->fallback, prev_codepoint, codepoint, info);
       else {
          get_glyph(data, 0, &glyph);
          ft_index = 0;
       }
    }
+
    cache_glyph(data, face, ft_index, glyph, false);
 
    advance += get_kerning(data, face, prev_ft_index, ft_index);
 
    if (glyph->page_bitmap) {
-      /* Each glyph has a 1-pixel border all around. */
-      al_draw_tinted_bitmap_region(glyph->page_bitmap, color,
-         glyph->region.x + 1, glyph->region.y + 1,
-         glyph->region.w - 2, glyph->region.h - 2,
-         xpos + glyph->offset_x + advance,
-         ypos + glyph->offset_y, 0);
+      info->bitmap = glyph->page_bitmap;
+      info->x = glyph->region.x + 1;
+      info->y = glyph->region.y + 1;
+      info->w = glyph->region.w - 2;
+      info->h = glyph->region.h - 2;
+      info->kerning = advance;
+      info->offset_x = glyph->offset_x;
+      info->offset_y = glyph->offset_y;
    }
    else if (glyph->region.x > 0) {
       ALLEGRO_ERROR("Glyph %d not on any page.\n", ft_index);
+      return false;
+   }
+   else {
+      info->bitmap = 0;
    }
 
    advance += glyph->advance;
 
-   return advance;
+   info->advance = advance;
+
+   return true;
+}
+
+
+static bool ttf_get_glyph(ALLEGRO_FONT const *f, int prev_codepoint, int codepoint, ALLEGRO_GLYPH *glyph)
+{
+   ALLEGRO_TTF_FONT_DATA *data = f->data;
+   FT_Face face = data->face;
+   int prev_ft_index = (prev_codepoint == -1) ? -1 : (int)FT_Get_Char_Index(face, prev_codepoint);
+   int ft_index = FT_Get_Char_Index(face, codepoint);
+   return ttf_get_glyph_worker(f, prev_ft_index, ft_index, prev_codepoint, codepoint, glyph);
+}
+
+
+static int render_glyph(ALLEGRO_FONT const *f, ALLEGRO_COLOR color,
+   int prev_ft_index, int ft_index, int32_t prev_ch, int32_t ch, float xpos, float ypos)
+{
+   ALLEGRO_GLYPH glyph;
+
+   if (ttf_get_glyph_worker(f, prev_ft_index, ft_index, prev_ch, ch, &glyph) == false)
+      return 0;
+
+   if (glyph.bitmap != NULL) {
+      al_draw_tinted_bitmap_region(
+         glyph.bitmap, color,
+         glyph.x, glyph.y, glyph.w, glyph.h,
+         xpos + glyph.offset_x + glyph.kerning,
+         ypos + glyph.offset_y,
+         0
+      );
+   }
+
+   return glyph.advance;
 }
 
 
@@ -578,10 +618,10 @@ static int ttf_render_char(ALLEGRO_FONT const *f, ALLEGRO_COLOR color,
    FT_Face face = data->face;
    int advance = 0;
    int32_t ch32 = (int32_t) ch;
-   
+
    int ft_index = FT_Get_Char_Index(face, ch32);
-   advance = render_glyph(f, color, -1, ft_index, ch, xpos, ypos);
-   
+   advance = render_glyph(f, color, -1, ft_index, -1, ch, xpos, ypos);
+
    return advance;
 }
 
@@ -591,7 +631,7 @@ static int ttf_char_length(ALLEGRO_FONT const *f, int ch)
    int result;
    ALLEGRO_TTF_FONT_DATA *data = f->data;
    ALLEGRO_TTF_GLYPH_DATA *glyph;
-   FT_Face face = data->face;   
+   FT_Face face = data->face;
    int ft_index = FT_Get_Char_Index(face, ch);
    if (!get_glyph(data, ft_index, &glyph)) {
       if (f->fallback) {
@@ -604,7 +644,7 @@ static int ttf_char_length(ALLEGRO_FONT const *f, int ch)
    }
    cache_glyph(data, face, ft_index, glyph, false);
    result = glyph->region.w - 2;
-     
+
    return result;
 }
 
@@ -617,6 +657,7 @@ static int ttf_render(ALLEGRO_FONT const *f, ALLEGRO_COLOR color,
    int pos = 0;
    int advance = 0;
    int prev_ft_index = -1;
+   int32_t prev_ch = -1;
    int32_t ch;
    bool hold;
 
@@ -625,9 +666,10 @@ static int ttf_render(ALLEGRO_FONT const *f, ALLEGRO_COLOR color,
 
    while ((ch = al_ustr_get_next(text, &pos)) >= 0) {
       int ft_index = FT_Get_Char_Index(face, ch);
-      advance += render_glyph(f, color, prev_ft_index, ft_index, ch,
+      advance += render_glyph(f, color, prev_ft_index, ft_index, prev_ch, ch,
          x + advance, y);
       prev_ft_index = ft_index;
+      prev_ch = ch;
    }
 
    al_hold_bitmap_drawing(hold);
@@ -663,7 +705,8 @@ static void ttf_get_text_dimensions(ALLEGRO_FONT const *f,
    bool first = true;
    int x = 0;
    int32_t ch, nch;
-
+   int ymin = f->height;
+   int ymax = 0;
    *bbx = 0;
 
    nch = al_ustr_get_next(text, &pos);
@@ -676,21 +719,29 @@ static void ttf_get_text_dimensions(ALLEGRO_FONT const *f,
       }
 
       if (nch < 0) {
-         x += gx + gw + 2;
+         x += gx + gw;
       }
       else {
          x += al_get_glyph_advance(f, ch, nch);
       }
 
+      if (gy < ymin) {
+         ymin = gy;
+      }
+
+      if (gh+gy > ymax) {
+         ymax = gh + gy;
+      }
+
       if (first) {
          *bbx = gx;
          first = false;
       }
    }
 
-   *bby = 0; // FIXME
+   *bby = ymin;
    *bbw = x - *bbx;
-   *bbh = f->height; // FIXME, we want the bounding box!
+   *bbh = ymax - ymin;
 }
 
 
@@ -794,7 +845,7 @@ ALLEGRO_FONT *al_load_ttf_font_stretch_f(ALLEGRO_FILE *file,
       al_get_config_value(system_cfg, "ttf", "max_page_size");
     const char* cache_str =
       al_get_config_value(system_cfg, "ttf", "cache_text");
-    const char* skip_cache_misses_str = 
+    const char* skip_cache_misses_str =
       al_get_config_value(system_cfg, "ttf", "skip_cache_misses");
 
     if ((h > 0 && w < 0) || (h < 0 && w > 0)) {
@@ -895,7 +946,7 @@ ALLEGRO_FONT *al_load_ttf_font_stretch_f(ALLEGRO_FILE *file,
 
     _al_vector_init(&data->glyph_ranges, sizeof(ALLEGRO_TTF_GLYPH_RANGE));
     _al_vector_init(&data->page_bitmaps, sizeof(ALLEGRO_BITMAP*));
-    
+
     if (data->skip_cache_misses) {
        cache_glyphs(data, "\0", 1);
     }
@@ -909,7 +960,7 @@ ALLEGRO_FONT *al_load_ttf_font_stretch_f(ALLEGRO_FILE *file,
     f->vtable = &vt;
     f->data = data;
 
-    _al_register_destructor(_al_dtor_list, "ttf_font", f,
+    f->dtor_item = _al_register_destructor(_al_dtor_list, "ttf_font", f,
        (void (*)(void *))al_destroy_font);
 
     return f;
@@ -983,7 +1034,7 @@ static bool ttf_get_glyph_dimensions(ALLEGRO_FONT const *f,
 {
    ALLEGRO_TTF_FONT_DATA *data = f->data;
    ALLEGRO_TTF_GLYPH_DATA *glyph;
-   FT_Face face = data->face;   
+   FT_Face face = data->face;
    int ft_index = FT_Get_Char_Index(face, codepoint);
    if (!get_glyph(data, ft_index, &glyph)) {
       if (f->fallback) {
@@ -998,9 +1049,9 @@ static bool ttf_get_glyph_dimensions(ALLEGRO_FONT const *f,
    cache_glyph(data, face, ft_index, glyph, false);
    *bbx = glyph->offset_x;
    *bbw = glyph->region.w - 2;
-   *bbh = glyph->region.h;
+   *bbh = glyph->region.h - 2;
    *bby = glyph->offset_y;
-      
+
    return true;
 }
 
@@ -1010,10 +1061,10 @@ static int ttf_get_glyph_advance(ALLEGRO_FONT const *f, int codepoint1,
    ALLEGRO_TTF_FONT_DATA *data = f->data;
    FT_Face face = data->face;
    int ft_index = FT_Get_Char_Index(face, codepoint1);
-   ALLEGRO_TTF_GLYPH_DATA *glyph; 
+   ALLEGRO_TTF_GLYPH_DATA *glyph;
    int kerning = 0;
    int advance = 0;
-   
+
    if (codepoint1 == ALLEGRO_NO_KERNING) {
       return 0;
    }
@@ -1028,13 +1079,13 @@ static int ttf_get_glyph_advance(ALLEGRO_FONT const *f, int codepoint1,
       }
    }
    cache_glyph(data, face, ft_index, glyph, false);
-   
-   if (codepoint2 != ALLEGRO_NO_KERNING) { 
+
+   if (codepoint2 != ALLEGRO_NO_KERNING) {
       int ft_index1 = FT_Get_Char_Index(face, codepoint1);
-      int ft_index2 = FT_Get_Char_Index(face, codepoint2); 
+      int ft_index2 = FT_Get_Char_Index(face, codepoint2);
       kerning = get_kerning(data, face, ft_index1, ft_index2);
    }
-   
+
    advance = glyph->advance;
    return advance + kerning;
 }
@@ -1063,6 +1114,7 @@ bool al_init_ttf_addon(void)
    vt.get_font_ranges = ttf_get_font_ranges;
    vt.get_glyph_dimensions = ttf_get_glyph_dimensions;
    vt.get_glyph_advance = ttf_get_glyph_advance;
+   vt.get_glyph = ttf_get_glyph;
 
    al_register_font_loader(".ttf", al_load_ttf_font);
 
diff --git a/addons/video/CMakeLists.txt b/addons/video/CMakeLists.txt
index 0cc7150..61a322b 100644
--- a/addons/video/CMakeLists.txt
+++ b/addons/video/CMakeLists.txt
@@ -42,7 +42,7 @@ include_directories(SYSTEM ${VIDEO_INCLUDE_DIRECTORIES})
 
 configure_file(
     allegro5/internal/aintern_video_cfg.h.cmake
-    ${CMAKE_BINARY_DIR}/include/allegro5/internal/aintern_video_cfg.h
+    ${PROJECT_BINARY_DIR}/include/allegro5/internal/aintern_video_cfg.h
     )
 
 add_our_addon_library(allegro_video
diff --git a/allegro.mft b/allegro.mft
index 29d6a44..7ca412d 100644
--- a/allegro.mft
+++ b/allegro.mft
@@ -32,6 +32,7 @@ allegro/addons/acodec/helper.c
 allegro/addons/acodec/helper.h
 allegro/addons/acodec/modaudio.c
 allegro/addons/acodec/ogg.c
+allegro/addons/acodec/opus.c
 allegro/addons/acodec/voc.c
 allegro/addons/acodec/wav.c
 allegro/addons/audio/
@@ -68,6 +69,8 @@ allegro/addons/font/
 allegro/addons/font/CMakeLists.txt
 allegro/addons/font/allegro5/
 allegro/addons/font/allegro5/allegro_font.h
+allegro/addons/font/allegro5/internal/
+allegro/addons/font/allegro5/internal/aintern_font.h
 allegro/addons/font/font.c
 allegro/addons/font/font.h
 allegro/addons/font/fontbmp.c
@@ -188,6 +191,7 @@ allegro/android/allegro_activity/src/AllegroAPKStream.java
 allegro/android/allegro_activity/src/AllegroActivity.java
 allegro/android/allegro_activity/src/AllegroEGL.java
 allegro/android/allegro_activity/src/AllegroInputStream.java
+allegro/android/allegro_activity/src/AllegroJoystick.java
 allegro/android/allegro_activity/src/AllegroSurface.java
 allegro/android/allegro_activity/src/Clipboard.java
 allegro/android/allegro_activity/src/Const.java
@@ -237,12 +241,14 @@ allegro/cmake/FindCg.cmake
 allegro/cmake/FindDUMB.cmake
 allegro/cmake/FindDXGuid.cmake
 allegro/cmake/FindDirectX.cmake
+allegro/cmake/FindENet.cmake
 allegro/cmake/FindFLAC.cmake
 allegro/cmake/FindGDIPLUS.cmake
 allegro/cmake/FindOgg.cmake
 allegro/cmake/FindOpenGLES.cmake
 allegro/cmake/FindOpenGLES2.cmake
 allegro/cmake/FindOpenSL.cmake
+allegro/cmake/FindOpus.cmake
 allegro/cmake/FindTheora.cmake
 allegro/cmake/FindTremor.cmake
 allegro/cmake/FindVorbis.cmake
@@ -578,6 +584,7 @@ allegro/docs/man/ALLEGRO_FOR_EACH_FS_ENTRY_RESULT.3
 allegro/docs/man/ALLEGRO_FS_ENTRY.3
 allegro/docs/man/ALLEGRO_FS_INTERFACE.3
 allegro/docs/man/ALLEGRO_GET_EVENT_TYPE.3
+allegro/docs/man/ALLEGRO_GLYPH.3
 allegro/docs/man/ALLEGRO_HAPTIC.3
 allegro/docs/man/ALLEGRO_HAPTIC_CONSTANTS.3
 allegro/docs/man/ALLEGRO_HAPTIC_EFFECT.3
@@ -649,6 +656,8 @@ allegro/docs/man/al_add_config_comment.3
 allegro/docs/man/al_add_config_section.3
 allegro/docs/man/al_add_new_bitmap_flag.3
 allegro/docs/man/al_add_timer_count.3
+allegro/docs/man/al_android_get_activity.3
+allegro/docs/man/al_android_get_jni_env.3
 allegro/docs/man/al_android_get_os_version.3
 allegro/docs/man/al_android_set_apk_file_interface.3
 allegro/docs/man/al_android_set_apk_fs_interface.3
@@ -663,6 +672,8 @@ allegro/docs/man/al_attach_sample_instance_to_mixer.3
 allegro/docs/man/al_attach_sample_instance_to_voice.3
 allegro/docs/man/al_attach_shader_source.3
 allegro/docs/man/al_attach_shader_source_file.3
+allegro/docs/man/al_backup_dirty_bitmap.3
+allegro/docs/man/al_backup_dirty_bitmaps.3
 allegro/docs/man/al_broadcast_cond.3
 allegro/docs/man/al_build_camera_transform.3
 allegro/docs/man/al_build_menu.3
@@ -919,9 +930,11 @@ allegro/docs/man/al_get_audio_stream_position_secs.3
 allegro/docs/man/al_get_audio_stream_speed.3
 allegro/docs/man/al_get_available_audio_stream_fragments.3
 allegro/docs/man/al_get_backbuffer.3
+allegro/docs/man/al_get_bitmap_depth.3
 allegro/docs/man/al_get_bitmap_flags.3
 allegro/docs/man/al_get_bitmap_format.3
 allegro/docs/man/al_get_bitmap_height.3
+allegro/docs/man/al_get_bitmap_samples.3
 allegro/docs/man/al_get_bitmap_width.3
 allegro/docs/man/al_get_bitmap_x.3
 allegro/docs/man/al_get_bitmap_y.3
@@ -973,6 +986,7 @@ allegro/docs/man/al_get_fs_entry_mtime.3
 allegro/docs/man/al_get_fs_entry_name.3
 allegro/docs/man/al_get_fs_entry_size.3
 allegro/docs/man/al_get_fs_interface.3
+allegro/docs/man/al_get_glyph.3
 allegro/docs/man/al_get_glyph_advance.3
 allegro/docs/man/al_get_glyph_dimensions.3
 allegro/docs/man/al_get_glyph_width.3
@@ -1023,8 +1037,10 @@ allegro/docs/man/al_get_mouse_wheel_precision.3
 allegro/docs/man/al_get_native_file_dialog_count.3
 allegro/docs/man/al_get_native_file_dialog_path.3
 allegro/docs/man/al_get_native_text_log_event_source.3
+allegro/docs/man/al_get_new_bitmap_depth.3
 allegro/docs/man/al_get_new_bitmap_flags.3
 allegro/docs/man/al_get_new_bitmap_format.3
+allegro/docs/man/al_get_new_bitmap_samples.3
 allegro/docs/man/al_get_new_display_adapter.3
 allegro/docs/man/al_get_new_display_flags.3
 allegro/docs/man/al_get_new_display_option.3
@@ -1346,8 +1362,10 @@ allegro/docs/man/al_set_mouse_w.3
 allegro/docs/man/al_set_mouse_wheel_precision.3
 allegro/docs/man/al_set_mouse_xy.3
 allegro/docs/man/al_set_mouse_z.3
+allegro/docs/man/al_set_new_bitmap_depth.3
 allegro/docs/man/al_set_new_bitmap_flags.3
 allegro/docs/man/al_set_new_bitmap_format.3
+allegro/docs/man/al_set_new_bitmap_samples.3
 allegro/docs/man/al_set_new_display_adapter.3
 allegro/docs/man/al_set_new_display_flags.3
 allegro/docs/man/al_set_new_display_option.3
@@ -1691,6 +1709,7 @@ allegro/examples/data/sample.cfg
 allegro/examples/data/texture.tga
 allegro/examples/data/welcome.voc
 allegro/examples/data/welcome.wav
+allegro/examples/enet_common.h
 allegro/examples/ex_acodec.c
 allegro/examples/ex_acodec_multi.c
 allegro/examples/ex_audio_chain.cpp
@@ -1715,6 +1734,7 @@ allegro/examples/ex_cpu.c
 allegro/examples/ex_curl.c
 allegro/examples/ex_d3d.cpp
 allegro/examples/ex_depth_mask.c
+allegro/examples/ex_depth_target.c
 allegro/examples/ex_dir.c
 allegro/examples/ex_disable_screensaver.c
 allegro/examples/ex_display_events.c
@@ -1723,6 +1743,8 @@ allegro/examples/ex_draw.c
 allegro/examples/ex_draw_bitmap.c
 allegro/examples/ex_drawpixels.c
 allegro/examples/ex_dualies.c
+allegro/examples/ex_enet_client.c
+allegro/examples/ex_enet_server.c
 allegro/examples/ex_expose.c
 allegro/examples/ex_file.c
 allegro/examples/ex_file_slice.c
@@ -1762,6 +1784,7 @@ allegro/examples/ex_mouse_events.c
 allegro/examples/ex_mouse_focus.c
 allegro/examples/ex_mouse_warp.c
 allegro/examples/ex_multisample.c
+allegro/examples/ex_multisample_target.c
 allegro/examples/ex_multiwin.c
 allegro/examples/ex_native_filechooser.c
 allegro/examples/ex_nodisplay.c
@@ -2019,6 +2042,7 @@ allegro/misc/gcc-uni.sh
 allegro/misc/gl_mkalias.sh
 allegro/misc/icon.png
 allegro/misc/icon.xpm
+allegro/misc/install_test.c
 allegro/misc/make_android_project.py
 allegro/misc/make_converters.py
 allegro/misc/make_mixer_helpers.py
diff --git a/android/Activity.cmake b/android/Activity.cmake
index 8bb217b..5e6b52d 100644
--- a/android/Activity.cmake
+++ b/android/Activity.cmake
@@ -1,4 +1,4 @@
-set(ACTIVITY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/allegro_activity)
+set(ACTIVITY_DIR ${CMAKE_CURRENT_BINARY_DIR}/allegro_activity)
 set(ACTIVITY_JAR ${LIBRARY_OUTPUT_PATH}/Allegro5.jar)
 
 file(GLOB javas "${ACTIVITY_DIR}/src/*.java")
@@ -6,8 +6,6 @@ file(GLOB javas "${ACTIVITY_DIR}/src/*.java")
 set(ACTIVITY_SOURCES
     ${ACTIVITY_DIR}/AndroidManifest.xml
     ${ACTIVITY_DIR}/build.xml
-    ${ACTIVITY_DIR}/local.properties
-    ${ACTIVITY_DIR}/project.properties
     ${javas}
     )
 
@@ -19,22 +17,31 @@ add_custom_command(
     )
 
 configure_file(
-    ${ACTIVITY_DIR}/localgen.properties.in
+    allegro_activity/localgen.properties.in
     ${ACTIVITY_DIR}/localgen.properties
     )
 configure_file(
-    ${ACTIVITY_DIR}/project.properties.in
+   allegro_activity/project.properties.in
     ${ACTIVITY_DIR}/project.properties
     @ONLY)
 
 add_custom_command(
     OUTPUT ${ACTIVITY_JAR}
     DEPENDS ${ACTIVITY_SOURCES}
+    ${ACTIVITY_DIR}/local.properties
+    ${ACTIVITY_DIR}/project.properties
     WORKING_DIRECTORY ${ACTIVITY_DIR}
     COMMAND ${ANT_COMMAND} debug jar
     VERBATIM
     )
 
+add_custom_command(
+   OUTPUT ${ACTIVITY_SOURCES}
+   COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory
+   ${CMAKE_CURRENT_SOURCE_DIR}/allegro_activity
+   ${ACTIVITY_DIR}
+   )
+
 add_custom_target(jar
     ALL
     DEPENDS ${ACTIVITY_JAR}
diff --git a/android/allegro_activity/src/AllegroActivity.java b/android/allegro_activity/src/AllegroActivity.java
index eeec061..346b1bf 100644
--- a/android/allegro_activity/src/AllegroActivity.java
+++ b/android/allegro_activity/src/AllegroActivity.java
@@ -534,8 +534,28 @@ public class AllegroActivity extends Activity
       joystickActive = false;
    }
 
+   private boolean got_clip = false;
+   private String clip_text;
+   private boolean set_clip = false;
+   private boolean set_clip_result;
+
    public String getClipboardText() {
-      return clipboard.getText();
+      got_clip = false;
+      try {
+         runOnUiThread(new Runnable() {
+            @Override public void run() {
+               clip_text = clipboard.getText();
+               got_clip = true;
+            }
+         });
+      }
+      catch (Exception e) {
+         Log.d("AllegroActivity", "getClipboardText failed");
+         clip_text = "";
+         got_clip = true;
+      }
+      while (got_clip == false);
+      return clip_text;
    }
 
    public boolean hasClipboardText() {
@@ -543,7 +563,23 @@ public class AllegroActivity extends Activity
    }
 
    public boolean setClipboardText(String text) {
-      return clipboard.setText(text);
+      final String t = text;
+      set_clip = false;
+      try {
+         runOnUiThread(new Runnable() {
+            @Override public void run() {
+               set_clip_result = clipboard.setText(t);
+               set_clip = true;
+            }
+         });
+      }
+      catch (Exception e) {
+         Log.d("AllegroActivity", "setClipboardText failed");
+         set_clip_result = false;
+         set_clip = true;
+      }
+      while (set_clip == false);
+      return set_clip_result;
    }
 }
 
diff --git a/android/allegro_activity/src/AllegroEGL.java b/android/allegro_activity/src/AllegroEGL.java
index 617e2ea..e0d4928 100644
--- a/android/allegro_activity/src/AllegroEGL.java
+++ b/android/allegro_activity/src/AllegroEGL.java
@@ -63,7 +63,7 @@ class AllegroEGL
 
       egl_Display = dpy;
 
-      Log.d(TAG, "egl_Init end");
+      Log.d(TAG, "egl_Init OpenGL ES " + egl_version[0] + "." + egl_version[1]);
       return true;
    }
 
@@ -213,12 +213,9 @@ class AllegroEGL
          return 0;
       }
 
-      Log.d(TAG, "EGL context created");
+      Log.d(TAG, "EGL context (OpenGL ES " + version + ") created");
 
       egl_Context = ctx;
-
-      Log.d(TAG, "egl_createContext end");
-
       return 1;
    }
 
diff --git a/android/allegro_activity/src/AllegroJoystick.java b/android/allegro_activity/src/AllegroJoystick.java
new file mode 100644
index 0000000..d3d7b0d
--- /dev/null
+++ b/android/allegro_activity/src/AllegroJoystick.java
@@ -0,0 +1,86 @@
+package org.liballeg.android;
+
+import android.view.View.OnGenericMotionListener;
+import android.view.MotionEvent;
+import android.view.InputDevice;
+import android.view.View;
+
+class AllegroJoystick implements OnGenericMotionListener
+{
+   private AllegroActivity activity;
+   private AllegroSurface surface;
+
+   public AllegroJoystick(AllegroActivity activity, AllegroSurface surface) {
+      this.activity = activity;
+      this.surface = surface;
+   }
+
+   private float axis0_x = 0.0f;
+   private float axis0_y = 0.0f;
+   private float axis0_hat_x = 0.0f;
+   private float axis0_hat_y = 0.0f;
+   private float axis1_x = 0.0f;
+   private float axis1_y = 0.0f;
+
+   private void handleHat(int index1, float old, float cur, int button1, int button2) {
+      if (old == cur)
+         return;
+
+      if (old == 0) {
+         if (cur < 0)
+            surface.nativeOnJoystickButton(index1, button1, true);
+         else
+            surface.nativeOnJoystickButton(index1, button2, true);
+      }
+      else if (old < 0) {
+         surface.nativeOnJoystickButton(index1, button1, false);
+         if (cur > 0) {
+            surface.nativeOnJoystickButton(index1, button2, true);
+         }
+      }
+      else if (old > 0) {
+         surface.nativeOnJoystickButton(index1, button2, false);
+         if (cur < 0) {
+            surface.nativeOnJoystickButton(index1, button1, true);
+         }
+      }
+   }
+
+   @Override
+   public boolean onGenericMotion(View v, MotionEvent event) {
+      if (activity.joystickActive == false) {
+         return false;
+      }
+
+      int id = event.getDeviceId();
+      int index = activity.indexOfJoystick(id);
+      if (index >= 0) {
+         float ax = event.getAxisValue(MotionEvent.AXIS_X, 0);
+         float ay = event.getAxisValue(MotionEvent.AXIS_Y, 0);
+         float ahx = event.getAxisValue(MotionEvent.AXIS_HAT_X, 0);
+         float ahy = event.getAxisValue(MotionEvent.AXIS_HAT_Y, 0);
+         float az = event.getAxisValue(MotionEvent.AXIS_Z, 0);
+         float arz = event.getAxisValue(MotionEvent.AXIS_RZ, 0);
+         if (ax != axis0_x || ay != axis0_y) {
+            surface.nativeOnJoystickAxis(index, 0, 0, ax);
+            surface.nativeOnJoystickAxis(index, 0, 1, ay);
+            axis0_x = ax;
+            axis0_y = ay;
+         }
+         else if (ahx != axis0_hat_x || ahy != axis0_hat_y) {
+            handleHat(index, axis0_hat_x, ahx, AllegroActivity.JS_DPAD_L, AllegroActivity.JS_DPAD_R);
+            handleHat(index, axis0_hat_y, ahy, AllegroActivity.JS_DPAD_U, AllegroActivity.JS_DPAD_D);
+            axis0_hat_x = ahx;
+            axis0_hat_y = ahy;
+         }
+         if (az != axis1_x || arz != axis1_y) {
+            surface.nativeOnJoystickAxis(index, 1, 0, az);
+            surface.nativeOnJoystickAxis(index, 1, 1, arz);
+            axis1_x = az;
+            axis1_y = arz;
+         }
+         return true;
+      }
+      return false;
+   }
+}
diff --git a/android/allegro_activity/src/AllegroSurface.java b/android/allegro_activity/src/AllegroSurface.java
index ce2837e..80dd12f 100644
--- a/android/allegro_activity/src/AllegroSurface.java
+++ b/android/allegro_activity/src/AllegroSurface.java
@@ -7,11 +7,8 @@ import android.view.Display;
 import android.view.SurfaceHolder;
 import android.view.SurfaceView;
 import android.view.View;
-import android.view.View.OnGenericMotionListener;
-import android.view.MotionEvent;
-import android.view.InputDevice;
 
-class AllegroSurface extends SurfaceView implements SurfaceHolder.Callback, OnGenericMotionListener
+class AllegroSurface extends SurfaceView implements SurfaceHolder.Callback
 {
    /** native functions we call */
    public native void nativeOnCreate();
@@ -21,6 +18,7 @@ class AllegroSurface extends SurfaceView implements SurfaceHolder.Callback, OnGe
    public native void nativeOnJoystickButton(int index, int button, boolean down);
 
    private AllegroActivity activity;
+   private AllegroJoystick joystick_listener;
 
    /** functions that native code calls */
 
@@ -103,7 +101,11 @@ class AllegroSurface extends SurfaceView implements SurfaceHolder.Callback, OnGe
       requestFocus();
       setOnKeyListener(key_listener);
       setOnTouchListener(touch_listener);
-      setOnGenericMotionListener(this);
+
+      if (android.os.Build.VERSION.SDK_INT >= 12) {
+         joystick_listener = new AllegroJoystick(activity, this);
+         setOnGenericMotionListener(joystick_listener);
+      }
    }
 
    @Override
@@ -151,75 +153,6 @@ class AllegroSurface extends SurfaceView implements SurfaceHolder.Callback, OnGe
    {
       key_listener.setCaptureVolumeKeys(onoff);
    }
-
-   private float axis0_x = 0.0f;
-   private float axis0_y = 0.0f;
-   private float axis0_hat_x = 0.0f;
-   private float axis0_hat_y = 0.0f;
-   private float axis1_x = 0.0f;
-   private float axis1_y = 0.0f;
-
-   private void handleHat(int index1, float old, float cur, int button1, int button2) {
-      if (old == cur)
-         return;
-
-      if (old == 0) {
-         if (cur < 0)
-            nativeOnJoystickButton(index1, button1, true);
-         else
-            nativeOnJoystickButton(index1, button2, true);
-      }
-      else if (old < 0) {
-         nativeOnJoystickButton(index1, button1, false);
-         if (cur > 0) {
-            nativeOnJoystickButton(index1, button2, true);
-         }
-      }
-      else if (old > 0) {
-         nativeOnJoystickButton(index1, button2, false);
-         if (cur < 0) {
-            nativeOnJoystickButton(index1, button1, true);
-         }
-      }
-   }
-
-   @Override
-   public boolean onGenericMotion(View v, MotionEvent event) {
-      if (activity.joystickActive == false) {
-         return false;
-      }
-
-      int id = event.getDeviceId();
-      int index = activity.indexOfJoystick(id);
-      if (index >= 0) {
-         float ax = event.getAxisValue(MotionEvent.AXIS_X, 0);
-         float ay = event.getAxisValue(MotionEvent.AXIS_Y, 0);
-         float ahx = event.getAxisValue(MotionEvent.AXIS_HAT_X, 0);
-         float ahy = event.getAxisValue(MotionEvent.AXIS_HAT_Y, 0);
-         float az = event.getAxisValue(MotionEvent.AXIS_Z, 0);
-         float arz = event.getAxisValue(MotionEvent.AXIS_RZ, 0);
-         if (ax != axis0_x || ay != axis0_y) {
-            nativeOnJoystickAxis(index, 0, 0, ax);
-            nativeOnJoystickAxis(index, 0, 1, ay);
-            axis0_x = ax;
-            axis0_y = ay;
-         }
-         else if (ahx != axis0_hat_x || ahy != axis0_hat_y) {
-            handleHat(index, axis0_hat_x, ahx, AllegroActivity.JS_DPAD_L, AllegroActivity.JS_DPAD_R);
-            handleHat(index, axis0_hat_y, ahy, AllegroActivity.JS_DPAD_U, AllegroActivity.JS_DPAD_D);
-            axis0_hat_x = ahx;
-            axis0_hat_y = ahy;
-         }
-         if (az != axis1_x || arz != axis1_y) {
-            nativeOnJoystickAxis(index, 1, 0, az);
-            nativeOnJoystickAxis(index, 1, 1, arz);
-            axis1_x = az;
-            axis1_y = arz;
-         }
-         return true;
-      }
-      return false;
-   }
 }
 
 /* vim: set sts=3 sw=3 et: */
diff --git a/android/allegro_activity/src/Sensors.java b/android/allegro_activity/src/Sensors.java
index 0f68612..751f92f 100644
--- a/android/allegro_activity/src/Sensors.java
+++ b/android/allegro_activity/src/Sensors.java
@@ -19,7 +19,7 @@ public class Sensors implements SensorEventListener
       /* Only check for Accelerometers for now, not sure how we should utilize
        * other types.
        */
-      sensorManager = (SensorManager)context.getSystemService("sensor");
+      sensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
       sensors = sensorManager.getSensorList(Sensor.TYPE_ACCELEROMETER);
    }
 
diff --git a/android/example/AndroidManifest.xml b/android/example/AndroidManifest.xml
index 5ab3f1b..132cfc0 100644
--- a/android/example/AndroidManifest.xml
+++ b/android/example/AndroidManifest.xml
@@ -10,7 +10,7 @@
                   android:label="@string/app_name"
                   android:launchMode="singleTask"
                   android:screenOrientation="unspecified"
-                  android:configChanges="screenLayout|uiMode|orientation">
+                  android:configChanges="screenLayout|uiMode|orientation|screenSize">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
diff --git a/cmake/Common.cmake b/cmake/Common.cmake
index 2047b69..782196f 100644
--- a/cmake/Common.cmake
+++ b/cmake/Common.cmake
@@ -401,5 +401,28 @@ macro(add_addon2 addon addon_target)
     set(MONOLITH_DEFINES ${MONOLITH_DEFINES} PARENT_SCOPE)
 endmacro(add_addon2)
 
+# Ensure that the default include system directories are added to the list of CMake implicit includes.
+# This workarounds an issue that happens when using GCC 6 and using system includes (-isystem).
+# For more details check: https://bugs.webkit.org/show_bug.cgi?id=161697
+macro(get_gcc_system_include_dirs _lang _compiler _flags _result)
+    file(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n")
+    separate_arguments(_buildFlags UNIX_COMMAND "${_flags}")
+    execute_process(COMMAND ${_compiler} ${_buildFlags} -v -E -x ${_lang} -dD dummy
+                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles OUTPUT_QUIET
+                    ERROR_VARIABLE _gccOutput)
+    file(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
+    if("${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list")
+        set(${_result} ${CMAKE_MATCH_1})
+        string(REPLACE "\n" " " ${_result} "${${_result}}")
+        separate_arguments(${_result})
+        set(canonical_paths "")
+        foreach(path IN ITEMS ${${_result}})
+            get_filename_component(canonical_path ${path} ABSOLUTE)
+            list(APPEND canonical_paths ${canonical_path})
+        endforeach()
+        set(${_result} ${canonical_paths})
+    endif()
+endmacro()
+
 #-----------------------------------------------------------------------------#
 # vim: set ft=cmake sts=4 sw=4 et:
diff --git a/cmake/FindENet.cmake b/cmake/FindENet.cmake
new file mode 100644
index 0000000..b05f188
--- /dev/null
+++ b/cmake/FindENet.cmake
@@ -0,0 +1,29 @@
+# - Find ENet
+# Find the native ENet includes and libraries
+#
+#  ENET_INCLUDE_DIR - where to find ENet headers.
+#  ENET_LIBRARIES   - List of libraries when using libenet.
+#  ENET_FOUND       - True if libenet found.
+
+if(ENET_INCLUDE_DIR)
+    # Already in cache, be silent
+    set(ENET_FIND_QUIETLY TRUE)
+endif(ENET_INCLUDE_DIR)
+
+find_path(ENET_INCLUDE_DIR enet/enet.h)
+
+find_library(ENET_LIBRARY NAMES enet enet_static libenet libenet_static)
+
+# Handle the QUIETLY and REQUIRED arguments and set ENET_FOUND to TRUE if
+# all listed variables are TRUE.
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(ENET DEFAULT_MSG
+    ENET_INCLUDE_DIR ENET_LIBRARY)
+
+if(ENET_FOUND)
+  set(ENET_LIBRARIES ${ENET_LIBRARY})
+else(ENET_FOUND)
+  set(ENET_LIBRARIES)
+endif(ENET_FOUND)
+
+mark_as_advanced(ENET_INCLUDE_DIR ENET_LIBRARY)
diff --git a/cmake/FindGDIPLUS.cmake b/cmake/FindGDIPLUS.cmake
index 460c283..56956cd 100644
--- a/cmake/FindGDIPLUS.cmake
+++ b/cmake/FindGDIPLUS.cmake
@@ -10,7 +10,31 @@ if(GDIPLUS_INCLUDE_DIR)
     set(GDIPLUS_FIND_QUIETLY TRUE)
 endif(GDIPLUS_INCLUDE_DIR)
 
-find_path(GDIPLUS_INCLUDE_DIR NAMES GdiPlus.h gdiplus.h)
+macro(check_winsdk_root_dir key)
+  get_filename_component(CANDIDATE ${key} ABSOLUTE)
+  if (EXISTS ${CANDIDATE})
+    set(WINSDK_ROOT_DIR ${CANDIDATE})
+  endif()
+endmacro()
+
+check_winsdk_root_dir("[HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Microsoft SDKs\\\\Windows\\\\v7.0;InstallationFolder]")
+check_winsdk_root_dir("[HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Microsoft SDKs\\\\Windows\\\\v7.0A;InstallationFolder]")
+check_winsdk_root_dir("[HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Microsoft SDKs\\\\Windows\\\\v7.1;InstallationFolder]")
+check_winsdk_root_dir("[HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Microsoft SDKs\\\\Windows\\\\v7.1A;InstallationFolder]")
+check_winsdk_root_dir("[HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows Kits\\\\Installed Roots;KitsRoot]")
+check_winsdk_root_dir("[HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows Kits\\\\Installed Roots;KitsRoot81]")
+
+find_path(GDIPLUS_INCLUDE_DIR
+    NAMES
+        GdiPlus.h
+        gdiplus.h
+    PATH_SUFFIXES
+        Include
+        Include/um
+        Include/shared
+    PATHS
+        "${WINSDK_ROOT_DIR}"
+    )
 if(EXISTS ${GDIPLUS_INCLUDE_DIR}/GdiPlus.h)
     set(GDIPLUS_LOWERCASE 0 CACHE INTERNAL "Is GdiPlus.h spelt with lowercase?")
 else()
diff --git a/cmake/FindOpus.cmake b/cmake/FindOpus.cmake
new file mode 100644
index 0000000..771d4d0
--- /dev/null
+++ b/cmake/FindOpus.cmake
@@ -0,0 +1,38 @@
+# - Find opus
+# Find the native opus includes and libraries
+#
+#  OPUS_INCLUDE_DIR - where to find opus.h, etc.
+#  OPUS_LIBRARIES   - List of libraries when using opus(file).
+#  OPUS_FOUND       - True if opus found.
+
+if(OPUS_INCLUDE_DIR)
+    # Already in cache, be silent
+    set(OPUS_FIND_QUIETLY TRUE)
+endif(OPUS_INCLUDE_DIR)
+
+find_package(Ogg)
+if(OGG_FOUND)
+        find_path(OPUS_INCLUDE_DIR opusfile.h PATH_SUFFIXES opus)
+        # MSVC built opus may be named opus_static
+	# The provided project files name the library with the lib prefix.
+        find_library(OPUS_LIBRARY
+            NAMES opus opus_static libopus libopus_static)
+        find_library(OPUSFILE_LIBRARY
+            NAMES opusfile opusfile_static libopusfile libopusfile_static)
+        # Handle the QUIETLY and REQUIRED arguments and set OPUS_FOUND
+	# to TRUE if all listed variables are TRUE.
+	include(FindPackageHandleStandardArgs)
+        find_package_handle_standard_args(OPUS DEFAULT_MSG
+            OPUS_INCLUDE_DIR
+            OPUS_LIBRARY OPUSFILE_LIBRARY)
+endif(OGG_FOUND)
+
+if(OPUS_FOUND)
+  set(OPUS_LIBRARIES ${OPUSFILE_LIBRARY} ${OPUS_LIBRARY}
+        ${OGG_LIBRARY})
+else(OPUS_FOUND)
+  set(OPUS_LIBRARIES)
+endif(OPUS_FOUND)
+
+mark_as_advanced(OPUS_INCLUDE_DIR)
+mark_as_advanced(OPUS_LIBRARY OPUSFILE_LIBRARY)
diff --git a/cmake/Toolchain-android.cmake b/cmake/Toolchain-android.cmake
index d9cefd8..fca8a53 100644
--- a/cmake/Toolchain-android.cmake
+++ b/cmake/Toolchain-android.cmake
@@ -4,7 +4,7 @@ SET(CMAKE_SYSTEM_VERSION 1)
 
 #set path for android toolchain -- look
 
-set(ANDROID_NDK_TOOLCHAIN_ROOT "$ENV{HOME}/android-toolchain" CACHE PATH "Path to the Android NDK Standalone Toolchain" )
+set(ANDROID_NDK_TOOLCHAIN_ROOT "$ENV{ANDROID_NDK_TOOLCHAIN_ROOT}" CACHE PATH "Path to the Android NDK Standalone Toolchain" )
 
 message( STATUS "Selected Android toolchain: ${ANDROID_NDK_TOOLCHAIN_ROOT}" )
 if(NOT EXISTS ${ANDROID_NDK_TOOLCHAIN_ROOT})
@@ -30,7 +30,7 @@ find_program(CMAKE_MAKE_PROGRAM make)
 
 #setup build targets, mutually exclusive
 set(PossibleArmTargets
-  "x86;x86_64;armeabi;armeabi-v7a;armeabi-v7a with NEON")
+  "x86;x86_64;armeabi;armeabi-v7a;armeabi-v7a with NEON;arm64-v8a;mips;mips64")
 set(ARM_TARGETS "armeabi-v7a" CACHE STRING 
     "the arm targets for android, recommend armeabi-v7a 
     for floating point support and NEON.")
@@ -39,8 +39,26 @@ if(ARM_TARGETS STREQUAL "x86")
     set(ANDROID_ARCH "i686-linux-android")
 elseif(ARM_TARGETS STREQUAL "x86_64")
     set(ANDROID_ARCH "x86_64-linux-android")
-else()
+elseif(ARM_TARGETS STREQUAL "arm64-v8a")
+    set(ANDROID_ARCH "aarch64-linux-android")
+elseif(ARM_TARGETS STREQUAL "mips")
+    set(ANDROID_ARCH "mipsel-linux-android")
+elseif(ARM_TARGETS STREQUAL "mips64")
+    set(ANDROID_ARCH "mips64el-linux-android")
+elseif(ARM_TARGETS STREQUAL "armeabi")
+    set(ANDROID_ARCH "arm-linux-androideabi")
+    set(ARMEABI true)
+    set(NEON false)
+elseif(ARM_TARGETS STREQUAL "armeabi-v7a")
+    set(ARMEABI true)
     set(ANDROID_ARCH "arm-linux-androideabi")
+    set(NEON false)
+elseif(ARM_TARGETS STREQUAL "armeabi-v7a with NEON")
+    set(ARMEABI true)
+    set(ANDROID_ARCH "arm-linux-androideabi")
+    set(NEON true)
+else()
+    message(FATAL_ERROR "Unknown Android target ${ARM_TARGETS}")        
 endif()
 
 if(WIN32)
@@ -75,53 +93,22 @@ set(LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_SOURCE_DIR} CACHE PATH
     android libs are installed to")
     
 #set these flags for client use
-if(ARM_TARGETS STREQUAL "armeabi")
-  set(ARMEABI true)
-  set(LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH_ROOT}/libs/armeabi
-      CACHE PATH "path for android libs" FORCE)
-  set(CMAKE_INSTALL_PREFIX ${ANDROID_NDK_TOOLCHAIN_ROOT}/user/armeabi
-      CACHE STRING "path for installing" FORCE)
-  set(NEON false)
-elseif(ARM_TARGETS STREQUAL "x86")
-  set( LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH_ROOT}/libs/x86
-       CACHE PATH "path for android libs" FORCE)
-  set(  CMAKE_INSTALL_PREFIX ${ANDROID_NDK_TOOLCHAIN_ROOT}/user/x86
-      CACHE STRING "path for installing" FORCE)
-elseif(ARM_TARGETS STREQUAL "x86_64")
-  set( LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH_ROOT}/libs/x86_64
-       CACHE PATH "path for android libs" FORCE)
-  set(  CMAKE_INSTALL_PREFIX ${ANDROID_NDK_TOOLCHAIN_ROOT}/user/x86_64
-      CACHE STRING "path for installing" FORCE)
-else()
-  if(ARM_TARGETS STREQUAL "armeabi-v7a with NEON")
-    set(NEON true)
-  endif()
-  set(ARMEABI_V7A true)
-  set( LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH_ROOT}/libs/armeabi-v7a 
-       CACHE PATH "path for android libs" FORCE)
-  set(  CMAKE_INSTALL_PREFIX ${ANDROID_NDK_TOOLCHAIN_ROOT}/user/armeabi-v7a
-      CACHE STRING "path for installing" FORCE)
-endif()
+set(LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ARM_TARGETS}
+    CACHE PATH "path for android libs" FORCE)
+set(CMAKE_INSTALL_PREFIX ${ANDROID_NDK_TOOLCHAIN_ROOT}/user/${ARM_TARGETS}
+    CACHE STRING "path for installing" FORCE)
 
 # where is the target environment 
 SET(CMAKE_FIND_ROOT_PATH  ${ANDROID_NDK_TOOLCHAIN_ROOT}/bin ${ANDROID_NDK_TOOLCHAIN_ROOT}/arm-linux-androideabi ${ANDROID_NDK_TOOLCHAIN_ROOT}/sysroot ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}/share)
 
-#for some reason this is needed? TODO figure out why...
-include_directories(${ANDROID_NDK_TOOLCHAIN_ROOT}/arm-linux-androideabi/include/c++/4.4.3/arm-linux-androideabi)
-
 SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
 # only search for libraries and includes in the ndk toolchain
 SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
 
-
-if(ARM_TARGETS STREQUAL "x86")
-  SET(CMAKE_CXX_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -Wno-psabi")
-  SET(CMAKE_C_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -Wno-psabi")
-elseif(ARM_TARGETS STREQUAL "x86_64")
-  SET(CMAKE_CXX_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -Wno-psabi")
-  SET(CMAKE_C_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -Wno-psabi")
-else()
+SET(CMAKE_CXX_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -Wno-psabi")
+SET(CMAKE_C_FLAGS "-DGL_GLEXT_PROTOTYPES -fPIC -DANDROID -Wno-psabi")
+if (ARMEABI)
   #Setup arm specific stuff
   #It is recommended to use the -mthumb compiler flag to force the generation
   #of 16-bit Thumb-1 instructions (the default being 32-bit ARM ones).
diff --git a/cmake/Toolchain-raspberrypi.cmake b/cmake/Toolchain-raspberrypi.cmake
index d412122..fa5965c 100644
--- a/cmake/Toolchain-raspberrypi.cmake
+++ b/cmake/Toolchain-raspberrypi.cmake
@@ -13,8 +13,8 @@ IF("${TOOLCHAIN_SUFFIX}" STREQUAL "")
    SET(TOOLCHAIN_SUFFIX "")
 ENDIF("${TOOLCHAIN_SUFFIX}" STREQUAL "")
 
-SET(CMAKE_C_FLAGS "-march=armv6 -mfpu=vfp -mfloat-abi=hard")
-SET(CMAKE_CXX_FLAGS "-march=armv6 -mfpu=vfp -mfloat-abi=hard")
+SET(CMAKE_C_FLAGS "-march=armv6 -mfpu=vfp -mfloat-abi=hard -Os")
+SET(CMAKE_CXX_FLAGS "-march=armv6 -mfpu=vfp -mfloat-abi=hard -Os")
 
 if(NOT DISTCC)
     set(CMAKE_C_COMPILER ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}gcc${TOOLCHAIN_SUFFIX})
diff --git a/demos/cosmic_protector/CMakeLists.txt b/demos/cosmic_protector/CMakeLists.txt
index 66bc5bf..696dcde 100644
--- a/demos/cosmic_protector/CMakeLists.txt
+++ b/demos/cosmic_protector/CMakeLists.txt
@@ -6,12 +6,12 @@ endif()
 
 include_directories(
     include
-    ${CMAKE_SOURCE_DIR}/addons/main
-    ${CMAKE_SOURCE_DIR}/addons/image
-    ${CMAKE_SOURCE_DIR}/addons/font
-    ${CMAKE_SOURCE_DIR}/addons/audio
-    ${CMAKE_SOURCE_DIR}/addons/acodec
-    ${CMAKE_SOURCE_DIR}/addons/primitives
+    ${PROJECT_SOURCE_DIR}/addons/main
+    ${PROJECT_SOURCE_DIR}/addons/image
+    ${PROJECT_SOURCE_DIR}/addons/font
+    ${PROJECT_SOURCE_DIR}/addons/audio
+    ${PROJECT_SOURCE_DIR}/addons/acodec
+    ${PROJECT_SOURCE_DIR}/addons/primitives
     )
 
 set(DEMO_SRCS
diff --git a/demos/skater/CMakeLists.txt b/demos/skater/CMakeLists.txt
index fcb4f2a..551762a 100644
--- a/demos/skater/CMakeLists.txt
+++ b/demos/skater/CMakeLists.txt
@@ -5,12 +5,12 @@ else()
 endif()
 
 include_directories(
-   ${CMAKE_SOURCE_DIR}/addons/acodec
-   ${CMAKE_SOURCE_DIR}/addons/audio
-   ${CMAKE_SOURCE_DIR}/addons/font
-   ${CMAKE_SOURCE_DIR}/addons/image
-   ${CMAKE_SOURCE_DIR}/addons/main
-   ${CMAKE_SOURCE_DIR}/addons/primitives
+   ${PROJECT_SOURCE_DIR}/addons/acodec
+   ${PROJECT_SOURCE_DIR}/addons/audio
+   ${PROJECT_SOURCE_DIR}/addons/font
+   ${PROJECT_SOURCE_DIR}/addons/image
+   ${PROJECT_SOURCE_DIR}/addons/main
+   ${PROJECT_SOURCE_DIR}/addons/primitives
    )
 
 set(DEMO_SRCS
diff --git a/demos/speed/CMakeLists.txt b/demos/speed/CMakeLists.txt
index 53d35a2..6b12a99 100644
--- a/demos/speed/CMakeLists.txt
+++ b/demos/speed/CMakeLists.txt
@@ -1,9 +1,9 @@
 # Prefer local headers to system directories.
 include_directories(
-    ${CMAKE_SOURCE_DIR}/addons/main
-    ${CMAKE_SOURCE_DIR}/addons/audio
-    ${CMAKE_SOURCE_DIR}/addons/font
-    ${CMAKE_SOURCE_DIR}/addons/primitives
+    ${PROJECT_SOURCE_DIR}/addons/main
+    ${PROJECT_SOURCE_DIR}/addons/audio
+    ${PROJECT_SOURCE_DIR}/addons/font
+    ${PROJECT_SOURCE_DIR}/addons/primitives
     )
 
 set(SPEED_SRCS
diff --git a/docs/html/refman/acodec.html b/docs/html/refman/acodec.html
index 79003c5..401859b 100644
--- a/docs/html/refman/acodec.html
+++ b/docs/html/refman/acodec.html
@@ -125,9 +125,9 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_acodec.h></span></code></pre>
 <h1 id="al_init_acodec_addon"><a href="#al_init_acodec_addon">al_init_acodec_addon</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_init_acodec_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/acodec/acodec.c#L17">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/acodec/acodec.c#L17">Source Code</a></p>
 <p>This function registers all the known audio file type handlers for <a href="audio.html#al_load_sample">al_load_sample</a>, <a href="audio.html#al_save_sample">al_save_sample</a>, <a href="audio.html#al_load_audio_stream">al_load_audio_stream</a>, etc.</p>
-<p>Depending on what libraries are available, the full set of recognised extensions is: .wav, .flac, .ogg, .it, .mod, .s3m, .xm, .voc.</p>
+<p>Depending on what libraries are available, the full set of recognised extensions is: .wav, .flac, .ogg, .opus, .it, .mod, .s3m, .xm, .voc.</p>
 <p><em>Limitations:</em></p>
 <ul>
 <li><p>Saving is only supported for wav files.</p></li>
@@ -138,11 +138,11 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Return true on success.</p>
 <h1 id="al_get_allegro_acodec_version"><a href="#al_get_allegro_acodec_version">al_get_allegro_acodec_version</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_acodec_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/acodec/acodec.c#L9">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/acodec/acodec.c#L9">Source Code</a></p>
 <p>Returns the (compiled) version of the addon, in the same format as <a href="system.html#al_get_allegro_version">al_get_allegro_version</a>.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:44 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:01 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/audio.html b/docs/html/refman/audio.html
index b592c09..e0b89c3 100644
--- a/docs/html/refman/audio.html
+++ b/docs/html/refman/audio.html
@@ -296,7 +296,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="audio-types"><a href="#audio-types">Audio types</a></h1>
 <h2 id="allegro_audio_depth"><a href="#allegro_audio_depth">ALLEGRO_AUDIO_DEPTH</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">enum</span> ALLEGRO_AUDIO_DEPTH</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L71">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L71">Source Code</a></p>
 <p>Sample depth and type as well as signedness. Mixers only use 32-bit signed float (-1..+1), or 16-bit signed integers. Signedness is determined by an "unsigned" bit-flag applied to the depth value.</p>
 <ul>
 <li>ALLEGRO_AUDIO_DEPTH_INT8</li>
@@ -313,13 +313,13 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </ul>
 <h2 id="allegro_audio_pan_none"><a href="#allegro_audio_pan_none">ALLEGRO_AUDIO_PAN_NONE</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_AUDIO_PAN_NONE      (-1000.0f)</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L140">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L140">Source Code</a></p>
 <p>A special value for the pan property of sample instances and audio streams. Use this value to disable panning on sample instances and audio streams, and play them without attentuation implied by panning support.</p>
 <p>ALLEGRO_AUDIO_PAN_NONE is different from a pan value of 0.0 (centered) because, when panning is enabled, we try to maintain a constant sound power level as a sample is panned from left to right. A sound coming out of one speaker should sound as loud as it does when split over two speakers. As a consequence, a sample with pan value 0.0 will be 3 dB softer than the original level.</p>
 <p>(Please correct us if this is wrong.)</p>
 <h2 id="allegro_channel_conf"><a href="#allegro_channel_conf">ALLEGRO_CHANNEL_CONF</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">enum</span> ALLEGRO_CHANNEL_CONF</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L96">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L96">Source Code</a></p>
 <p>Speaker configuration (mono, stereo, 2.1, etc).</p>
 <ul>
 <li>ALLEGRO_CHANNEL_CONF_1</li>
@@ -332,11 +332,11 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </ul>
 <h2 id="allegro_mixer"><a href="#allegro_mixer">ALLEGRO_MIXER</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_MIXER ALLEGRO_MIXER;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L169">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L169">Source Code</a></p>
 <p>A mixer mixes together attached streams into a single buffer. In the process, it converts channel configurations, sample frequencies and audio depths of the attached sample instances and audio streams accordingly. You can control the quality of this conversion using ALLEGRO_MIXER_QUALITY.</p>
 <h2 id="allegro_mixer_quality"><a href="#allegro_mixer_quality">ALLEGRO_MIXER_QUALITY</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">enum</span> ALLEGRO_MIXER_QUALITY</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L130">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L130">Source Code</a></p>
 <ul>
 <li>ALLEGRO_MIXER_QUALITY_POINT - point sampling</li>
 <li>ALLEGRO_MIXER_QUALITY_LINEAR - linear interpolation</li>
@@ -344,7 +344,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </ul>
 <h2 id="allegro_playmode"><a href="#allegro_playmode">ALLEGRO_PLAYMODE</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">enum</span> ALLEGRO_PLAYMODE</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L118">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L118">Source Code</a></p>
 <p>Sample and stream playback mode.</p>
 <ul>
 <li>ALLEGRO_PLAYMODE_ONCE</li>
@@ -353,23 +353,23 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </ul>
 <h2 id="allegro_sample_id"><a href="#allegro_sample_id">ALLEGRO_SAMPLE_ID</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_SAMPLE_ID ALLEGRO_SAMPLE_ID;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L149">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L149">Source Code</a></p>
 <p>An ALLEGRO_SAMPLE_ID represents a sample being played via <a href="audio.html#al_play_sample">al_play_sample</a>. It can be used to later stop the sample with <a href="audio.html#al_stop_sample">al_stop_sample</a>.</p>
 <h2 id="allegro_sample"><a href="#allegro_sample">ALLEGRO_SAMPLE</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_SAMPLE ALLEGRO_SAMPLE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L144">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L144">Source Code</a></p>
 <p>An ALLEGRO_SAMPLE object stores the data necessary for playing pre-defined digital audio. It holds a user-specified PCM data buffer and information about its format (data length, depth, frequency, channel configuration). You can have the same ALLEGRO_SAMPLE playing multiple times simultaneously.</p>
 <p>See also: <a href="audio.html#allegro_sample_instance">ALLEGRO_SAMPLE_INSTANCE</a></p>
 <h2 id="allegro_sample_instance"><a href="#allegro_sample_instance">ALLEGRO_SAMPLE_INSTANCE</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_SAMPLE_INSTANCE ALLEGRO_SAMPLE_INSTANCE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L159">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L159">Source Code</a></p>
 <p>An ALLEGRO_SAMPLE_INSTANCE object represents a playable instance of a predefined sound effect. It holds information about how the effect should be played: These playback parameters consist of the looping mode, loop start/end points, playing position, speed, gain, pan and the playmode. Whether a sample instance is currently playing or paused is also one of its properties.</p>
 <p>An instance uses the data from an <a href="audio.html#allegro_sample">ALLEGRO_SAMPLE</a> object. Multiple instances may be created from the same ALLEGRO_SAMPLE. An ALLEGRO_SAMPLE must not be destroyed while there are instances which reference it.</p>
 <p>To actually produce audio output, an ALLEGRO_SAMPLE_INSTANCE must be attached to an <a href="audio.html#allegro_mixer">ALLEGRO_MIXER</a> which eventually reaches an <a href="audio.html#allegro_voice">ALLEGRO_VOICE</a> object.</p>
 <p>See also: <a href="audio.html#allegro_sample">ALLEGRO_SAMPLE</a></p>
 <h2 id="allegro_audio_stream"><a href="#allegro_audio_stream">ALLEGRO_AUDIO_STREAM</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_AUDIO_STREAM ALLEGRO_AUDIO_STREAM;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L164">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L164">Source Code</a></p>
 <p>An ALLEGRO_AUDIO_STREAM object is used to stream generated audio to the sound device, in real-time. This is done by reading from a buffer, which is split into a number of fragments. Whenever a fragment has finished playing, the user can refill it with new data.</p>
 <p>As with <a href="audio.html#allegro_sample_instance">ALLEGRO_SAMPLE_INSTANCE</a> objects, streams store information necessary for playback, so you may not play the same stream multiple times simultaneously. Streams also need to be attached to an <a href="audio.html#allegro_mixer">ALLEGRO_MIXER</a>, which, eventually, reaches an <a href="audio.html#allegro_voice">ALLEGRO_VOICE</a> object.</p>
 <p>While playing, you must periodically fill fragments with new audio data. To know when a new fragment is ready to be filled, you can either directly check with <a href="audio.html#al_get_available_audio_stream_fragments">al_get_available_audio_stream_fragments</a>, or listen to events from the stream.</p>
@@ -378,13 +378,13 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>If the stream is created by <a href="audio.html#al_load_audio_stream">al_load_audio_stream</a> then it will also generate an ALLEGRO_EVENT_AUDIO_STREAM_FINISHED event if it reaches the end of the file and is not set to loop.</p>
 <h2 id="allegro_voice"><a href="#allegro_voice">ALLEGRO_VOICE</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_VOICE ALLEGRO_VOICE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L174">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L174">Source Code</a></p>
 <p>A voice represents an audio device on the system, which may be a real device, or an abstract device provided by the operating system. To play back audio, you would attach a mixer, sample instance or audio stream to a voice.</p>
 <p>See also: <a href="audio.html#allegro_mixer">ALLEGRO_MIXER</a>, <a href="audio.html#allegro_sample">ALLEGRO_SAMPLE</a>, <a href="audio.html#allegro_audio_stream">ALLEGRO_AUDIO_STREAM</a></p>
 <h1 id="setting-up-audio"><a href="#setting-up-audio">Setting up audio</a></h1>
 <h2 id="al_install_audio"><a href="#al_install_audio">al_install_audio</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_install_audio(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio.c#L378">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio.c#L378">Source Code</a></p>
 <p>Install the audio subsystem.</p>
 <p>Returns true on success, false on failure.</p>
 <blockquote>
@@ -393,16 +393,16 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="audio.html#al_reserve_samples">al_reserve_samples</a>, <a href="audio.html#al_uninstall_audio">al_uninstall_audio</a>, <a href="audio.html#al_is_audio_installed">al_is_audio_installed</a>, <a href="acodec.html#al_init_acodec_addon">al_init_acodec_addon</a></p>
 <h2 id="al_uninstall_audio"><a href="#al_uninstall_audio">al_uninstall_audio</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_uninstall_audio(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio.c#L397">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio.c#L397">Source Code</a></p>
 <p>Uninstalls the audio subsystem.</p>
 <p>See also: <a href="audio.html#al_install_audio">al_install_audio</a></p>
 <h2 id="al_is_audio_installed"><a href="#al_is_audio_installed">al_is_audio_installed</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_audio_installed(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio.c#L412">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio.c#L412">Source Code</a></p>
 <p>Returns true if <a href="audio.html#al_install_audio">al_install_audio</a> was called previously and returned successfully.</p>
 <h2 id="al_reserve_samples"><a href="#al_reserve_samples">al_reserve_samples</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_reserve_samples(<span class="dt">int</span> reserve_samples)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L201">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L201">Source Code</a></p>
 <p>Reserves a number of sample instances, attaching them to the default mixer. If no default mixer is set when this function is called, then it will create one and attach it to the default voice. If no default voice has been set, it, too, will be created.</p>
 <p>This diagram illustrates the structures that are set up:</p>
 <pre><code>                                      sample instance 1
@@ -415,95 +415,95 @@ default voice <-- default mixer <---         .
 <h1 id="misc-audio-functions"><a href="#misc-audio-functions">Misc audio functions</a></h1>
 <h2 id="al_get_allegro_audio_version"><a href="#al_get_allegro_audio_version">al_get_allegro_audio_version</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_audio_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio.c#L419">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio.c#L419">Source Code</a></p>
 <p>Returns the (compiled) version of the addon, in the same format as <a href="system.html#al_get_allegro_version">al_get_allegro_version</a>.</p>
 <h2 id="al_get_audio_depth_size"><a href="#al_get_audio_depth_size">al_get_audio_depth_size</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_get_audio_depth_size(ALLEGRO_AUDIO_DEPTH depth)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio.c#L65">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio.c#L65">Source Code</a></p>
 <p>Return the size of a sample, in bytes, for the given format. The format is one of the values listed under <a href="audio.html#allegro_audio_depth">ALLEGRO_AUDIO_DEPTH</a>.</p>
 <h2 id="al_get_channel_count"><a href="#al_get_channel_count">al_get_channel_count</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_get_channel_count(ALLEGRO_CHANNEL_CONF conf)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio.c#L57">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio.c#L57">Source Code</a></p>
 <p>Return the number of channels for the given channel configuration, which is one of the values listed under <a href="audio.html#allegro_channel_conf">ALLEGRO_CHANNEL_CONF</a>.</p>
 <h2 id="al_fill_silence"><a href="#al_fill_silence">al_fill_silence</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_fill_silence(<span class="dt">void</span> *buf, <span class="dt">unsigned</span> <span class="dt">int</span> samples,
    ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio.c#L127">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio.c#L127">Source Code</a></p>
 <p>Fill a buffer with silence, for the given format and channel configuration. The buffer must have enough space for the given number of samples, and be properly aligned.</p>
 <p>Since: 5.1.8</p>
 <h1 id="voice-functions"><a href="#voice-functions">Voice functions</a></h1>
 <h2 id="al_create_voice"><a href="#al_create_voice">al_create_voice</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_VOICE *al_create_voice(<span class="dt">unsigned</span> <span class="dt">int</span> freq,
    ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L65">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L65">Source Code</a></p>
 <p>Creates a voice structure and allocates a voice from the digital sound driver. The passed frequency, sample format and channel configuration are used as a hint to what kind of data will be sent to the voice. However, the underlying sound driver is free to use non-matching values. For example, it may be the native format of the sound hardware.</p>
 <p>If a mixer is attached to the voice, the mixer will handle the conversion of all its input streams to the voice format and care does not have to be taken for this. However if you access the voice directly, make sure to not rely on the parameters passed to this function, but instead query the returned voice for the actual settings.</p>
 <p>See also: <a href="audio.html#al_destroy_voice">al_destroy_voice</a></p>
 <h2 id="al_destroy_voice"><a href="#al_destroy_voice">al_destroy_voice</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_voice(ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L106">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L106">Source Code</a></p>
 <p>Destroys the voice and deallocates it from the digital driver. Does nothing if the voice is NULL.</p>
 <p>See also: <a href="audio.html#al_create_voice">al_create_voice</a></p>
 <h2 id="al_detach_voice"><a href="#al_detach_voice">al_detach_voice</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_detach_voice(ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L368">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L368">Source Code</a></p>
 <p>Detaches the mixer, sample instance or audio stream from the voice.</p>
 <p>See also: <a href="audio.html#al_attach_mixer_to_voice">al_attach_mixer_to_voice</a>, <a href="audio.html#al_attach_sample_instance_to_voice">al_attach_sample_instance_to_voice</a>, <a href="audio.html#al_attach_audio_stream_to_voice">al_attach_audio_stream_to_voice</a></p>
 <h2 id="al_attach_audio_stream_to_voice"><a href="#al_attach_audio_stream_to_voice">al_attach_audio_stream_to_voice</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_attach_audio_stream_to_voice(ALLEGRO_AUDIO_STREAM *stream,
    ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L249">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L249">Source Code</a></p>
 <p>Attaches an audio stream to a voice. The same rules as <a href="audio.html#al_attach_sample_instance_to_voice">al_attach_sample_instance_to_voice</a> apply. This may fail if the driver can't create a voice with the buffer count and buffer size the stream uses.</p>
 <p>An audio stream attached directly to a voice has a number of limitations: The audio stream plays immediately and cannot be stopped. The stream position, speed, gain and panning cannot be changed. At this time, we don't recommend attaching audio streams directly to voices. Use a mixer inbetween.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_detach_voice">al_detach_voice</a></p>
 <h2 id="al_attach_mixer_to_voice"><a href="#al_attach_mixer_to_voice">al_attach_mixer_to_voice</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_attach_mixer_to_voice(ALLEGRO_MIXER *mixer, ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L317">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L317">Source Code</a></p>
 <p>Attaches a mixer to a voice. It must have the same frequency and channel configuration, but the depth may be different.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_detach_voice">al_detach_voice</a></p>
 <h2 id="al_attach_sample_instance_to_voice"><a href="#al_attach_sample_instance_to_voice">al_attach_sample_instance_to_voice</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_attach_sample_instance_to_voice(ALLEGRO_SAMPLE_INSTANCE *spl,
    ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L126">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L126">Source Code</a></p>
 <p>Attaches a sample instance to a voice, and allows it to play. The instance's gain and loop mode will be ignored, and it must have the same frequency, channel configuration and depth (including signed-ness) as the voice. This function may fail if the selected driver doesn't support preloading sample data.</p>
 <p>At this time, we don't recommend attaching sample instances directly to voices. Use a mixer inbetween.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_detach_voice">al_detach_voice</a></p>
 <h2 id="al_get_voice_frequency"><a href="#al_get_voice_frequency">al_get_voice_frequency</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_voice_frequency(<span class="dt">const</span> ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L402">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L402">Source Code</a></p>
 <p>Return the frequency of the voice, e.g. 44100.</p>
 <h2 id="al_get_voice_channels"><a href="#al_get_voice_channels">al_get_voice_channels</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_CHANNEL_CONF al_get_voice_channels(<span class="dt">const</span> ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L430">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L430">Source Code</a></p>
 <p>Return the channel configuration of the voice.</p>
 <p>See also: <a href="audio.html#allegro_channel_conf">ALLEGRO_CHANNEL_CONF</a>.</p>
 <h2 id="al_get_voice_depth"><a href="#al_get_voice_depth">al_get_voice_depth</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_AUDIO_DEPTH al_get_voice_depth(<span class="dt">const</span> ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L440">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L440">Source Code</a></p>
 <p>Return the audio depth of the voice.</p>
 <p>See also: <a href="audio.html#allegro_audio_depth">ALLEGRO_AUDIO_DEPTH</a>.</p>
 <h2 id="al_get_voice_playing"><a href="#al_get_voice_playing">al_get_voice_playing</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_voice_playing(<span class="dt">const</span> ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L450">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L450">Source Code</a></p>
 <p>Return true if the voice is currently playing.</p>
 <p>See also: <a href="audio.html#al_set_voice_playing">al_set_voice_playing</a></p>
 <h2 id="al_set_voice_playing"><a href="#al_set_voice_playing">al_set_voice_playing</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_voice_playing(ALLEGRO_VOICE *voice, bool val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L487">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L487">Source Code</a></p>
 <p>Change whether a voice is playing or not. This can only work if the voice has a non-streaming object attached to it, e.g. a sample instance. On success the voice's current sample position is reset.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_get_voice_playing">al_get_voice_playing</a></p>
 <h2 id="al_get_voice_position"><a href="#al_get_voice_position">al_get_voice_position</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_voice_position(<span class="dt">const</span> ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L412">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L412">Source Code</a></p>
 <p>When the voice has a non-streaming object attached to it, e.g. a sample, returns the voice's current sample position. Otherwise, returns zero.</p>
 <p>See also: <a href="audio.html#al_set_voice_position">al_set_voice_position</a>.</p>
 <h2 id="al_set_voice_position"><a href="#al_set_voice_position">al_set_voice_position</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_voice_position(ALLEGRO_VOICE *voice, <span class="dt">unsigned</span> <span class="dt">int</span> val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_voice.c#L468">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_voice.c#L468">Source Code</a></p>
 <p>Set the voice position. This can only work if the voice has a non-streaming object attached to it, e.g. a sample instance.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_get_voice_position">al_get_voice_position</a>.</p>
@@ -512,7 +512,7 @@ default voice <-- default mixer <---         .
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_SAMPLE *al_create_sample(<span class="dt">void</span> *buf, <span class="dt">unsigned</span> <span class="dt">int</span> samples,
    <span class="dt">unsigned</span> <span class="dt">int</span> freq, ALLEGRO_AUDIO_DEPTH depth,
    ALLEGRO_CHANNEL_CONF chan_conf, bool free_buf)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L129">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L129">Source Code</a></p>
 <p>Create a sample data structure from the supplied buffer. If <code>free_buf</code> is true then the buffer will be freed with <a href="memory.html#al_free">al_free</a> when the sample data structure is destroyed. For portability (especially Windows), the buffer should have been allocated with <a href="memory.html#al_malloc">al_malloc</a>. Otherwise you should free the sample data yourself.</p>
 <p>To allocate a buffer of the correct size, you can use something like this:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> sample_size = al_get_channel_count(chan_conf)
@@ -522,14 +522,14 @@ default voice <-- default mixer <---         .
 <p>See also: <a href="audio.html#al_destroy_sample">al_destroy_sample</a>, <a href="audio.html#allegro_audio_depth">ALLEGRO_AUDIO_DEPTH</a>, <a href="audio.html#allegro_channel_conf">ALLEGRO_CHANNEL_CONF</a></p>
 <h2 id="al_destroy_sample"><a href="#al_destroy_sample">al_destroy_sample</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_sample(ALLEGRO_SAMPLE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L182">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L182">Source Code</a></p>
 <p>Free the sample data structure. If it was created with the <code>free_buf</code> parameter set to true, then the buffer will be freed with <a href="memory.html#al_free">al_free</a>.</p>
 <p>This function will stop any sample instances which may be playing the buffer referenced by the <a href="audio.html#allegro_sample">ALLEGRO_SAMPLE</a>.</p>
 <p>See also: <a href="audio.html#al_destroy_sample_instance">al_destroy_sample_instance</a>, <a href="audio.html#al_stop_sample">al_stop_sample</a>, <a href="audio.html#al_stop_samples">al_stop_samples</a></p>
 <h2 id="al_play_sample"><a href="#al_play_sample">al_play_sample</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_play_sample(ALLEGRO_SAMPLE *spl, <span class="dt">float</span> gain, <span class="dt">float</span> pan, <span class="dt">float</span> speed,
    ALLEGRO_PLAYMODE loop, ALLEGRO_SAMPLE_ID *ret_id)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L335">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L335">Source Code</a></p>
 <p>Plays a sample on one of the sample instances created by <a href="audio.html#al_reserve_samples">al_reserve_samples</a>. Returns true on success, false on failure. Playback may fail because all the reserved sample instances are currently used.</p>
 <p>Parameters:</p>
 <ul>
@@ -542,130 +542,130 @@ default voice <-- default mixer <---         .
 <p>See also: <a href="audio.html#allegro_playmode">ALLEGRO_PLAYMODE</a>, <a href="audio.html#allegro_audio_pan_none">ALLEGRO_AUDIO_PAN_NONE</a>, <a href="audio.html#allegro_sample_id">ALLEGRO_SAMPLE_ID</a>, <a href="audio.html#al_stop_sample">al_stop_sample</a>, <a href="audio.html#al_stop_samples">al_stop_samples</a>.</p>
 <h2 id="al_stop_sample"><a href="#al_stop_sample">al_stop_sample</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_stop_sample(ALLEGRO_SAMPLE_ID *spl_id)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L397">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L397">Source Code</a></p>
 <p>Stop the sample started by <a href="audio.html#al_play_sample">al_play_sample</a>.</p>
 <p>See also: <a href="audio.html#al_stop_samples">al_stop_samples</a></p>
 <h2 id="al_stop_samples"><a href="#al_stop_samples">al_stop_samples</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_stop_samples(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L417">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L417">Source Code</a></p>
 <p>Stop all samples started by <a href="audio.html#al_play_sample">al_play_sample</a>.</p>
 <p>See also: <a href="audio.html#al_stop_sample">al_stop_sample</a></p>
 <h2 id="al_get_sample_channels"><a href="#al_get_sample_channels">al_get_sample_channels</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_CHANNEL_CONF al_get_sample_channels(<span class="dt">const</span> ALLEGRO_SAMPLE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L461">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L461">Source Code</a></p>
 <p>Return the channel configuration of the sample.</p>
 <p>See also: <a href="audio.html#allegro_channel_conf">ALLEGRO_CHANNEL_CONF</a>, <a href="audio.html#al_get_sample_depth">al_get_sample_depth</a>, <a href="audio.html#al_get_sample_frequency">al_get_sample_frequency</a>, <a href="audio.html#al_get_sample_length">al_get_sample_length</a>, <a href="audio.html#al_get_sample_data">al_get_sample_data</a></p>
 <h2 id="al_get_sample_depth"><a href="#al_get_sample_depth">al_get_sample_depth</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_AUDIO_DEPTH al_get_sample_depth(<span class="dt">const</span> ALLEGRO_SAMPLE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L451">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L451">Source Code</a></p>
 <p>Return the audio depth of the sample.</p>
 <p>See also: <a href="audio.html#allegro_audio_depth">ALLEGRO_AUDIO_DEPTH</a>, <a href="audio.html#al_get_sample_channels">al_get_sample_channels</a>, <a href="audio.html#al_get_sample_frequency">al_get_sample_frequency</a>, <a href="audio.html#al_get_sample_length">al_get_sample_length</a>, <a href="audio.html#al_get_sample_data">al_get_sample_data</a></p>
 <h2 id="al_get_sample_frequency"><a href="#al_get_sample_frequency">al_get_sample_frequency</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_sample_frequency(<span class="dt">const</span> ALLEGRO_SAMPLE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L431">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L431">Source Code</a></p>
 <p>Return the frequency of the sample.</p>
 <p>See also: <a href="audio.html#al_get_sample_channels">al_get_sample_channels</a>, <a href="audio.html#al_get_sample_depth">al_get_sample_depth</a>, <a href="audio.html#al_get_sample_length">al_get_sample_length</a>, <a href="audio.html#al_get_sample_data">al_get_sample_data</a></p>
 <h2 id="al_get_sample_length"><a href="#al_get_sample_length">al_get_sample_length</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_sample_length(<span class="dt">const</span> ALLEGRO_SAMPLE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L441">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L441">Source Code</a></p>
 <p>Return the length of the sample in sample values.</p>
 <p>See also: <a href="audio.html#al_get_sample_channels">al_get_sample_channels</a>, <a href="audio.html#al_get_sample_depth">al_get_sample_depth</a>, <a href="audio.html#al_get_sample_frequency">al_get_sample_frequency</a>, <a href="audio.html#al_get_sample_data">al_get_sample_data</a></p>
 <h2 id="al_get_sample_data"><a href="#al_get_sample_data">al_get_sample_data</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> *al_get_sample_data(<span class="dt">const</span> ALLEGRO_SAMPLE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L471">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L471">Source Code</a></p>
 <p>Return a pointer to the raw sample data.</p>
 <p>See also: <a href="audio.html#al_get_sample_channels">al_get_sample_channels</a>, <a href="audio.html#al_get_sample_depth">al_get_sample_depth</a>, <a href="audio.html#al_get_sample_frequency">al_get_sample_frequency</a>, <a href="audio.html#al_get_sample_length">al_get_sample_length</a></p>
 <h1 id="sample-instance-functions"><a href="#sample-instance-functions">Sample instance functions</a></h1>
 <h2 id="al_create_sample_instance"><a href="#al_create_sample_instance">al_create_sample_instance</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_SAMPLE_INSTANCE *al_create_sample_instance(ALLEGRO_SAMPLE *sample_data)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L148">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L148">Source Code</a></p>
 <p>Creates a sample instance, using the supplied sample data. The instance must be attached to a mixer (or voice) in order to actually produce output.</p>
 <p>The argument may be NULL. You can then set the sample data later with <a href="audio.html#al_set_sample">al_set_sample</a>.</p>
 <p>See also: <a href="audio.html#al_destroy_sample_instance">al_destroy_sample_instance</a></p>
 <h2 id="al_destroy_sample_instance"><a href="#al_destroy_sample_instance">al_destroy_sample_instance</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L191">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L191">Source Code</a></p>
 <p>Detaches the sample instance from anything it may be attached to and frees it (the sample data, i.e. its ALLEGRO_SAMPLE, is <em>not</em> freed!).</p>
 <p>See also: <a href="audio.html#al_create_sample_instance">al_create_sample_instance</a></p>
 <h2 id="al_play_sample_instance"><a href="#al_play_sample_instance">al_play_sample_instance</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_play_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L214">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L214">Source Code</a></p>
 <p>Play the sample instance. Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_stop_sample_instance">al_stop_sample_instance</a></p>
 <h2 id="al_stop_sample_instance"><a href="#al_stop_sample_instance">al_stop_sample_instance</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_stop_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L224">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L224">Source Code</a></p>
 <p>Stop an sample instance playing.</p>
 <p>See also: <a href="audio.html#al_play_sample_instance">al_play_sample_instance</a></p>
 <h2 id="al_get_sample_instance_channels"><a href="#al_get_sample_instance_channels">al_get_sample_instance_channels</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_CHANNEL_CONF al_get_sample_instance_channels(
    <span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L320">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L320">Source Code</a></p>
 <p>Return the channel configuration of the sample instance's sample data.</p>
 <p>See also: <a href="audio.html#allegro_channel_conf">ALLEGRO_CHANNEL_CONF</a>.</p>
 <h2 id="al_get_sample_instance_depth"><a href="#al_get_sample_instance_depth">al_get_sample_instance_depth</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_AUDIO_DEPTH al_get_sample_instance_depth(<span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L310">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L310">Source Code</a></p>
 <p>Return the audio depth of the sample instance's sample data.</p>
 <p>See also: <a href="audio.html#allegro_audio_depth">ALLEGRO_AUDIO_DEPTH</a>.</p>
 <h2 id="al_get_sample_instance_frequency"><a href="#al_get_sample_instance_frequency">al_get_sample_instance_frequency</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_sample_instance_frequency(<span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L234">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L234">Source Code</a></p>
 <p>Return the frequency of the sample instance's sample data.</p>
 <h2 id="al_get_sample_instance_length"><a href="#al_get_sample_instance_length">al_get_sample_instance_length</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_sample_instance_length(<span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L244">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L244">Source Code</a></p>
 <p>Return the length of the sample instance in sample values. This property may differ from the length of the instance's sample data.</p>
 <p>See also: <a href="audio.html#al_set_sample_instance_length">al_set_sample_instance_length</a>, <a href="audio.html#al_get_sample_instance_time">al_get_sample_instance_time</a></p>
 <h2 id="al_set_sample_instance_length"><a href="#al_set_sample_instance_length">al_set_sample_instance_length</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_sample_instance_length(ALLEGRO_SAMPLE_INSTANCE *spl,
    <span class="dt">unsigned</span> <span class="dt">int</span> val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L388">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L388">Source Code</a></p>
 <p>Set the length of the sample instance in sample values. This can be used to play only parts of the underlying sample. Be careful not to exceed the actual length of the sample data, though.</p>
 <p>Return true on success, false on failure. Will fail if the sample instance is currently playing.</p>
 <p>See also: <a href="audio.html#al_get_sample_instance_length">al_get_sample_instance_length</a></p>
 <h2 id="al_get_sample_instance_position"><a href="#al_get_sample_instance_position">al_get_sample_instance_position</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_sample_instance_position(<span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L254">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L254">Source Code</a></p>
 <p>Get the playback position of a sample instance.</p>
 <p>See also: <a href="audio.html#al_set_sample_instance_position">al_set_sample_instance_position</a></p>
 <h2 id="al_set_sample_instance_position"><a href="#al_set_sample_instance_position">al_set_sample_instance_position</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_sample_instance_position(ALLEGRO_SAMPLE_INSTANCE *spl,
    <span class="dt">unsigned</span> <span class="dt">int</span> val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L366">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L366">Source Code</a></p>
 <p>Set the playback position of a sample instance.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_get_sample_instance_position">al_get_sample_instance_position</a></p>
 <h2 id="al_get_sample_instance_speed"><a href="#al_get_sample_instance_speed">al_get_sample_instance_speed</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> al_get_sample_instance_speed(<span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L269">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L269">Source Code</a></p>
 <p>Return the relative playback speed of the sample instance.</p>
 <p>See also: <a href="audio.html#al_set_sample_instance_speed">al_set_sample_instance_speed</a></p>
 <h2 id="al_set_sample_instance_speed"><a href="#al_set_sample_instance_speed">al_set_sample_instance_speed</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_sample_instance_speed(ALLEGRO_SAMPLE_INSTANCE *spl, <span class="dt">float</span> val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L406">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L407">Source Code</a></p>
 <p>Set the relative playback speed of the sample instance. 1.0 means normal speed.</p>
 <p>Return true on success, false on failure. Will fail if the sample instance is attached directly to a voice.</p>
 <p>See also: <a href="audio.html#al_get_sample_instance_speed">al_get_sample_instance_speed</a></p>
 <h2 id="al_get_sample_instance_gain"><a href="#al_get_sample_instance_gain">al_get_sample_instance_gain</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> al_get_sample_instance_gain(<span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L279">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L279">Source Code</a></p>
 <p>Return the playback gain of the sample instance.</p>
 <p>See also: <a href="audio.html#al_set_sample_instance_gain">al_set_sample_instance_gain</a></p>
 <h2 id="al_set_sample_instance_gain"><a href="#al_set_sample_instance_gain">al_set_sample_instance_gain</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_sample_instance_gain(ALLEGRO_SAMPLE_INSTANCE *spl, <span class="dt">float</span> val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L447">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L448">Source Code</a></p>
 <p>Set the playback gain of the sample instance.</p>
 <p>Returns true on success, false on failure. Will fail if the sample instance is attached directly to a voice.</p>
 <p>See also: <a href="audio.html#al_get_sample_instance_gain">al_get_sample_instance_gain</a></p>
 <h2 id="al_get_sample_instance_pan"><a href="#al_get_sample_instance_pan">al_get_sample_instance_pan</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> al_get_sample_instance_pan(<span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L289">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L289">Source Code</a></p>
 <p>Get the pan value of the sample instance.</p>
 <p>See also: <a href="audio.html#al_set_sample_instance_pan">al_set_sample_instance_pan</a>.</p>
 <h2 id="al_set_sample_instance_pan"><a href="#al_set_sample_instance_pan">al_set_sample_instance_pan</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_sample_instance_pan(ALLEGRO_SAMPLE_INSTANCE *spl, <span class="dt">float</span> val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L478">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L479">Source Code</a></p>
 <p>Set the pan value on a sample instance. A value of -1.0 means to play the sample only through the left speaker; +1.0 means only through the right speaker; 0.0 means the sample is centre balanced. A special value <a href="audio.html#allegro_audio_pan_none">ALLEGRO_AUDIO_PAN_NONE</a> disables panning and plays the sample at its original level. This will be louder than a pan value of 0.0.</p>
 <blockquote>
 <p>Note: panning samples with more than two channels doesn't work yet.</p>
@@ -674,53 +674,53 @@ default voice <-- default mixer <---         .
 <p>See also: <a href="audio.html#al_get_sample_instance_pan">al_get_sample_instance_pan</a>, <a href="audio.html#allegro_audio_pan_none">ALLEGRO_AUDIO_PAN_NONE</a></p>
 <h2 id="al_get_sample_instance_time"><a href="#al_get_sample_instance_time">al_get_sample_instance_time</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> al_get_sample_instance_time(<span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L299">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L299">Source Code</a></p>
 <p>Return the length of the sample instance in seconds, assuming a playback speed of 1.0.</p>
 <p>See also: <a href="audio.html#al_get_sample_instance_length">al_get_sample_instance_length</a></p>
 <h2 id="al_get_sample_instance_playmode"><a href="#al_get_sample_instance_playmode">al_get_sample_instance_playmode</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_PLAYMODE al_get_sample_instance_playmode(<span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L331">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L331">Source Code</a></p>
 <p>Return the playback mode of the sample instance.</p>
 <p>See also: <a href="audio.html#allegro_playmode">ALLEGRO_PLAYMODE</a>, <a href="audio.html#al_set_sample_instance_playmode">al_set_sample_instance_playmode</a></p>
 <h2 id="al_set_sample_instance_playmode"><a href="#al_set_sample_instance_playmode">al_set_sample_instance_playmode</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_sample_instance_playmode(ALLEGRO_SAMPLE_INSTANCE *spl,
    ALLEGRO_PLAYMODE val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L513">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L514">Source Code</a></p>
 <p>Set the playback mode of the sample instance.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#allegro_playmode">ALLEGRO_PLAYMODE</a>, <a href="audio.html#al_get_sample_instance_playmode">al_get_sample_instance_playmode</a></p>
 <h2 id="al_get_sample_instance_playing"><a href="#al_get_sample_instance_playing">al_get_sample_instance_playing</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_sample_instance_playing(<span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L341">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L341">Source Code</a></p>
 <p>Return true if the sample instance is in the playing state. This may be true even if the instance is not attached to anything.</p>
 <p>See also: <a href="audio.html#al_set_sample_instance_playing">al_set_sample_instance_playing</a></p>
 <h2 id="al_set_sample_instance_playing"><a href="#al_set_sample_instance_playing">al_set_sample_instance_playing</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_sample_instance_playing(ALLEGRO_SAMPLE_INSTANCE *spl, bool val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L542">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L543">Source Code</a></p>
 <p>Change whether the sample instance is playing.</p>
 <p>The instance does not need to be attached to anything (since: 5.1.8).</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_get_sample_instance_playing">al_get_sample_instance_playing</a></p>
 <h2 id="al_get_sample_instance_attached"><a href="#al_get_sample_instance_attached">al_get_sample_instance_attached</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_sample_instance_attached(<span class="dt">const</span> ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L356">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L356">Source Code</a></p>
 <p>Return whether the sample instance is attached to something.</p>
 <p>See also: <a href="audio.html#al_attach_sample_instance_to_mixer">al_attach_sample_instance_to_mixer</a>, <a href="audio.html#al_attach_sample_instance_to_voice">al_attach_sample_instance_to_voice</a>, <a href="audio.html#al_detach_sample_instance">al_detach_sample_instance</a></p>
 <h2 id="al_detach_sample_instance"><a href="#al_detach_sample_instance">al_detach_sample_instance</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_detach_sample_instance(ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L570">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L571">Source Code</a></p>
 <p>Detach the sample instance from whatever it's attached to, if anything.</p>
 <p>Returns true on success.</p>
 <p>See also: <a href="audio.html#al_attach_sample_instance_to_mixer">al_attach_sample_instance_to_mixer</a>, <a href="audio.html#al_attach_sample_instance_to_voice">al_attach_sample_instance_to_voice</a>, <a href="audio.html#al_get_sample_instance_attached">al_get_sample_instance_attached</a></p>
 <h2 id="al_get_sample"><a href="#al_get_sample">al_get_sample</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_SAMPLE *al_get_sample(ALLEGRO_SAMPLE_INSTANCE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L647">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L648">Source Code</a></p>
 <p>Return the sample data that the sample instance plays.</p>
 <p>Note this returns a pointer to an internal structure, <em>not</em> the <a href="audio.html#allegro_sample">ALLEGRO_SAMPLE</a> that you may have passed to <a href="audio.html#al_set_sample">al_set_sample</a>. However, the sample buffer of the returned ALLEGRO_SAMPLE will be the same as the one that was used to create the sample (passed to <a href="audio.html#al_create_sample">al_create_sample</a>). You can use <a href="audio.html#al_get_sample_data">al_get_sample_data</a> on the return [...]
 <p>See also: <a href="audio.html#al_set_sample">al_set_sample</a></p>
 <h2 id="al_set_sample"><a href="#al_set_sample">al_set_sample</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_sample(ALLEGRO_SAMPLE_INSTANCE *spl, ALLEGRO_SAMPLE *data)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_instance.c#L582">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_instance.c#L583">Source Code</a></p>
 <p>Change the sample data that a sample instance plays. This can be quite an involved process.</p>
 <p>First, the sample is stopped if it is not already.</p>
 <p>Next, if data is NULL, the sample is detached from its parent (if any).</p>
@@ -732,7 +732,7 @@ default voice <-- default mixer <---         .
 <h2 id="al_create_mixer"><a href="#al_create_mixer">al_create_mixer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MIXER *al_create_mixer(<span class="dt">unsigned</span> <span class="dt">int</span> freq,
    ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L609">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L609">Source Code</a></p>
 <p>Creates a mixer to attach sample instances, audio streams, or other mixers to. It will mix into a buffer at the requested frequency and channel count.</p>
 <p>The only supported audio depths are ALLEGRO_AUDIO_DEPTH_FLOAT32 and ALLEGRO_AUDIO_DEPTH_INT16 (not yet complete).</p>
 <p>To actually produce any output, the mixer will have to be attached to a voice.</p>
@@ -740,41 +740,41 @@ default voice <-- default mixer <---         .
 <p>See also: <a href="audio.html#al_destroy_mixer">al_destroy_mixer</a>, <a href="audio.html#allegro_audio_depth">ALLEGRO_AUDIO_DEPTH</a>, <a href="audio.html#allegro_channel_conf">ALLEGRO_CHANNEL_CONF</a></p>
 <h2 id="al_destroy_mixer"><a href="#al_destroy_mixer">al_destroy_mixer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_mixer(ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L678">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L678">Source Code</a></p>
 <p>Destroys the mixer.</p>
 <p>See also: <a href="audio.html#al_create_mixer">al_create_mixer</a></p>
 <h2 id="al_get_default_mixer"><a href="#al_get_default_mixer">al_get_default_mixer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MIXER *al_get_default_mixer(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L253">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L253">Source Code</a></p>
 <p>Return the default mixer, or NULL if one has not been set. Although different configurations of mixers and voices can be used, in most cases a single mixer attached to a voice is what you want. The default mixer is used by <a href="audio.html#al_play_sample">al_play_sample</a>.</p>
 <p>See also: <a href="audio.html#al_reserve_samples">al_reserve_samples</a>, <a href="audio.html#al_play_sample">al_play_sample</a>, <a href="audio.html#al_set_default_mixer">al_set_default_mixer</a>, <a href="audio.html#al_restore_default_mixer">al_restore_default_mixer</a></p>
 <h2 id="al_set_default_mixer"><a href="#al_set_default_mixer">al_set_default_mixer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_default_mixer(ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L261">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L261">Source Code</a></p>
 <p>Sets the default mixer. All samples started with <a href="audio.html#al_play_sample">al_play_sample</a> will be stopped. If you are using your own mixer, this should be called before <a href="audio.html#al_reserve_samples">al_reserve_samples</a>.</p>
 <p>Returns true on success, false on error.</p>
 <p>See also: <a href="audio.html#al_reserve_samples">al_reserve_samples</a>, <a href="audio.html#al_play_sample">al_play_sample</a>, <a href="audio.html#al_get_default_mixer">al_get_default_mixer</a>, <a href="audio.html#al_restore_default_mixer">al_restore_default_mixer</a></p>
 <h2 id="al_restore_default_mixer"><a href="#al_restore_default_mixer">al_restore_default_mixer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_restore_default_mixer(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L302">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L302">Source Code</a></p>
 <p>Restores Allegro's default mixer and attaches it to the default voice. If the default mixer hasn't been created before, it will be created. If the default voice hasn't been set via <a href="audio.html#al_set_default_voice">al_set_default_voice</a> or created before, it will also be created. All samples started with <a href="audio.html#al_play_sample">al_play_sample</a> will be stopped.</p>
 <p>Returns true on success, false on error.</p>
 <p>See also: <a href="audio.html#al_get_default_mixer">al_get_default_mixer</a>, <a href="audio.html#al_set_default_mixer">al_set_default_mixer</a>, <a href="audio.html#al_reserve_samples">al_reserve_samples</a>.</p>
 <h2 id="al_get_default_voice"><a href="#al_get_default_voice">al_get_default_voice</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_VOICE *al_get_default_voice(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L316">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L316">Source Code</a></p>
 <p>Returns the default voice or NULL if there is none.</p>
 <p>Since: 5.1.13</p>
 <p>See also: <a href="audio.html#al_get_default_mixer">al_get_default_mixer</a></p>
 <h2 id="al_set_default_voice"><a href="#al_set_default_voice">al_set_default_voice</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_default_voice(ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_sample.c#L324">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_sample.c#L324">Source Code</a></p>
 <p>You can call this before calling al_restore_default_mixer to provide the voice which should be used. Any previous voice will be destroyed. You can also pass NULL to destroy the current default voice.</p>
 <p>Since: 5.1.13</p>
 <p>See also: <a href="audio.html#al_get_default_mixer">al_get_default_mixer</a></p>
 <h2 id="al_attach_mixer_to_mixer"><a href="#al_attach_mixer_to_mixer">al_attach_mixer_to_mixer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_attach_mixer_to_mixer(ALLEGRO_MIXER *stream, ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L800">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L800">Source Code</a></p>
 <p>Attaches the mixer passed as the first argument onto the mixer passed as the second argument. The first mixer (that is going to be attached) must not already be attached to anything. Both mixers must use the same frequency and audio depth.</p>
 <p>Returns true on success, false on error.</p>
 <p>It is invalid to attach a mixer to itself.</p>
@@ -782,94 +782,94 @@ default voice <-- default mixer <---         .
 <h2 id="al_attach_sample_instance_to_mixer"><a href="#al_attach_sample_instance_to_mixer">al_attach_sample_instance_to_mixer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_attach_sample_instance_to_mixer(ALLEGRO_SAMPLE_INSTANCE *spl,
    ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L690">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L690">Source Code</a></p>
 <p>Attach a sample instance to a mixer. The instance must not already be attached to anything.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_detach_sample_instance">al_detach_sample_instance</a>.</p>
 <h2 id="al_attach_audio_stream_to_mixer"><a href="#al_attach_audio_stream_to_mixer">al_attach_audio_stream_to_mixer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_attach_audio_stream_to_mixer(ALLEGRO_AUDIO_STREAM *stream, ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L789">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L789">Source Code</a></p>
 <p>Attach an audio stream to a mixer. The stream must not already be attached to anything.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_detach_audio_stream">al_detach_audio_stream</a>.</p>
 <h2 id="al_get_mixer_frequency"><a href="#al_get_mixer_frequency">al_get_mixer_frequency</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_mixer_frequency(<span class="dt">const</span> ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L843">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L843">Source Code</a></p>
 <p>Return the mixer frequency.</p>
 <p>See also: <a href="audio.html#al_set_mixer_frequency">al_set_mixer_frequency</a></p>
 <h2 id="al_set_mixer_frequency"><a href="#al_set_mixer_frequency">al_set_mixer_frequency</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_mixer_frequency(ALLEGRO_MIXER *mixer, <span class="dt">unsigned</span> <span class="dt">int</span> val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L913">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L913">Source Code</a></p>
 <p>Set the mixer frequency. This will only work if the mixer is not attached to anything.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_get_mixer_frequency">al_get_mixer_frequency</a></p>
 <h2 id="al_get_mixer_channels"><a href="#al_get_mixer_channels">al_get_mixer_channels</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_CHANNEL_CONF al_get_mixer_channels(<span class="dt">const</span> ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L853">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L853">Source Code</a></p>
 <p>Return the mixer channel configuration.</p>
 <p>See also: <a href="audio.html#allegro_channel_conf">ALLEGRO_CHANNEL_CONF</a>.</p>
 <h2 id="al_get_mixer_depth"><a href="#al_get_mixer_depth">al_get_mixer_depth</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_AUDIO_DEPTH al_get_mixer_depth(<span class="dt">const</span> ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L863">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L863">Source Code</a></p>
 <p>Return the mixer audio depth.</p>
 <p>See also: <a href="audio.html#allegro_audio_depth">ALLEGRO_AUDIO_DEPTH</a>.</p>
 <h2 id="al_get_mixer_gain"><a href="#al_get_mixer_gain">al_get_mixer_gain</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> al_get_mixer_gain(<span class="dt">const</span> ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L883">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L883">Source Code</a></p>
 <p>Return the mixer gain (amplification factor). The default is 1.0.</p>
 <p>Since: 5.0.6, 5.1.0</p>
 <p>See also: <a href="audio.html#al_set_mixer_gain">al_set_mixer_gain</a>.</p>
 <h2 id="al_set_mixer_gain"><a href="#al_set_mixer_gain">al_set_mixer_gain</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_mixer_gain(ALLEGRO_MIXER *mixer, <span class="dt">float</span> new_gain)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L961">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L961">Source Code</a></p>
 <p>Set the mixer gain (amplification factor).</p>
 <p>Returns true on success, false on failure.</p>
 <p>Since: 5.0.6, 5.1.0</p>
 <p>See also: <a href="audio.html#al_get_mixer_gain">al_get_mixer_gain</a></p>
 <h2 id="al_get_mixer_quality"><a href="#al_get_mixer_quality">al_get_mixer_quality</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MIXER_QUALITY al_get_mixer_quality(<span class="dt">const</span> ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L873">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L873">Source Code</a></p>
 <p>Return the mixer quality.</p>
 <p>See also: <a href="audio.html#allegro_mixer_quality">ALLEGRO_MIXER_QUALITY</a>, <a href="audio.html#al_set_mixer_quality">al_set_mixer_quality</a></p>
 <h2 id="al_set_mixer_quality"><a href="#al_set_mixer_quality">al_set_mixer_quality</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_mixer_quality(ALLEGRO_MIXER *mixer, ALLEGRO_MIXER_QUALITY new_quality)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L933">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L933">Source Code</a></p>
 <p>Set the mixer quality. This can only succeed if the mixer does not have anything attached to it.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#allegro_mixer_quality">ALLEGRO_MIXER_QUALITY</a>, <a href="audio.html#al_get_mixer_quality">al_get_mixer_quality</a></p>
 <h2 id="al_get_mixer_playing"><a href="#al_get_mixer_playing">al_get_mixer_playing</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_mixer_playing(<span class="dt">const</span> ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L893">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L893">Source Code</a></p>
 <p>Return true if the mixer is playing.</p>
 <p>See also: <a href="audio.html#al_set_mixer_playing">al_set_mixer_playing</a>.</p>
 <h2 id="al_set_mixer_playing"><a href="#al_set_mixer_playing">al_set_mixer_playing</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_mixer_playing(ALLEGRO_MIXER *mixer, bool val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L985">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L985">Source Code</a></p>
 <p>Change whether the mixer is playing.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_get_mixer_playing">al_get_mixer_playing</a>.</p>
 <h2 id="al_get_mixer_attached"><a href="#al_get_mixer_attached">al_get_mixer_attached</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_mixer_attached(<span class="dt">const</span> ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L903">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L903">Source Code</a></p>
 <p>Return true if the mixer is attached to something.</p>
 <p>See also: <a href="audio.html#al_attach_sample_instance_to_mixer">al_attach_sample_instance_to_mixer</a>, <a href="audio.html#al_attach_audio_stream_to_mixer">al_attach_audio_stream_to_mixer</a>, <a href="audio.html#al_attach_mixer_to_mixer">al_attach_mixer_to_mixer</a>, <a href="audio.html#al_detach_mixer">al_detach_mixer</a></p>
 <h2 id="al_detach_mixer"><a href="#al_detach_mixer">al_detach_mixer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_detach_mixer(ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L996">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L996">Source Code</a></p>
 <p>Detach the mixer from whatever it is attached to, if anything.</p>
 <p>See also: <a href="audio.html#al_attach_mixer_to_mixer">al_attach_mixer_to_mixer</a>.</p>
 <h2 id="al_set_mixer_postprocess_callback"><a href="#al_set_mixer_postprocess_callback">al_set_mixer_postprocess_callback</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_mixer_postprocess_callback(ALLEGRO_MIXER *mixer,
    <span class="dt">void</span> (*pp_callback)(<span class="dt">void</span> *buf, <span class="dt">unsigned</span> <span class="dt">int</span> samples, <span class="dt">void</span> *data),
    <span class="dt">void</span> *pp_callback_userdata)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_mixer.c#L824">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_mixer.c#L824">Source Code</a></p>
 <p>Sets a post-processing filter function that's called after the attached streams have been mixed. The buffer's format will be whatever the mixer was created with. The sample count and user-data pointer is also passed.</p>
 <h1 id="stream-functions"><a href="#stream-functions">Stream functions</a></h1>
 <h2 id="al_create_audio_stream"><a href="#al_create_audio_stream">al_create_audio_stream</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_AUDIO_STREAM *al_create_audio_stream(size_t fragment_count,
    <span class="dt">unsigned</span> <span class="dt">int</span> frag_samples, <span class="dt">unsigned</span> <span class="dt">int</span> freq, ALLEGRO_AUDIO_DEPTH depth,
    ALLEGRO_CHANNEL_CONF chan_conf)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L50">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L50">Source Code</a></p>
 <p>Creates an <a href="audio.html#allegro_audio_stream">ALLEGRO_AUDIO_STREAM</a>. The stream will be set to play by default. It will feed audio data from a buffer, which is split into a number of fragments.</p>
 <p>Parameters:</p>
 <ul>
@@ -894,7 +894,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 </blockquote>
 <h2 id="al_destroy_audio_stream"><a href="#al_destroy_audio_stream">al_destroy_audio_stream</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_audio_stream(ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L146">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L146">Source Code</a></p>
 <p>Destroy an audio stream which was created with <a href="audio.html#al_create_audio_stream">al_create_audio_stream</a> or <a href="audio.html#al_load_audio_stream">al_load_audio_stream</a>.</p>
 <blockquote>
 <p><em>Note:</em> If the stream is still attached to a mixer or voice, <a href="audio.html#al_detach_audio_stream">al_detach_audio_stream</a> is automatically called on it first.</p>
@@ -903,113 +903,113 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <h2 id="al_get_audio_stream_event_source"><a href="#al_get_audio_stream_event_source">al_get_audio_stream_event_source</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_audio_stream_event_source(
    ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L881">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L893">Source Code</a></p>
 <p>Retrieve the associated event source.</p>
 <p>See <a href="audio.html#al_get_audio_stream_fragment">al_get_audio_stream_fragment</a> for a description of the ALLEGRO_EVENT_AUDIO_STREAM_FRAGMENT event that audio streams emit.</p>
 <h2 id="al_drain_audio_stream"><a href="#al_drain_audio_stream">al_drain_audio_stream</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_drain_audio_stream(ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L166">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L166">Source Code</a></p>
 <p>You should call this to finalise an audio stream that you will no longer be feeding, to wait for all pending buffers to finish playing. The stream's playing state will change to false.</p>
 <p>See also: <a href="audio.html#al_destroy_audio_stream">al_destroy_audio_stream</a></p>
 <h2 id="al_rewind_audio_stream"><a href="#al_rewind_audio_stream">al_rewind_audio_stream</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_rewind_audio_stream(ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L792">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L804">Source Code</a></p>
 <p>Set the streaming file playing position to the beginning. Returns true on success. Currently this can only be called on streams created with <a href="audio.html#al_load_audio_stream">al_load_audio_stream</a>, <a href="audio.html#al_load_audio_stream_f">al_load_audio_stream_f</a> and the format-specific functions underlying those functions.</p>
 <h2 id="al_get_audio_stream_frequency"><a href="#al_get_audio_stream_frequency">al_get_audio_stream_frequency</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_audio_stream_frequency(<span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L186">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L186">Source Code</a></p>
 <p>Return the stream frequency.</p>
 <h2 id="al_get_audio_stream_channels"><a href="#al_get_audio_stream_channels">al_get_audio_stream_channels</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_CHANNEL_CONF al_get_audio_stream_channels(
    <span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L260">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L260">Source Code</a></p>
 <p>Return the stream channel configuration.</p>
 <p>See also: <a href="audio.html#allegro_channel_conf">ALLEGRO_CHANNEL_CONF</a>.</p>
 <h2 id="al_get_audio_stream_depth"><a href="#al_get_audio_stream_depth">al_get_audio_stream_depth</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_AUDIO_DEPTH al_get_audio_stream_depth(
    <span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L271">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L271">Source Code</a></p>
 <p>Return the stream audio depth.</p>
 <p>See also: <a href="audio.html#allegro_audio_depth">ALLEGRO_AUDIO_DEPTH</a>.</p>
 <h2 id="al_get_audio_stream_length"><a href="#al_get_audio_stream_length">al_get_audio_stream_length</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_audio_stream_length(<span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L196">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L196">Source Code</a></p>
 <p>Return the stream length in samples.</p>
 <h2 id="al_get_audio_stream_speed"><a href="#al_get_audio_stream_speed">al_get_audio_stream_speed</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> al_get_audio_stream_speed(<span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L230">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L230">Source Code</a></p>
 <p>Return the relative playback speed of the stream.</p>
 <p>See also: <a href="audio.html#al_set_audio_stream_speed">al_set_audio_stream_speed</a>.</p>
 <h2 id="al_set_audio_stream_speed"><a href="#al_set_audio_stream_speed">al_set_audio_stream_speed</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_audio_stream_speed(ALLEGRO_AUDIO_STREAM *stream, <span class="dt">float</span> val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L362">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L362">Source Code</a></p>
 <p>Set the relative playback speed of the stream. 1.0 means normal speed.</p>
 <p>Return true on success, false on failure. Will fail if the audio stream is attached directly to a voice.</p>
 <p>See also: <a href="audio.html#al_get_audio_stream_speed">al_get_audio_stream_speed</a>.</p>
 <h2 id="al_get_audio_stream_gain"><a href="#al_get_audio_stream_gain">al_get_audio_stream_gain</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> al_get_audio_stream_gain(<span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L240">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L240">Source Code</a></p>
 <p>Return the playback gain of the stream.</p>
 <p>See also: <a href="audio.html#al_set_audio_stream_gain">al_set_audio_stream_gain</a>.</p>
 <h2 id="al_set_audio_stream_gain"><a href="#al_set_audio_stream_gain">al_set_audio_stream_gain</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_audio_stream_gain(ALLEGRO_AUDIO_STREAM *stream, <span class="dt">float</span> val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L399">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L399">Source Code</a></p>
 <p>Set the playback gain of the stream.</p>
 <p>Returns true on success, false on failure. Will fail if the audio stream is attached directly to a voice.</p>
 <p>See also: <a href="audio.html#al_get_audio_stream_gain">al_get_audio_stream_gain</a>.</p>
 <h2 id="al_get_audio_stream_pan"><a href="#al_get_audio_stream_pan">al_get_audio_stream_pan</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> al_get_audio_stream_pan(<span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L250">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L250">Source Code</a></p>
 <p>Get the pan value of the stream.</p>
 <p>See also: <a href="audio.html#al_set_audio_stream_pan">al_set_audio_stream_pan</a>.</p>
 <h2 id="al_set_audio_stream_pan"><a href="#al_set_audio_stream_pan">al_set_audio_stream_pan</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_audio_stream_pan(ALLEGRO_AUDIO_STREAM *stream, <span class="dt">float</span> val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L429">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L429">Source Code</a></p>
 <p>Set the pan value on an audio stream. A value of -1.0 means to play the stream only through the left speaker; +1.0 means only through the right speaker; 0.0 means the sample is centre balanced. A special value <a href="audio.html#allegro_audio_pan_none">ALLEGRO_AUDIO_PAN_NONE</a> disables panning and plays the stream at its original level. This will be louder than a pan value of 0.0.</p>
 <p>Returns true on success, false on failure. Will fail if the audio stream is attached directly to a voice.</p>
 <p>See also: <a href="audio.html#al_get_audio_stream_pan">al_get_audio_stream_pan</a>, <a href="audio.html#allegro_audio_pan_none">ALLEGRO_AUDIO_PAN_NONE</a></p>
 <h2 id="al_get_audio_stream_playing"><a href="#al_get_audio_stream_playing">al_get_audio_stream_playing</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_audio_stream_playing(<span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L293">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L293">Source Code</a></p>
 <p>Return true if the stream is playing.</p>
 <p>See also: <a href="audio.html#al_set_audio_stream_playing">al_set_audio_stream_playing</a>.</p>
 <h2 id="al_set_audio_stream_playing"><a href="#al_set_audio_stream_playing">al_set_audio_stream_playing</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_audio_stream_playing(ALLEGRO_AUDIO_STREAM *stream, bool val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L534">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L534">Source Code</a></p>
 <p>Change whether the stream is playing.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#al_get_audio_stream_playing">al_get_audio_stream_playing</a></p>
 <h2 id="al_get_audio_stream_playmode"><a href="#al_get_audio_stream_playmode">al_get_audio_stream_playmode</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_PLAYMODE al_get_audio_stream_playmode(
    <span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L282">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L282">Source Code</a></p>
 <p>Return the playback mode of the stream.</p>
 <p>See also: <a href="audio.html#allegro_playmode">ALLEGRO_PLAYMODE</a>, <a href="audio.html#al_set_audio_stream_playmode">al_set_audio_stream_playmode</a>.</p>
 <h2 id="al_set_audio_stream_playmode"><a href="#al_set_audio_stream_playmode">al_set_audio_stream_playmode</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_audio_stream_playmode(ALLEGRO_AUDIO_STREAM *stream,
    ALLEGRO_PLAYMODE val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L463">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L463">Source Code</a></p>
 <p>Set the playback mode of the stream.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="audio.html#allegro_playmode">ALLEGRO_PLAYMODE</a>, <a href="audio.html#al_get_audio_stream_playmode">al_get_audio_stream_playmode</a>.</p>
 <h2 id="al_get_audio_stream_attached"><a href="#al_get_audio_stream_attached">al_get_audio_stream_attached</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_audio_stream_attached(<span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L303">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L303">Source Code</a></p>
 <p>Return whether the stream is attached to something.</p>
 <p>See also: <a href="audio.html#al_attach_audio_stream_to_mixer">al_attach_audio_stream_to_mixer</a>, <a href="audio.html#al_attach_audio_stream_to_voice">al_attach_audio_stream_to_voice</a>, <a href="audio.html#al_detach_audio_stream">al_detach_audio_stream</a>.</p>
 <h2 id="al_detach_audio_stream"><a href="#al_detach_audio_stream">al_detach_audio_stream</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_detach_audio_stream(ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L570">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L570">Source Code</a></p>
 <p>Detach the stream from whatever it's attached to, if anything.</p>
 <p>See also: <a href="audio.html#al_attach_audio_stream_to_mixer">al_attach_audio_stream_to_mixer</a>, <a href="audio.html#al_attach_audio_stream_to_voice">al_attach_audio_stream_to_voice</a>, <a href="audio.html#al_get_audio_stream_attached">al_get_audio_stream_attached</a>.</p>
 <h2 id="al_get_audio_stream_played_samples"><a href="#al_get_audio_stream_played_samples">al_get_audio_stream_played_samples</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint64_t</span> al_get_audio_stream_played_samples(<span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L312">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L312">Source Code</a></p>
 <p>Get the number of samples consumed by the parent since the audio stream was started.</p>
 <p>Since: 5.1.8</p>
 <h2 id="al_get_audio_stream_fragment"><a href="#al_get_audio_stream_fragment">al_get_audio_stream_fragment</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> *al_get_audio_stream_fragment(<span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L333">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L333">Source Code</a></p>
 <p>When using Allegro's audio streaming, you will use this function to continuously provide new sample data to a stream.</p>
 <p>If the stream is ready for new data, the function will return the address of an internal buffer to be filled with audio data. The length and format of the buffer are specified with <a href="audio.html#al_create_audio_stream">al_create_audio_stream</a> or can be queried with the various functions described here. Once the buffer is filled, you must signal this to Allegro by passing the buffer to <a href="audio.html#al_set_audio_stream_fragment">al_set_audio_stream_fragment</a>.</p>
 <p>If the stream is not ready for new data, the function will return NULL.</p>
@@ -1019,46 +1019,46 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <p>See also: <a href="audio.html#al_set_audio_stream_fragment">al_set_audio_stream_fragment</a>, <a href="audio.html#al_get_audio_stream_event_source">al_get_audio_stream_event_source</a>, <a href="audio.html#al_get_audio_stream_frequency">al_get_audio_stream_frequency</a>, <a href="audio.html#al_get_audio_stream_channels">al_get_audio_stream_channels</a>, <a href="audio.html#al_get_audio_stream_depth">al_get_audio_stream_depth</a>, <a href="audio.html#al_get_audio_stream_length">al_get_ [...]
 <h2 id="al_set_audio_stream_fragment"><a href="#al_set_audio_stream_fragment">al_set_audio_stream_fragment</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_audio_stream_fragment(ALLEGRO_AUDIO_STREAM *stream, <span class="dt">void</span> *val)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L582">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L582">Source Code</a></p>
 <p>This function needs to be called for every successful call of <a href="audio.html#al_get_audio_stream_fragment">al_get_audio_stream_fragment</a> to indicate that the buffer (pointed to by <code>val</code>) is filled with new data.</p>
 <p>See also: <a href="audio.html#al_get_audio_stream_fragment">al_get_audio_stream_fragment</a></p>
 <h2 id="al_get_audio_stream_fragments"><a href="#al_get_audio_stream_fragments">al_get_audio_stream_fragments</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_audio_stream_fragments(<span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L206">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L206">Source Code</a></p>
 <p>Returns the number of fragments this stream uses. This is the same value as passed to <a href="audio.html#al_create_audio_stream">al_create_audio_stream</a> when a new stream is created.</p>
 <p>See also: <a href="audio.html#al_get_available_audio_stream_fragments">al_get_available_audio_stream_fragments</a></p>
 <h2 id="al_get_available_audio_stream_fragments"><a href="#al_get_available_audio_stream_fragments">al_get_available_audio_stream_fragments</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_available_audio_stream_fragments(
    <span class="dt">const</span> ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L216">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L216">Source Code</a></p>
 <p>Returns the number of available fragments in the stream, that is, fragments which are not currently filled with data for playback.</p>
 <p>See also: <a href="audio.html#al_get_audio_stream_fragment">al_get_audio_stream_fragment</a>, <a href="audio.html#al_get_audio_stream_fragments">al_get_audio_stream_fragments</a></p>
 <h2 id="al_seek_audio_stream_secs"><a href="#al_seek_audio_stream_secs">al_seek_audio_stream_secs</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_seek_audio_stream_secs(ALLEGRO_AUDIO_STREAM *stream, <span class="dt">double</span> time)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L809">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L821">Source Code</a></p>
 <p>Set the streaming file playing position to time. Returns true on success. Currently this can only be called on streams created with <a href="audio.html#al_load_audio_stream">al_load_audio_stream</a>, <a href="audio.html#al_load_audio_stream_f">al_load_audio_stream_f</a> and the format-specific functions underlying those functions.</p>
 <p>See also: <a href="audio.html#al_get_audio_stream_position_secs">al_get_audio_stream_position_secs</a>, <a href="audio.html#al_get_audio_stream_length_secs">al_get_audio_stream_length_secs</a></p>
 <h2 id="al_get_audio_stream_position_secs"><a href="#al_get_audio_stream_position_secs">al_get_audio_stream_position_secs</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">double</span> al_get_audio_stream_position_secs(ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L826">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L838">Source Code</a></p>
 <p>Return the position of the stream in seconds. Currently this can only be called on streams created with <a href="audio.html#al_load_audio_stream">al_load_audio_stream</a>.</p>
 <p>See also: <a href="audio.html#al_get_audio_stream_length_secs">al_get_audio_stream_length_secs</a></p>
 <h2 id="al_get_audio_stream_length_secs"><a href="#al_get_audio_stream_length_secs">al_get_audio_stream_length_secs</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">double</span> al_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM *stream)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L843">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L855">Source Code</a></p>
 <p>Return the length of the stream in seconds, if known. Otherwise returns zero.</p>
 <p>Currently this can only be called on streams created with <a href="audio.html#al_load_audio_stream">al_load_audio_stream</a>, <a href="audio.html#al_load_audio_stream_f">al_load_audio_stream_f</a> and the format-specific functions underlying those functions.</p>
 <p>See also: <a href="audio.html#al_get_audio_stream_position_secs">al_get_audio_stream_position_secs</a></p>
 <h2 id="al_set_audio_stream_loop_secs"><a href="#al_set_audio_stream_loop_secs">al_set_audio_stream_loop_secs</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_audio_stream_loop_secs(ALLEGRO_AUDIO_STREAM *stream,
    <span class="dt">double</span> start, <span class="dt">double</span> end)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/kcm_stream.c#L860">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/kcm_stream.c#L872">Source Code</a></p>
 <p>Sets the loop points for the stream in seconds. Currently this can only be called on streams created with <a href="audio.html#al_load_audio_stream">al_load_audio_stream</a>, <a href="audio.html#al_load_audio_stream_f">al_load_audio_stream_f</a> and the format-specific functions underlying those functions.</p>
 <h1 id="audio-file-io"><a href="#audio-file-io">Audio file I/O</a></h1>
 <h2 id="al_register_sample_loader"><a href="#al_register_sample_loader">al_register_sample_loader</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_sample_loader(<span class="dt">const</span> <span class="dt">char</span> *ext,
    ALLEGRO_SAMPLE *(*loader)(<span class="dt">const</span> <span class="dt">char</span> *filename))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L88">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L88">Source Code</a></p>
 <p>Register a handler for <a href="audio.html#al_load_sample">al_load_sample</a>. The given function will be used to handle the loading of sample files with the given extension.</p>
 <p>The extension should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>loader</code> argument may be NULL to unregister an entry.</p>
@@ -1067,7 +1067,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <h2 id="al_register_sample_loader_f"><a href="#al_register_sample_loader_f">al_register_sample_loader_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_sample_loader_f(<span class="dt">const</span> <span class="dt">char</span> *ext,
    ALLEGRO_SAMPLE *(*loader)(ALLEGRO_FILE* fp))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L115">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L115">Source Code</a></p>
 <p>Register a handler for <a href="audio.html#al_load_sample_f">al_load_sample_f</a>. The given function will be used to handle the loading of sample files with the given extension.</p>
 <p>The extension should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>loader</code> argument may be NULL to unregister an entry.</p>
@@ -1076,7 +1076,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <h2 id="al_register_sample_saver"><a href="#al_register_sample_saver">al_register_sample_saver</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_sample_saver(<span class="dt">const</span> <span class="dt">char</span> *ext,
    bool (*saver)(<span class="dt">const</span> <span class="dt">char</span> *filename, ALLEGRO_SAMPLE *spl))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L142">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L142">Source Code</a></p>
 <p>Register a handler for <a href="audio.html#al_save_sample">al_save_sample</a>. The given function will be used to handle the saving of sample files with the given extension.</p>
 <p>The extension should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>saver</code> argument may be NULL to unregister an entry.</p>
@@ -1085,7 +1085,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <h2 id="al_register_sample_saver_f"><a href="#al_register_sample_saver_f">al_register_sample_saver_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_sample_saver_f(<span class="dt">const</span> <span class="dt">char</span> *ext,
    bool (*saver)(ALLEGRO_FILE* fp, ALLEGRO_SAMPLE *spl))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L169">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L169">Source Code</a></p>
 <p>Register a handler for <a href="audio.html#al_save_sample_f">al_save_sample_f</a>. The given function will be used to handle the saving of sample files with the given extension.</p>
 <p>The extension should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>saver</code> argument may be NULL to unregister an entry.</p>
@@ -1095,7 +1095,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_audio_stream_loader(<span class="dt">const</span> <span class="dt">char</span> *ext,
    ALLEGRO_AUDIO_STREAM *(*stream_loader)(<span class="dt">const</span> <span class="dt">char</span> *filename,
       size_t buffer_count, <span class="dt">unsigned</span> <span class="dt">int</span> samples))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L196">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L196">Source Code</a></p>
 <p>Register a handler for <a href="audio.html#al_load_audio_stream">al_load_audio_stream</a>. The given function will be used to open streams from files with the given extension.</p>
 <p>The extension should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>stream_loader</code> argument may be NULL to unregister an entry.</p>
@@ -1105,7 +1105,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_audio_stream_loader_f(<span class="dt">const</span> <span class="dt">char</span> *ext,
    ALLEGRO_AUDIO_STREAM *(*stream_loader)(ALLEGRO_FILE* fp,
       size_t buffer_count, <span class="dt">unsigned</span> <span class="dt">int</span> samples))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L224">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L224">Source Code</a></p>
 <p>Register a handler for <a href="audio.html#al_load_audio_stream_f">al_load_audio_stream_f</a>. The given function will be used to open streams from files with the given extension.</p>
 <p>The extension should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>stream_loader</code> argument may be NULL to unregister an entry.</p>
@@ -1113,7 +1113,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <p>See also: <a href="audio.html#al_register_audio_stream_loader">al_register_audio_stream_loader</a></p>
 <h2 id="al_load_sample"><a href="#al_load_sample">al_load_sample</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_SAMPLE *al_load_sample(<span class="dt">const</span> <span class="dt">char</span> *filename)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L252">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L252">Source Code</a></p>
 <p>Loads a few different audio file formats based on their extension.</p>
 <p>Note that this stores the entire file in memory at once, which may be time consuming. To read the file as it is needed, use <a href="audio.html#al_load_audio_stream">al_load_audio_stream</a>.</p>
 <p>Returns the sample on success, NULL on failure.</p>
@@ -1123,7 +1123,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <p>See also: <a href="audio.html#al_register_sample_loader">al_register_sample_loader</a>, <a href="acodec.html#al_init_acodec_addon">al_init_acodec_addon</a></p>
 <h2 id="al_load_sample_f"><a href="#al_load_sample_f">al_load_sample_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_SAMPLE *al_load_sample_f(ALLEGRO_FILE* fp, <span class="dt">const</span> <span class="dt">char</span> *ident)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L273">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L273">Source Code</a></p>
 <p>Loads an audio file from an <a href="file.html#allegro_file">ALLEGRO_FILE</a> stream into an <a href="audio.html#allegro_sample">ALLEGRO_SAMPLE</a>. The file type is determined by the passed 'ident' parameter, which is a file name extension including the leading dot.</p>
 <p>Note that this stores the entire file in memory at once, which may be time consuming. To read the file as it is needed, use <a href="audio.html#al_load_audio_stream_f">al_load_audio_stream_f</a>.</p>
 <p>Returns the sample on success, NULL on failure. The file remains open afterwards.</p>
@@ -1134,7 +1134,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <h2 id="al_load_audio_stream"><a href="#al_load_audio_stream">al_load_audio_stream</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_AUDIO_STREAM *al_load_audio_stream(<span class="dt">const</span> <span class="dt">char</span> *filename,
    size_t buffer_count, <span class="dt">unsigned</span> <span class="dt">int</span> samples)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L291">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L291">Source Code</a></p>
 <p>Loads an audio file from disk as it is needed.</p>
 <p>Unlike regular streams, the one returned by this function need not be fed by the user; the library will automatically read more of the file as it is needed. The stream will contain <em>buffer_count</em> buffers with <em>samples</em> samples.</p>
 <p>The audio stream will start in the playing state. It should be attached to a voice or mixer to generate any output. See <a href="audio.html#allegro_audio_stream">ALLEGRO_AUDIO_STREAM</a> for more details.</p>
@@ -1146,7 +1146,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <h2 id="al_load_audio_stream_f"><a href="#al_load_audio_stream_f">al_load_audio_stream_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_AUDIO_STREAM *al_load_audio_stream_f(ALLEGRO_FILE* fp, <span class="dt">const</span> <span class="dt">char</span> *ident,
    size_t buffer_count, <span class="dt">unsigned</span> <span class="dt">int</span> samples)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L315">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L315">Source Code</a></p>
 <p>Loads an audio file from <a href="file.html#allegro_file">ALLEGRO_FILE</a> stream as it is needed.</p>
 <p>Unlike regular streams, the one returned by this function need not be fed by the user; the library will automatically read more of the file as it is needed. The stream will contain <em>buffer_count</em> buffers with <em>samples</em> samples.</p>
 <p>The file type is determined by the passed 'ident' parameter, which is a file name extension including the leading dot.</p>
@@ -1158,7 +1158,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <p>See also: <a href="audio.html#al_load_audio_stream">al_load_audio_stream</a>, <a href="audio.html#al_register_audio_stream_loader_f">al_register_audio_stream_loader_f</a>, <a href="acodec.html#al_init_acodec_addon">al_init_acodec_addon</a></p>
 <h2 id="al_save_sample"><a href="#al_save_sample">al_save_sample</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_save_sample(<span class="dt">const</span> <span class="dt">char</span> *filename, ALLEGRO_SAMPLE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L334">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L334">Source Code</a></p>
 <p>Writes a sample into a file. Currently, wav is the only supported format, and the extension must be ".wav".</p>
 <p>Returns true on success, false on error.</p>
 <blockquote>
@@ -1167,7 +1167,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <p>See also: <a href="audio.html#al_save_sample_f">al_save_sample_f</a>, <a href="audio.html#al_register_sample_saver">al_register_sample_saver</a>, <a href="acodec.html#al_init_acodec_addon">al_init_acodec_addon</a></p>
 <h2 id="al_save_sample_f"><a href="#al_save_sample_f">al_save_sample_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_save_sample_f(ALLEGRO_FILE *fp, <span class="dt">const</span> <span class="dt">char</span> *ident, ALLEGRO_SAMPLE *spl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/audio_io.c#L355">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/audio_io.c#L355">Source Code</a></p>
 <p>Writes a sample into a <a href="file.html#allegro_file">ALLEGRO_FILE</a> filestream. Currently, wav is the only supported format, and the extension must be ".wav".</p>
 <p>Returns true on success, false on error. The file remains open afterwards.</p>
 <blockquote>
@@ -1179,7 +1179,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <p>Recording is supported by the ALSA, AudioQueue, DirectSound8, and PulseAudio drivers. Enumerating or choosing other recording devices is not yet supported.</p>
 <h2 id="allegro_audio_recorder"><a href="#allegro_audio_recorder">ALLEGRO_AUDIO_RECORDER</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_AUDIO_RECORDER ALLEGRO_AUDIO_RECORDER;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L180">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L180">Source Code</a></p>
 <p>An opaque datatype that represents a recording device.</p>
 <p>Since: 5.1.1</p>
 <blockquote>
@@ -1187,7 +1187,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 </blockquote>
 <h2 id="allegro_audio_recorder_event"><a href="#allegro_audio_recorder_event">ALLEGRO_AUDIO_RECORDER_EVENT</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_AUDIO_RECORDER_EVENT ALLEGRO_AUDIO_RECORDER_EVENT;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/allegro5/allegro_audio.h#L58">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/allegro_audio.h#L58">Source Code</a></p>
 <p>Structure that holds the audio recorder event data. Every event type will contain:</p>
 <ul>
 <li>.source: pointer to the audio recorder</li>
@@ -1213,7 +1213,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_AUDIO_RECORDER *al_create_audio_recorder(size_t fragment_count,
    <span class="dt">unsigned</span> <span class="dt">int</span> samples, <span class="dt">unsigned</span> <span class="dt">int</span> frequency,
    ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/recorder.c#L18">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/recorder.c#L18">Source Code</a></p>
 <p>Creates an audio recorder using the system's default recording device. (So if the returned device does not work, try updating the system's default recording device.)</p>
 <p>Allegro will internally buffer several seconds of captured audio with minimal latency. (XXX: These settings need to be exposed via config or API calls.) Audio will be copied out of that private buffer into a fragment buffer of the size specified by the samples parameter. Whenever a new fragment is ready an event will be generated.</p>
 <p>The total size of the fragment buffer is fragment_count * samples * bytes_per_sample. It is treated as a circular, never ending buffer. If you do not process the information fast enough, it will be overrun. Because of that, even if you only ever need to process one small fragment at a time, you should still use a large enough value for fragment_count to hold a few seconds of audio.</p>
@@ -1233,7 +1233,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 </blockquote>
 <h2 id="al_start_audio_recorder"><a href="#al_start_audio_recorder">al_start_audio_recorder</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_start_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/recorder.c#L89">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/recorder.c#L89">Source Code</a></p>
 <p>Begin recording into the fragment buffer. Once a complete fragment has been captured (as specified in <a href="audio.html#al_create_audio_recorder">al_create_audio_recorder</a>), an <a href="audio.html#allegro_event_audio_recorder_fragment">ALLEGRO_EVENT_AUDIO_RECORDER_FRAGMENT</a> event will be triggered.</p>
 <p>Returns true if it was able to begin recording.</p>
 <p>Since: 5.1.1</p>
@@ -1242,7 +1242,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 </blockquote>
 <h2 id="al_stop_audio_recorder"><a href="#al_stop_audio_recorder">al_stop_audio_recorder</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_stop_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/recorder.c#L103">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/recorder.c#L103">Source Code</a></p>
 <p>Stop capturing audio data. Note that the audio recorder is still active and consuming resources, so if you are finished recording you should destroy it with <a href="audio.html#al_destroy_audio_recorder">al_destroy_audio_recorder</a>.</p>
 <p>You may still receive a few events after you call this function as the device flushes the buffer.</p>
 <p>If you restart the recorder, it will begin recording at the beginning of the next fragment buffer.</p>
@@ -1252,7 +1252,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 </blockquote>
 <h2 id="al_is_audio_recorder_recording"><a href="#al_is_audio_recorder_recording">al_is_audio_recorder_recording</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_audio_recorder_recording(ALLEGRO_AUDIO_RECORDER *r)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/recorder.c#L115">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/recorder.c#L115">Source Code</a></p>
 <p>Returns true if the audio recorder is currently capturing data and generating events.</p>
 <p>Since: 5.1.1</p>
 <blockquote>
@@ -1260,7 +1260,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 </blockquote>
 <h2 id="al_get_audio_recorder_event"><a href="#al_get_audio_recorder_event">al_get_audio_recorder_event</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_AUDIO_RECORDER_EVENT *al_get_audio_recorder_event(ALLEGRO_EVENT *event)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/recorder.c#L128">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/recorder.c#L128">Source Code</a></p>
 <p>Returns the event as an <a href="audio.html#allegro_audio_recorder_event">ALLEGRO_AUDIO_RECORDER_EVENT</a>.</p>
 <p>Since: 5.1.1</p>
 <blockquote>
@@ -1268,7 +1268,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 </blockquote>
 <h2 id="al_get_audio_recorder_event_source"><a href="#al_get_audio_recorder_event_source">al_get_audio_recorder_event_source</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_audio_recorder_event_source(ALLEGRO_AUDIO_RECORDER *r)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/recorder.c#L136">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/recorder.c#L136">Source Code</a></p>
 <p>Returns the event source for the recorder that generates the various recording events.</p>
 <p>Since: 5.1.1</p>
 <blockquote>
@@ -1276,7 +1276,7 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 </blockquote>
 <h2 id="al_destroy_audio_recorder"><a href="#al_destroy_audio_recorder">al_destroy_audio_recorder</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_audio_recorder(ALLEGRO_AUDIO_RECORDER *r)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/audio/recorder.c#L143">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/audio/recorder.c#L143">Source Code</a></p>
 <p>Destroys the audio recorder and frees all resources associated with it. It is safe to destroy a recorder that is recording.</p>
 <p>You may receive events after the recorder has been destroyed. They must be ignored, as the fragment buffer will no longer be valid.</p>
 <p>Since: 5.1.1</p>
@@ -1284,8 +1284,8 @@ samples = bytes_per_fragment / sample_size;</code></pre>
 <p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> The API may need a slight redesign.</p>
 </blockquote>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:43 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:01 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/color.html b/docs/html/refman/color.html
index 56715f4..96336c1 100644
--- a/docs/html/refman/color.html
+++ b/docs/html/refman/color.html
@@ -142,54 +142,66 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_color.h></span></code></pre>
 <h1 id="al_color_cmyk"><a href="#al_color_cmyk">al_color_cmyk</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_color_cmyk(<span class="dt">float</span> c, <span class="dt">float</span> m, <span class="dt">float</span> y, <span class="dt">float</span> k)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L472">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L472">Source Code</a></p>
 <p>Return an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a> structure from CMYK values (cyan, magenta, yellow, black).</p>
 <p>See also: <a href="color.html#al_color_cmyk_to_rgb">al_color_cmyk_to_rgb</a>, <a href="color.html#al_color_rgb_to_cmyk">al_color_rgb_to_cmyk</a></p>
 <h1 id="al_color_cmyk_to_rgb"><a href="#al_color_cmyk_to_rgb">al_color_cmyk_to_rgb</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_color_cmyk_to_rgb(<span class="dt">float</span> cyan, <span class="dt">float</span> magenta, <span class="dt">float</span> yellow,
     <span class="dt">float</span> key, <span class="dt">float</span> *red, <span class="dt">float</span> *green, <span class="dt">float</span> *blue)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L438">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L438">Source Code</a></p>
 <p>Convert CMYK values to RGB values.</p>
 <p>See also: <a href="color.html#al_color_cmyk">al_color_cmyk</a>, <a href="color.html#al_color_rgb_to_cmyk">al_color_rgb_to_cmyk</a></p>
 <h1 id="al_color_hsl"><a href="#al_color_hsl">al_color_hsl</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_color_hsl(<span class="dt">float</span> h, <span class="dt">float</span> s, <span class="dt">float</span> l)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L428">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L428">Source Code</a></p>
 <p>Return an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a> structure from HSL (hue, saturation, lightness) values.</p>
+<p>Parameters:</p>
+<ul>
+<li>hue - Color hue angle in the range 0..360</li>
+<li>saturation - Color saturation in the range 0..1</li>
+<li>lightness - Color lightness in the range 0..1</li>
+</ul>
 <p>See also: <a href="color.html#al_color_hsl_to_rgb">al_color_hsl_to_rgb</a>, <a href="color.html#al_color_hsv">al_color_hsv</a></p>
 <h1 id="al_color_hsl_to_rgb"><a href="#al_color_hsl_to_rgb">al_color_hsl_to_rgb</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_color_hsl_to_rgb(<span class="dt">float</span> hue, <span class="dt">float</span> saturation, <span class="dt">float</span> lightness,
    <span class="dt">float</span> *red, <span class="dt">float</span> *green, <span class="dt">float</span> *blue)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L359">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L359">Source Code</a></p>
 <p>Convert values in HSL color model to RGB color model.</p>
 <p>Parameters:</p>
 <ul>
-<li>hue - Color hue angle in the range 0..360.</li>
-<li>saturation - Color saturation in the range 0..1.</li>
-<li>lightness - Color lightness in the range 0..1.</li>
-<li>red, green, blue - returned RGB values in the range 0..1.</li>
+<li>hue - Color hue angle in the range 0..360</li>
+<li>saturation - Color saturation in the range 0..1</li>
+<li>lightness - Color lightness in the range 0..1</li>
+<li>red, green, blue - returned RGB values in the range 0..1</li>
 </ul>
 <p>See also: <a href="color.html#al_color_rgb_to_hsl">al_color_rgb_to_hsl</a>, <a href="color.html#al_color_hsl">al_color_hsl</a>, <a href="color.html#al_color_hsv_to_rgb">al_color_hsv_to_rgb</a></p>
 <h1 id="al_color_hsv"><a href="#al_color_hsv">al_color_hsv</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_color_hsv(<span class="dt">float</span> h, <span class="dt">float</span> s, <span class="dt">float</span> v)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L331">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L331">Source Code</a></p>
 <p>Return an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a> structure from HSV (hue, saturation, value) values.</p>
+<p>Parameters:</p>
+<ul>
+<li>hue - Color hue angle in the range 0..360</li>
+<li>saturation - Color saturation in the range 0..1</li>
+<li>value - Color value in the range 0..1</li>
+</ul>
 <p>See also: <a href="color.html#al_color_hsv_to_rgb">al_color_hsv_to_rgb</a>, <a href="color.html#al_color_hsl">al_color_hsl</a></p>
 <h1 id="al_color_hsv_to_rgb"><a href="#al_color_hsv_to_rgb">al_color_hsv_to_rgb</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_color_hsv_to_rgb(<span class="dt">float</span> hue, <span class="dt">float</span> saturation, <span class="dt">float</span> value,
    <span class="dt">float</span> *red, <span class="dt">float</span> *green, <span class="dt">float</span> *blue)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L258">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L258">Source Code</a></p>
 <p>Convert values in HSV color model to RGB color model.</p>
 <p>Parameters:</p>
 <ul>
-<li>hue - Color hue angle in the range 0..360.</li>
-<li>saturation - Color saturation in the range 0..1.</li>
-<li>value - Color value in the range 0..1.</li>
-<li>red, green, blue - returned RGB values in the range 0..1.</li>
+<li>hue - Color hue angle in the range 0..360</li>
+<li>saturation - Color saturation in the range 0..1</li>
+<li>value - Color value in the range 0..1</li>
+<li>red, green, blue - returned RGB values in the range 0..1</li>
 </ul>
 <p>See also: <a href="color.html#al_color_rgb_to_hsv">al_color_rgb_to_hsv</a>, <a href="color.html#al_color_hsv">al_color_hsv</a>, <a href="color.html#al_color_hsl_to_rgb">al_color_hsl_to_rgb</a></p>
 <h1 id="al_color_html"><a href="#al_color_html">al_color_html</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_color_html(<span class="dt">char</span> <span class="dt">const</span> *string)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L560">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L560">Source Code</a></p>
 <p>Interprets an HTML-style hex number (e.g. #00faff) as a color. The accepted format is the same as <a href="color.html#al_color_html_to_rgb">al_color_html_to_rgb</a>.</p>
 <p>Returns the interpreted color, or <code>al_map_rgba(0, 0, 0, 0)</code> if the string could not be parsed.</p>
 <blockquote>
@@ -199,7 +211,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_color_html_to_rgb"><a href="#al_color_html_to_rgb">al_color_html_to_rgb</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_color_html_to_rgb(<span class="dt">char</span> <span class="dt">const</span> *string,
    <span class="dt">float</span> *red, <span class="dt">float</span> *green, <span class="dt">float</span> *blue)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L530">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L530">Source Code</a></p>
 <p>Interprets an HTML-style hex number (e.g. #00faff) as a color. The only accepted formats are "#RRGGBB" and "RRGGBB" where R, G, B are hexadecimal digits [0-9A-Fa-f].</p>
 <p>Returns true on success, false on failure. On failure all components are set to zero.</p>
 <blockquote>
@@ -209,7 +221,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_color_rgb_to_html"><a href="#al_color_rgb_to_html">al_color_rgb_to_html</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_color_rgb_to_html(<span class="dt">float</span> red, <span class="dt">float</span> green, <span class="dt">float</span> blue,
     <span class="dt">char</span> *string)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L520">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L520">Source Code</a></p>
 <p>Create an HTML-style string representation of an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>, e.g. #00faff.</p>
 <p>Parameters:</p>
 <ul>
@@ -223,12 +235,12 @@ al_color_rgb_to_html(<span class="dv">1</span>, <span class="dv">0</span>, <span
 <p>See also: <a href="color.html#al_color_html">al_color_html</a>, <a href="color.html#al_color_html_to_rgb">al_color_html_to_rgb</a></p>
 <h1 id="al_color_name"><a href="#al_color_name">al_color_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_color_name(<span class="dt">char</span> <span class="dt">const</span> *name)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L246">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L246">Source Code</a></p>
 <p>Return an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a> with the given name. If the color is not found then black is returned.</p>
 <p>See <a href="color.html#al_color_name_to_rgb">al_color_name_to_rgb</a> for the list of names.</p>
 <h1 id="al_color_name_to_rgb"><a href="#al_color_name_to_rgb">al_color_name_to_rgb</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_color_name_to_rgb(<span class="dt">char</span> <span class="dt">const</span> *name, <span class="dt">float</span> *r, <span class="dt">float</span> *g, <span class="dt">float</span> *b)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L202">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L202">Source Code</a></p>
 <p>Parameters:</p>
 <ul>
 <li>name - The (lowercase) name of the color.</li>
@@ -244,7 +256,7 @@ al_color_rgb_to_html(<span class="dv">1</span>, <span class="dv">0</span>, <span
 <h1 id="al_color_rgb_to_cmyk"><a href="#al_color_rgb_to_cmyk">al_color_rgb_to_cmyk</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_color_rgb_to_cmyk(<span class="dt">float</span> red, <span class="dt">float</span> green, <span class="dt">float</span> blue,
    <span class="dt">float</span> *cyan, <span class="dt">float</span> *magenta, <span class="dt">float</span> *yellow, <span class="dt">float</span> *key)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L450">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L450">Source Code</a></p>
 <p>Each RGB color can be represented in CMYK with a K component of 0 with the following formula:</p>
 <pre><code>C = 1 - R
 M = 1 - G
@@ -255,44 +267,44 @@ K = 0</code></pre>
 <h1 id="al_color_rgb_to_hsl"><a href="#al_color_rgb_to_hsl">al_color_rgb_to_hsl</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_color_rgb_to_hsl(<span class="dt">float</span> red, <span class="dt">float</span> green, <span class="dt">float</span> blue,
    <span class="dt">float</span> *hue, <span class="dt">float</span> *saturation, <span class="dt">float</span> *lightness)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L381">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L381">Source Code</a></p>
 <p>Given an RGB triplet with components in the range 0..1, return the hue in degrees from 0..360 and saturation and lightness in the range 0..1.</p>
 <p>See also: <a href="color.html#al_color_hsl_to_rgb">al_color_hsl_to_rgb</a>, <a href="color.html#al_color_hsl">al_color_hsl</a></p>
 <h1 id="al_color_rgb_to_hsv"><a href="#al_color_rgb_to_hsv">al_color_rgb_to_hsv</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_color_rgb_to_hsv(<span class="dt">float</span> red, <span class="dt">float</span> green, <span class="dt">float</span> blue,
    <span class="dt">float</span> *hue, <span class="dt">float</span> *saturation, <span class="dt">float</span> *value)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L286">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L286">Source Code</a></p>
 <p>Given an RGB triplet with components in the range 0..1, return the hue in degrees from 0..360 and saturation and value in the range 0..1.</p>
 <p>See also: <a href="color.html#al_color_hsv_to_rgb">al_color_hsv_to_rgb</a>, <a href="color.html#al_color_hsv">al_color_hsv</a></p>
 <h1 id="al_color_rgb_to_name"><a href="#al_color_rgb_to_name">al_color_rgb_to_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> <span class="dt">const</span> *al_color_rgb_to_name(<span class="dt">float</span> r, <span class="dt">float</span> g, <span class="dt">float</span> b)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L221">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L221">Source Code</a></p>
 <p>Given an RGB triplet with components in the range 0..1, find a color name describing it approximately.</p>
 <p>See also: <a href="color.html#al_color_name_to_rgb">al_color_name_to_rgb</a>, <a href="color.html#al_color_name">al_color_name</a></p>
 <h1 id="al_color_rgb_to_yuv"><a href="#al_color_rgb_to_yuv">al_color_rgb_to_yuv</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_color_rgb_to_yuv(<span class="dt">float</span> red, <span class="dt">float</span> green, <span class="dt">float</span> blue,
    <span class="dt">float</span> *y, <span class="dt">float</span> *u, <span class="dt">float</span> *v)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L496">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L496">Source Code</a></p>
 <p>Convert RGB values to YUV color space.</p>
 <p>See also: <a href="color.html#al_color_yuv">al_color_yuv</a>, <a href="color.html#al_color_yuv_to_rgb">al_color_yuv_to_rgb</a></p>
 <h1 id="al_color_yuv"><a href="#al_color_yuv">al_color_yuv</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_color_yuv(<span class="dt">float</span> y, <span class="dt">float</span> u, <span class="dt">float</span> v)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L510">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L510">Source Code</a></p>
 <p>Return an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a> structure from YUV values.</p>
 <p>See also: <a href="color.html#al_color_yuv_to_rgb">al_color_yuv_to_rgb</a>, <a href="color.html#al_color_rgb_to_yuv">al_color_rgb_to_yuv</a></p>
 <h1 id="al_color_yuv_to_rgb"><a href="#al_color_yuv_to_rgb">al_color_yuv_to_rgb</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_color_yuv_to_rgb(<span class="dt">float</span> y, <span class="dt">float</span> u, <span class="dt">float</span> v,
     <span class="dt">float</span> *red, <span class="dt">float</span> *green, <span class="dt">float</span> *blue)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L482">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L482">Source Code</a></p>
 <p>Convert YUV color values to RGB color space.</p>
 <p>See also: <a href="color.html#al_color_yuv">al_color_yuv</a>, <a href="color.html#al_color_rgb_to_yuv">al_color_rgb_to_yuv</a></p>
 <h1 id="al_get_allegro_color_version"><a href="#al_get_allegro_color_version">al_get_allegro_color_version</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_color_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/color/color.c#L573">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/color/color.c#L573">Source Code</a></p>
 <p>Returns the (compiled) version of the addon, in the same format as <a href="system.html#al_get_allegro_version">al_get_allegro_version</a>.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:44 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:01 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/config.html b/docs/html/refman/config.html
index 5d964ac..6ad8e54 100644
--- a/docs/html/refman/config.html
+++ b/docs/html/refman/config.html
@@ -164,124 +164,124 @@ printf(<span class="st">"%s</span><span class="ch">\n</span><span class="st
 al_destroy_config(cfg);</code></pre>
 <h1 id="allegro_config"><a href="#allegro_config">ALLEGRO_CONFIG</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_CONFIG ALLEGRO_CONFIG;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/config.h#L12">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/config.h#L12">Source Code</a></p>
 <p>An abstract configuration structure.</p>
 <h1 id="allegro_config_section"><a href="#allegro_config_section">ALLEGRO_CONFIG_SECTION</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_CONFIG_SECTION ALLEGRO_CONFIG_SECTION;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/config.h#L16">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/config.h#L16">Source Code</a></p>
 <p>An opaque structure used for iterating across sections in a configuration structure.</p>
 <p>See also: <a href="config.html#al_get_first_config_section">al_get_first_config_section</a>, <a href="config.html#al_get_next_config_section">al_get_next_config_section</a></p>
 <h1 id="allegro_config_entry"><a href="#allegro_config_entry">ALLEGRO_CONFIG_ENTRY</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_CONFIG_ENTRY ALLEGRO_CONFIG_ENTRY;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/config.h#L20">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/config.h#L20">Source Code</a></p>
 <p>An opaque structure used for iterating across entries in a configuration section.</p>
 <p>See also: <a href="config.html#al_get_first_config_entry">al_get_first_config_entry</a>, <a href="config.html#al_get_next_config_entry">al_get_next_config_entry</a></p>
 <h1 id="al_create_config"><a href="#al_create_config">al_create_config</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_CONFIG *al_create_config(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L37">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L37">Source Code</a></p>
 <p>Create an empty configuration structure.</p>
 <p>See also: <a href="config.html#al_load_config_file">al_load_config_file</a>, <a href="config.html#al_destroy_config">al_destroy_config</a></p>
 <h1 id="al_destroy_config"><a href="#al_destroy_config">al_destroy_config</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_config(ALLEGRO_CONFIG *config)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L566">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L566">Source Code</a></p>
 <p>Free the resources used by a configuration structure. Does nothing if passed NULL.</p>
 <p>See also: <a href="config.html#al_create_config">al_create_config</a>, <a href="config.html#al_load_config_file">al_load_config_file</a></p>
 <h1 id="al_load_config_file"><a href="#al_load_config_file">al_load_config_file</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_CONFIG *al_load_config_file(<span class="dt">const</span> <span class="dt">char</span> *filename)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L311">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L311">Source Code</a></p>
 <p>Read a configuration file from disk. Returns NULL on error. The configuration structure should be destroyed with <a href="config.html#al_destroy_config">al_destroy_config</a>.</p>
 <p>See also: <a href="config.html#al_load_config_file_f">al_load_config_file_f</a>, <a href="config.html#al_save_config_file">al_save_config_file</a></p>
 <h1 id="al_load_config_file_f"><a href="#al_load_config_file_f">al_load_config_file_f</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_CONFIG *al_load_config_file_f(ALLEGRO_FILE *file)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L328">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L328">Source Code</a></p>
 <p>Read a configuration file from an already open file.</p>
 <p>Returns NULL on error. The configuration structure should be destroyed with <a href="config.html#al_destroy_config">al_destroy_config</a>. The file remains open afterwards.</p>
 <p>See also: <a href="config.html#al_load_config_file">al_load_config_file</a></p>
 <h1 id="al_save_config_file"><a href="#al_save_config_file">al_save_config_file</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_save_config_file(<span class="dt">const</span> <span class="dt">char</span> *filename, <span class="dt">const</span> ALLEGRO_CONFIG *config)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L435">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L435">Source Code</a></p>
 <p>Write out a configuration file to disk. Returns true on success, false on error.</p>
 <p>See also: <a href="config.html#al_save_config_file_f">al_save_config_file_f</a>, <a href="config.html#al_load_config_file">al_load_config_file</a></p>
 <h1 id="al_save_config_file_f"><a href="#al_save_config_file_f">al_save_config_file_f</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_save_config_file_f(ALLEGRO_FILE *file, <span class="dt">const</span> ALLEGRO_CONFIG *config)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L452">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L452">Source Code</a></p>
 <p>Write out a configuration file to an already open file.</p>
 <p>Returns true on success, false on error. The file remains open afterwards.</p>
 <p>See also: <a href="config.html#al_save_config_file">al_save_config_file</a></p>
 <h1 id="al_add_config_section"><a href="#al_add_config_section">al_add_config_section</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_add_config_section(ALLEGRO_CONFIG *config, <span class="dt">const</span> <span class="dt">char</span> *name)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L110">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L110">Source Code</a></p>
 <p>Add a section to a configuration structure with the given name. If the section already exists then nothing happens.</p>
 <h1 id="al_remove_config_section"><a href="#al_remove_config_section">al_remove_config_section</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_remove_config_section(ALLEGRO_CONFIG *config, <span class="dt">char</span> <span class="dt">const</span> *section)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L665">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L665">Source Code</a></p>
 <p>Remove a section of a configuration.</p>
 <p>Returns true if the section was removed, or false if the section did not exist.</p>
 <p>Since: 5.1.5</p>
 <h1 id="al_add_config_comment"><a href="#al_add_config_comment">al_add_config_comment</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_add_config_comment(ALLEGRO_CONFIG *config,
    <span class="dt">const</span> <span class="dt">char</span> *section, <span class="dt">const</span> <span class="dt">char</span> *comment)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L225">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L225">Source Code</a></p>
 <p>Add a comment in a section of a configuration. If the section doesn't yet exist, it will be created. The section can be NULL or "" for the global section.</p>
 <p>The comment may or may not begin with a hash character. Any newlines in the comment string will be replaced by space characters.</p>
 <p>See also: <a href="config.html#al_add_config_section">al_add_config_section</a></p>
 <h1 id="al_get_config_value"><a href="#al_get_config_value">al_get_config_value</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_config_value(<span class="dt">const</span> ALLEGRO_CONFIG *config,
    <span class="dt">const</span> <span class="dt">char</span> *section, <span class="dt">const</span> <span class="dt">char</span> *key)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L268">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L268">Source Code</a></p>
 <p>Gets a pointer to an internal character buffer that will only remain valid as long as the ALLEGRO_CONFIG structure is not destroyed. Copy the value if you need a copy. The section can be NULL or "" for the global section. Returns NULL if the section or key do not exist.</p>
 <p>See also: <a href="config.html#al_set_config_value">al_set_config_value</a></p>
 <h1 id="al_set_config_value"><a href="#al_set_config_value">al_set_config_value</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_config_value(ALLEGRO_CONFIG *config,
    <span class="dt">const</span> <span class="dt">char</span> *section, <span class="dt">const</span> <span class="dt">char</span> *key, <span class="dt">const</span> <span class="dt">char</span> *value)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L164">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L164">Source Code</a></p>
 <p>Set a value in a section of a configuration. If the section doesn't yet exist, it will be created. If a value already existed for the given key, it will be overwritten. The section can be NULL or "" for the global section.</p>
 <p>For consistency with the on-disk format of config files, any leading and trailing whitespace will be stripped from the value. If you have significant whitespace you wish to preserve, you should add your own quote characters and remove them when reading the values back in.</p>
 <p>See also: <a href="config.html#al_get_config_value">al_get_config_value</a></p>
 <h1 id="al_remove_config_key"><a href="#al_remove_config_key">al_remove_config_key</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_remove_config_key(ALLEGRO_CONFIG *config, <span class="dt">char</span> <span class="dt">const</span> *section,
    <span class="dt">char</span> <span class="dt">const</span> *key)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L702">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L702">Source Code</a></p>
 <p>Remove a key and its associated value in a section of a configuration.</p>
 <p>Returns true if the entry was removed, or false if the entry did not exist.</p>
 <p>Since: 5.1.5</p>
 <h1 id="al_get_first_config_section"><a href="#al_get_first_config_section">al_get_first_config_section</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> <span class="dt">const</span> *al_get_first_config_section(ALLEGRO_CONFIG <span class="dt">const</span> *config,
    ALLEGRO_CONFIG_SECTION **iterator)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L588">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L588">Source Code</a></p>
 <p>Returns the name of the first section in the given config file. Usually this will return an empty string for the global section, even it contains no values. The <code>iterator</code> parameter will receive an opaque iterator which is used by <a href="config.html#al_get_next_config_section">al_get_next_config_section</a> to iterate over the remaining sections.</p>
 <p>The returned string and the iterator are only valid as long as no change is made to the passed ALLEGRO_CONFIG.</p>
 <p>See also: <a href="config.html#al_get_next_config_section">al_get_next_config_section</a></p>
 <h1 id="al_get_next_config_section"><a href="#al_get_next_config_section">al_get_next_config_section</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> <span class="dt">const</span> *al_get_next_config_section(ALLEGRO_CONFIG_SECTION **iterator)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L603">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L603">Source Code</a></p>
 <p>Returns the name of the next section in the given config file or NULL if there are no more sections. The <code>iterator</code> must have been obtained with <a href="config.html#al_get_first_config_section">al_get_first_config_section</a> first.</p>
 <p>See also: <a href="config.html#al_get_first_config_section">al_get_first_config_section</a></p>
 <h1 id="al_get_first_config_entry"><a href="#al_get_first_config_entry">al_get_first_config_entry</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> <span class="dt">const</span> *al_get_first_config_entry(ALLEGRO_CONFIG <span class="dt">const</span> *config,
    <span class="dt">char</span> <span class="dt">const</span> *section, ALLEGRO_CONFIG_ENTRY **iterator)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L619">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L619">Source Code</a></p>
 <p>Returns the name of the first key in the given section in the given config or NULL if the section is empty. The <code>iterator</code> works like the one for <a href="config.html#al_get_first_config_section">al_get_first_config_section</a>.</p>
 <p>The returned string and the iterator are only valid as long as no change is made to the passed <a href="config.html#allegro_config">ALLEGRO_CONFIG</a>.</p>
 <p>See also: <a href="config.html#al_get_next_config_entry">al_get_next_config_entry</a></p>
 <h1 id="al_get_next_config_entry"><a href="#al_get_next_config_entry">al_get_next_config_entry</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> <span class="dt">const</span> *al_get_next_config_entry(ALLEGRO_CONFIG_ENTRY **iterator)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L647">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L647">Source Code</a></p>
 <p>Returns the next key for the iterator obtained by <a href="config.html#al_get_first_config_entry">al_get_first_config_entry</a>. The <code>iterator</code> works like the one for <a href="config.html#al_get_next_config_section">al_get_next_config_section</a>.</p>
 <h1 id="al_merge_config"><a href="#al_merge_config">al_merge_config</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_CONFIG *al_merge_config(<span class="dt">const</span> ALLEGRO_CONFIG *cfg1,
     <span class="dt">const</span> ALLEGRO_CONFIG *cfg2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L530">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L530">Source Code</a></p>
 <p>Merge two configuration structures, and return the result as a new configuration. Values in configuration 'cfg2' override those in 'cfg1'. Neither of the input configuration structures are modified. Comments from 'cfg2' are not retained.</p>
 <p>See also: <a href="config.html#al_merge_config_into">al_merge_config_into</a></p>
 <h1 id="al_merge_config_into"><a href="#al_merge_config_into">al_merge_config_into</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_merge_config_into(ALLEGRO_CONFIG *master, <span class="dt">const</span> ALLEGRO_CONFIG *add)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/config.c#L522">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/config.c#L522">Source Code</a></p>
 <p>Merge one configuration structure into another. Values in configuration 'add' override those in 'master'. 'master' is modified. Comments from 'add' are not retained.</p>
 <p>See also: <a href="config.html#al_merge_config">al_merge_config</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:38 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:56 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/direct3d.html b/docs/html/refman/direct3d.html
index 754d1ca..f48a8b8 100644
--- a/docs/html/refman/direct3d.html
+++ b/docs/html/refman/direct3d.html
@@ -133,39 +133,39 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_direct3d.h></span></code></pre>
 <h1 id="al_get_d3d_device"><a href="#al_get_d3d_device">al_get_d3d_device</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">LPDIRECT3DDEVICE9 al_get_d3d_device(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/d3d_disp.cpp#L2564">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/d3d_disp.cpp#L2562">Source Code</a></p>
 <p>Returns the Direct3D device of the display. The return value is undefined if the display was not created with the Direct3D flag.</p>
 <p><em>Returns:</em> A pointer to the Direct3D device.</p>
 <h1 id="al_get_d3d_system_texture"><a href="#al_get_d3d_system_texture">al_get_d3d_system_texture</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">LPDIRECT3DTEXTURE9 al_get_d3d_system_texture(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/d3d_disp.cpp#L2572">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/d3d_disp.cpp#L2570">Source Code</a></p>
 <p>Returns the system texture (stored with the D3DPOOL_SYSTEMMEM flags). This texture is used for the render-to-texture feature set.</p>
 <p><em>Returns:</em> A pointer to the Direct3D system texture.</p>
 <h1 id="al_get_d3d_video_texture"><a href="#al_get_d3d_video_texture">al_get_d3d_video_texture</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">LPDIRECT3DTEXTURE9 al_get_d3d_video_texture(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/d3d_disp.cpp#L2580">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/d3d_disp.cpp#L2578">Source Code</a></p>
 <p>Returns the video texture (stored with the D3DPOOL_DEFAULT or D3DPOOL_MANAGED flags depending on whether render-to-texture is enabled or disabled respectively).</p>
 <p><em>Returns:</em> A pointer to the Direct3D video texture.</p>
 <h1 id="al_have_d3d_non_pow2_texture_support"><a href="#al_have_d3d_non_pow2_texture_support">al_have_d3d_non_pow2_texture_support</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_have_d3d_non_pow2_texture_support(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/d3d_disp.cpp#L228">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/d3d_disp.cpp#L228">Source Code</a></p>
 <p>Returns whether the Direct3D device supports textures whose dimensions are not powers of two.</p>
 <p><em>Returns:</em> True if device suports NPOT textures, false otherwise.</p>
 <h1 id="al_have_d3d_non_square_texture_support"><a href="#al_have_d3d_non_square_texture_support">al_have_d3d_non_square_texture_support</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_have_d3d_non_square_texture_support(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/d3d_disp.cpp#L270">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/d3d_disp.cpp#L270">Source Code</a></p>
 <p>Returns whether the Direct3D device supports textures that are not square.</p>
 <p><em>Returns:</em> True if the Direct3D device suports non-square textures, false otherwise.</p>
 <h1 id="al_get_d3d_texture_size"><a href="#al_get_d3d_texture_size">al_get_d3d_texture_size</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_d3d_texture_size(ALLEGRO_BITMAP *bitmap, <span class="dt">int</span> *width, <span class="dt">int</span> *height)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/d3d_bmp.cpp#L105">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/d3d_bmp.cpp#L105">Source Code</a></p>
 <p>Retrieves the size of the Direct3D texture used for the bitmap.</p>
 <p>Returns true on success, false on failure. Zero width and height are returned if the bitmap is not a Direct3D bitmap.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="direct3d.html#al_get_d3d_texture_position">al_get_d3d_texture_position</a></p>
 <h1 id="al_get_d3d_texture_position"><a href="#al_get_d3d_texture_position">al_get_d3d_texture_position</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_d3d_texture_position(ALLEGRO_BITMAP *bitmap, <span class="dt">int</span> *u, <span class="dt">int</span> *v)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/d3d_disp.cpp#L2588">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/d3d_disp.cpp#L2586">Source Code</a></p>
 <p>Returns the u/v coordinates for the top/left corner of the bitmap within the used texture, in pixels.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -176,7 +176,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="direct3d.html#al_get_d3d_texture_size">al_get_d3d_texture_size</a></p>
 <h1 id="al_is_d3d_device_lost"><a href="#al_is_d3d_device_lost">al_is_d3d_device_lost</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_d3d_device_lost(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/d3d_disp.cpp#L2600">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/d3d_disp.cpp#L2598">Source Code</a></p>
 <p>Returns a boolean indicating whether or not the Direct3D device belonging to the given display is in a lost state.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -185,20 +185,20 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_set_d3d_device_release_callback"><a href="#al_set_d3d_device_release_callback">al_set_d3d_device_release_callback</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_d3d_device_release_callback(
    <span class="dt">void</span> (*callback)(ALLEGRO_DISPLAY *display))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/d3d_disp.cpp#L206">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/d3d_disp.cpp#L206">Source Code</a></p>
 <p>The callback will be called whenever a D3D device is reset (minimize, toggle fullscreen window, etc). In the callback you should release any d3d resources you have created yourself. The callback receives the affected display as a parameter.</p>
 <p>Pass NULL to disable the callback.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_set_d3d_device_restore_callback"><a href="#al_set_d3d_device_restore_callback">al_set_d3d_device_restore_callback</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_d3d_device_restore_callback(
    <span class="dt">void</span> (*callback)(ALLEGRO_DISPLAY *display))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/d3d_disp.cpp#L214">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/d3d_disp.cpp#L214">Source Code</a></p>
 <p>The callback will be called whenever a D3D device that has been reset is restored. In the callback you should restore any d3d resources you have created yourself. The callback receives the affected display as a parameter.</p>
 <p>Pass NULL to disable the callback.</p>
 <p>Since: 5.1.0</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:43 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:00 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/display.html b/docs/html/refman/display.html
index 7b87edc..8e49e90 100644
--- a/docs/html/refman/display.html
+++ b/docs/html/refman/display.html
@@ -188,30 +188,30 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="display-creation"><a href="#display-creation">Display creation</a></h1>
 <h2 id="allegro_display"><a href="#allegro_display">ALLEGRO_DISPLAY</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_DISPLAY ALLEGRO_DISPLAY;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/display.h#L108">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/display.h#L108">Source Code</a></p>
 <p>An opaque type representing an open display or window.</p>
 <h2 id="al_create_display"><a href="#al_create_display">al_create_display</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_DISPLAY *al_create_display(<span class="dt">int</span> w, <span class="dt">int</span> h)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L38">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L38">Source Code</a></p>
 <p>Create a display, or window, with the specified dimensions. The parameters of the display are determined by the last calls to al_set_new_display_*. Default parameters are used if none are set explicitly. Creating a new display will automatically make it the active one, with the backbuffer selected for drawing.</p>
 <p>Returns NULL on error.</p>
 <p>Each display that uses OpenGL as a backend has a distinct OpenGL rendering context associated with it. See <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a> for the discussion about rendering contexts.</p>
 <p>See also: <a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a>, <a href="display.html#al_set_new_display_option">al_set_new_display_option</a>, <a href="display.html#al_set_new_display_refresh_rate">al_set_new_display_refresh_rate</a>, <a href="monitor.html#al_set_new_display_adapter">al_set_new_display_adapter</a>, <a href="display.html#al_set_window_position">al_set_new_window_title</a></p>
 <h2 id="al_destroy_display"><a href="#al_destroy_display">al_destroy_display</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_display(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L143">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L139">Source Code</a></p>
 <p>Destroy a display.</p>
 <p>If the target bitmap of the calling thread is tied to the display, then it implies a call to "al_set_target_bitmap(NULL);" before the display is destroyed.</p>
 <p>That special case notwithstanding, you should make sure no threads are currently targeting a bitmap which is tied to the display before you destroy it.</p>
 <p>See also: <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a></p>
 <h2 id="al_get_new_display_flags"><a href="#al_get_new_display_flags">al_get_new_display_flags</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_new_display_flags(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L246">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L248">Source Code</a></p>
 <p>Get the display flags to be used when creating new displays on the calling thread.</p>
 <p>See also: <a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a>, <a href="display.html#al_set_display_flag">al_set_display_flag</a></p>
 <h2 id="al_set_new_display_flags"><a href="#al_set_new_display_flags">al_set_new_display_flags</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_new_display_flags(<span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L233">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L235">Source Code</a></p>
 <p>Sets various flags to be used when creating new displays on the calling thread. flags is a bitfield containing any reasonable combination of the following:</p>
 <dl>
 <dt>ALLEGRO_WINDOWED</dt>
@@ -272,11 +272,11 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="display.html#al_set_new_display_option">al_set_new_display_option</a>, <a href="display.html#al_get_display_option">al_get_display_option</a>, <a href="display.html#al_set_display_option">al_set_display_option</a></p>
 <h2 id="al_get_new_display_option"><a href="#al_get_new_display_option">al_get_new_display_option</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_new_display_option(<span class="dt">int</span> option, <span class="dt">int</span> *importance)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display_settings.c#L64">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display_settings.c#L64">Source Code</a></p>
 <p>Retrieve an extra display setting which was previously set with <a href="display.html#al_set_new_display_option">al_set_new_display_option</a>.</p>
 <h2 id="al_set_new_display_option"><a href="#al_set_new_display_option">al_set_new_display_option</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_new_display_option(<span class="dt">int</span> option, <span class="dt">int</span> value, <span class="dt">int</span> importance)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display_settings.c#L29">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display_settings.c#L29">Source Code</a></p>
 <p>Set an extra display option, to be used when creating new displays on the calling thread. Display options differ from display flags, and specify some details of the context to be created within the window itself. These mainly have no effect on Allegro itself, but you may want to specify them, for example if you want to use multisampling.</p>
 <p>The 'importance' parameter can be either:</p>
 <ul>
@@ -378,43 +378,43 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a>, <a href="display.html#al_get_display_option">al_get_display_option</a></p>
 <h2 id="al_reset_new_display_options"><a href="#al_reset_new_display_options">al_reset_new_display_options</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_reset_new_display_options(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display_settings.c#L104">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display_settings.c#L104">Source Code</a></p>
 <p>This undoes any previous call to <a href="display.html#al_set_new_display_option">al_set_new_display_option</a> on the calling thread.</p>
 <h2 id="al_get_new_window_position"><a href="#al_get_new_window_position">al_get_new_window_position</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_new_window_position(<span class="dt">int</span> *x, <span class="dt">int</span> *y)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L329">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L330">Source Code</a></p>
 <p>Get the position where new non-fullscreen displays created by the calling thread will be placed.</p>
 <p>See also: <a href="display.html#al_set_new_window_position">al_set_new_window_position</a></p>
 <h2 id="al_set_new_window_position"><a href="#al_set_new_window_position">al_set_new_window_position</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_new_window_position(<span class="dt">int</span> x, <span class="dt">int</span> y)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L315">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L317">Source Code</a></p>
 <p>Sets where the top left pixel of the client area of newly created windows (non-fullscreen) will be on screen, for displays created by the calling thread. Negative values are allowed on some multihead systems.</p>
 <p>To reset to the default behaviour, pass (INT_MAX, INT_MAX).</p>
 <p>See also: <a href="display.html#al_get_new_window_position">al_get_new_window_position</a></p>
 <h2 id="al_get_new_display_refresh_rate"><a href="#al_get_new_display_refresh_rate">al_get_new_display_refresh_rate</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_new_display_refresh_rate(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L272">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L274">Source Code</a></p>
 <p>Get the requested refresh rate to be used when creating new displays on the calling thread.</p>
 <p>See also: <a href="display.html#al_set_new_display_refresh_rate">al_set_new_display_refresh_rate</a></p>
 <h2 id="al_set_new_display_refresh_rate"><a href="#al_set_new_display_refresh_rate">al_set_new_display_refresh_rate</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_new_display_refresh_rate(<span class="dt">int</span> refresh_rate)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L259">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L261">Source Code</a></p>
 <p>Sets the refresh rate to use when creating new displays on the calling thread. If the refresh rate is not available, <a href="display.html#al_create_display">al_create_display</a> will fail. A list of modes with refresh rates can be found with <a href="fullscreen_mode.html#al_get_num_display_modes">al_get_num_display_modes</a> and <a href="fullscreen_mode.html#al_get_display_mode">al_get_display_mode</a>.</p>
 <p>The default setting is zero (don't care).</p>
 <p>See also: <a href="display.html#al_get_new_display_refresh_rate">al_get_new_display_refresh_rate</a></p>
 <h1 id="display-operations"><a href="#display-operations">Display operations</a></h1>
 <h2 id="al_get_display_event_source"><a href="#al_get_display_event_source">al_get_display_event_source</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_display_event_source(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L490">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L486">Source Code</a></p>
 <p>Retrieve the associated event source. See the <a href="events.html#allegro_event_display_expose">documentation on events</a> for a list of the events displays will generate.</p>
 <h2 id="al_get_backbuffer"><a href="#al_get_backbuffer">al_get_backbuffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_get_backbuffer(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L177">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L173">Source Code</a></p>
 <p>Return a special bitmap representing the back-buffer of the display.</p>
 <p>Care should be taken when using the backbuffer bitmap (and its sub-bitmaps) as the source bitmap (e.g as the bitmap argument to <a href="graphics.html#al_draw_bitmap">al_draw_bitmap</a>). Only untransformed operations are hardware accelerated. These consist of <a href="graphics.html#al_draw_bitmap">al_draw_bitmap</a> and <a href="graphics.html#al_draw_bitmap_region">al_draw_bitmap_region</a> when the current transformation is the identity. If the tranformation is not the identity, or  [...]
 <h2 id="al_flip_display"><a href="#al_flip_display">al_flip_display</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_flip_display(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L190">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L186">Source Code</a></p>
 <p>Copies or updates the front and back buffers so that what has been drawn previously on the currently selected display becomes visible on screen. Pointers to the special back buffer bitmap remain valid and retain their semantics as the back buffer, although the contents may have changed.</p>
 <p>Several display options change how this function behaves:</p>
 <ul>
@@ -425,12 +425,12 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a>, <a href="display.html#al_set_new_display_option">al_set_new_display_option</a></p>
 <h2 id="al_update_display_region"><a href="#al_update_display_region">al_update_display_region</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_update_display_region(<span class="dt">int</span> x, <span class="dt">int</span> y, <span class="dt">int</span> width, <span class="dt">int</span> height)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L204">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L200">Source Code</a></p>
 <p>Does the same as <a href="display.html#al_flip_display">al_flip_display</a>, but tries to update only the specified region. With many drivers this is not possible, but for some it can improve performance. If this is not supported, this function falls back to the behavior of <a href="display.html#al_flip_display">al_flip_display</a>. You can query the support for this function using <code>al_get_display_option(display, ALLEGRO_UPDATE_DISPLAY_REGION)</code>.</p>
 <p>See also: <a href="display.html#al_flip_display">al_flip_display</a>, <a href="display.html#al_get_display_option">al_get_display_option</a></p>
 <h2 id="al_wait_for_vsync"><a href="#al_wait_for_vsync">al_wait_for_vsync</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_wait_for_vsync(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L332">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L328">Source Code</a></p>
 <p>Wait for the beginning of a vertical retrace. Some driver/card/monitor combinations may not be capable of this.</p>
 <p>Note how <a href="display.html#al_flip_display">al_flip_display</a> usually already waits for the vertical retrace, so unless you are doing something special, there is no reason to call this function.</p>
 <p>Returns false if not possible, true if successful.</p>
@@ -438,61 +438,61 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="display-size-and-position"><a href="#display-size-and-position">Display size and position</a></h1>
 <h2 id="al_get_display_width"><a href="#al_get_display_width">al_get_display_width</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_display_width(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L269">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L265">Source Code</a></p>
 <p>Gets the width of the display. This is like SCREEN_W in Allegro 4.x.</p>
 <p>See also: <a href="display.html#al_get_display_height">al_get_display_height</a></p>
 <h2 id="al_get_display_height"><a href="#al_get_display_height">al_get_display_height</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_display_height(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L280">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L276">Source Code</a></p>
 <p>Gets the height of the display. This is like SCREEN_H in Allegro 4.x.</p>
 <p>See also: <a href="display.html#al_get_display_width">al_get_display_width</a></p>
 <h2 id="al_resize_display"><a href="#al_resize_display">al_resize_display</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_resize_display(ALLEGRO_DISPLAY *display, <span class="dt">int</span> width, <span class="dt">int</span> height)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L235">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L231">Source Code</a></p>
 <p>Resize the display. Returns true on success, or false on error. This works on both fullscreen and windowed displays, regardless of the ALLEGRO_RESIZABLE flag.</p>
 <p>Adjusts the clipping rectangle to the full size of the backbuffer.</p>
 <p>See also: <a href="display.html#al_acknowledge_resize">al_acknowledge_resize</a></p>
 <h2 id="al_acknowledge_resize"><a href="#al_acknowledge_resize">al_acknowledge_resize</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_acknowledge_resize(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L218">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L214">Source Code</a></p>
 <p>When the user receives a <a href="events.html#allegro_event_display_resize">resize event</a> from a resizable display, if they wish the display to be resized they must call this function to let the graphics driver know that it can now resize the display. Returns true on success.</p>
 <p>Adjusts the clipping rectangle to the full size of the backbuffer. This also resets the backbuffers projection transform to default orthographic transform (see <a href="transformations.html#al_use_projection_transform">al_use_projection_transform</a>).</p>
 <p>Note that a resize event may be outdated by the time you acknowledge it; there could be further resize events generated in the meantime.</p>
 <p>See also: <a href="display.html#al_resize_display">al_resize_display</a>, <a href="events.html#allegro_event">ALLEGRO_EVENT</a></p>
 <h2 id="al_get_window_position"><a href="#al_get_window_position">al_get_window_position</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_window_position(ALLEGRO_DISPLAY *display, <span class="dt">int</span> *x, <span class="dt">int</span> *y)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L393">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L389">Source Code</a></p>
 <p>Gets the position of a non-fullscreen display.</p>
 <p>See also: <a href="display.html#al_set_window_position">al_set_window_position</a></p>
 <h2 id="al_set_window_position"><a href="#al_set_window_position">al_set_window_position</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_window_position(ALLEGRO_DISPLAY *display, <span class="dt">int</span> x, <span class="dt">int</span> y)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L377">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L373">Source Code</a></p>
 <p>Sets the position on screen of a non-fullscreen display.</p>
 <p>See also: <a href="display.html#al_get_window_position">al_get_window_position</a></p>
 <h2 id="al_get_window_constraints"><a href="#al_get_window_constraints">al_get_window_constraints</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_window_constraints(ALLEGRO_DISPLAY *display,
    <span class="dt">int</span> *min_w, <span class="dt">int</span> *min_h, <span class="dt">int</span> *max_w, <span class="dt">int</span> *max_h)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L447">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L443">Source Code</a></p>
 <p>Gets the constraints for a non-fullscreen resizable display.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="display.html#al_set_window_constraints">al_set_window_constraints</a></p>
 <h2 id="al_set_window_constraints"><a href="#al_set_window_constraints">al_set_window_constraints</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_window_constraints(ALLEGRO_DISPLAY *display,
    <span class="dt">int</span> min_w, <span class="dt">int</span> min_h, <span class="dt">int</span> max_w, <span class="dt">int</span> max_h)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L409">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L405">Source Code</a></p>
 <p>Constrains a non-fullscreen resizable display. The constraints are a hint only, and are not necessarily respected by the window environment. A value of 0 for any of the parameters indicates no constraint for that parameter.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="display.html#al_get_window_constraints">al_get_window_constraints</a></p>
 <h1 id="display-settings"><a href="#display-settings">Display settings</a></h1>
 <h2 id="al_get_display_flags"><a href="#al_get_display_flags">al_get_display_flags</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_display_flags(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L311">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L307">Source Code</a></p>
 <p>Gets the flags of the display.</p>
 <p>In addition to the flags set for the display at creation time with <a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a> it can also have the ALLEGRO_MINIMIZED flag set, indicating that the window is currently minimized. This flag is very platform-dependent as even a minimized application may still render a preview version so normally you should not care whether it is minimized or not.</p>
 <p>See also: <a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a>, <a href="display.html#al_set_display_flag">al_set_display_flag</a></p>
 <h2 id="al_set_display_flag"><a href="#al_set_display_flag">al_set_display_flag</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_display_flag(ALLEGRO_DISPLAY *display, <span class="dt">int</span> flag, bool onoff)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L468">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L464">Source Code</a></p>
 <p>Enable or disable one of the display flags. The flags are the same as for <a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a>. The only flags that can be changed after creation are:</p>
 <ul>
 <li>ALLEGRO_FULLSCREEN_WINDOW</li>
@@ -504,12 +504,12 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a>, <a href="display.html#al_get_display_flags">al_get_display_flags</a></p>
 <h2 id="al_get_display_option"><a href="#al_get_display_option">al_get_display_option</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_display_option(ALLEGRO_DISPLAY *display, <span class="dt">int</span> option)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display_settings.c#L94">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display_settings.c#L94">Source Code</a></p>
 <p>Return an extra display setting of the display.</p>
 <p>See also: <a href="display.html#al_set_new_display_option">al_set_new_display_option</a></p>
 <h2 id="al_set_display_option"><a href="#al_set_display_option">al_set_display_option</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_display_option(ALLEGRO_DISPLAY *display, <span class="dt">int</span> option, <span class="dt">int</span> value)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display_settings.c#L82">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display_settings.c#L82">Source Code</a></p>
 <p>Change an option that was previously set for a display. After displays are created, they take on the options set with <a href="display.html#al_set_new_display_option">al_set_new_display_option</a>. Calling <a href="display.html#al_set_new_display_option">al_set_new_display_option</a> subsequently only changes options for newly created displays, and doesn't touch the options of already created displays. <a href="display.html#al_set_display_option">al_set_display_option</a> allows chang [...]
 <ul>
 <li>ALLEGRO_SUPPORTED_ORIENTATIONS - This can be changed to allow new or restrict previously enabled orientations of the screen/device. See <a href="display.html#al_set_new_display_option">al_set_new_display_option</a> for more information on this option.</li>
@@ -518,12 +518,12 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="display.html#al_set_new_display_option">al_set_new_display_option</a></p>
 <h2 id="al_get_display_format"><a href="#al_get_display_format">al_get_display_format</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_display_format(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L290">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L286">Source Code</a></p>
 <p>Gets the pixel format of the display.</p>
 <p>See also: <a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a></p>
 <h2 id="al_get_display_orientation"><a href="#al_get_display_orientation">al_get_display_orientation</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_display_orientation(ALLEGRO_DISPLAY* display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L321">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L317">Source Code</a></p>
 <p>Return the display orientation, which can be one of the following:</p>
 <ul>
 <li>ALLEGRO_DISPLAY_ORIENTATION_UNKNOWN</li>
@@ -537,41 +537,41 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Since: 5.1.0</p>
 <h2 id="al_get_display_refresh_rate"><a href="#al_get_display_refresh_rate">al_get_display_refresh_rate</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_display_refresh_rate(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L300">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L296">Source Code</a></p>
 <p>Gets the refresh rate of the display.</p>
 <p>See also: <a href="display.html#al_set_new_display_refresh_rate">al_set_new_display_refresh_rate</a></p>
 <h2 id="al_set_window_title"><a href="#al_set_window_title">al_set_window_title</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_window_title(ALLEGRO_DISPLAY *display, <span class="dt">const</span> <span class="dt">char</span> *title)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L481">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L477">Source Code</a></p>
 <p>Set the title on a display.</p>
 <p>See also: <a href="display.html#al_set_display_icon">al_set_display_icon</a>, <a href="display.html#al_set_display_icons">al_set_display_icons</a></p>
 <h2 id="al_set_new_window_title"><a href="#al_set_new_window_title">al_set_new_window_title</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_new_window_title(<span class="dt">const</span> <span class="dt">char</span> *title)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L192">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L194">Source Code</a></p>
 <p>Set the title that will be used when a new display is created. Allegro uses a static buffer of <a href="display.html#allegro_new_window_title_max_size">ALLEGRO_NEW_WINDOW_TITLE_MAX_SIZE</a> to store this, so the length of the titme you set must be less than this.</p>
 <p>See also: <a href="display.html#al_set_window_title">al_set_window_title</a>, <a href="display.html#al_get_new_window_title">al_get_new_window_title</a>, <a href="display.html#al_create_display">al_create_display</a>, <a href="display.html#allegro_new_window_title_max_size">ALLEGRO_NEW_WINDOW_TITLE_MAX_SIZE</a></p>
 <p>Since: 5.1.12</p>
 <h2 id="allegro_new_window_title_max_size"><a href="#allegro_new_window_title_max_size">ALLEGRO_NEW_WINDOW_TITLE_MAX_SIZE</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_NEW_WINDOW_TITLE_MAX_SIZE 255</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/display.h#L113">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/display.h#L113">Source Code</a></p>
 <p>This is the maximum size of the title that can be set with <a href="display.html#al_set_new_window_title">al_set_new_window_title</a>.</p>
 <p>See also: <a href="display.html#al_set_new_window_title">al_set_new_window_title</a></p>
 <p>Since: 5.1.12</p>
 <h2 id="al_get_new_window_title"><a href="#al_get_new_window_title">al_get_new_window_title</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_new_window_title(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L213">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L215">Source Code</a></p>
 <p>Returns the title that will be used when a new display is created. This returns the value that <a href="display.html#al_set_window_title">al_set_window_title</a> was called with. If that function wasn't called yet, the value of <a href="system.html#al_get_app_name">al_get_app_name</a> is returned as a default. The current implementation returns a pointer to a static buffer of which you should make a copy if you want to modify it.</p>
 <p>See also: <a href="display.html#al_set_window_title">al_set_window_title</a>, <a href="display.html#al_set_new_window_title">al_set_new_window_title</a>, <a href="display.html#al_create_display">al_create_display</a></p>
 <p>Since: 5.1.12</p>
 <h2 id="al_set_display_icon"><a href="#al_set_display_icon">al_set_display_icon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_display_icon(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *icon)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L347">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L343">Source Code</a></p>
 <p>Changes the icon associated with the display (window). Same as <a href="display.html#al_set_display_icons">al_set_display_icons</a> with one icon.</p>
 <p>See also: <a href="display.html#al_set_display_icons">al_set_display_icons</a>, <a href="display.html#al_set_window_title">al_set_window_title</a></p>
 <h2 id="al_set_display_icons"><a href="#al_set_display_icons">al_set_display_icons</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_display_icons(ALLEGRO_DISPLAY *display,
    <span class="dt">int</span> num_icons, ALLEGRO_BITMAP *icons[])</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L358">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L354">Source Code</a></p>
 <p>Changes the icons associated with the display (window). Multiple icons can be provided for use in different contexts, e.g. window frame, taskbar, alt-tab popup. The number of icons must be at least one.</p>
 <blockquote>
 <p><em>Note:</em> If the underlying OS requires an icon of a size not provided then one of the bitmaps will be scaled up or down to the required size. The choice of bitmap is implementation dependent.</p>
@@ -581,45 +581,45 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="drawing-halts"><a href="#drawing-halts">Drawing halts</a></h1>
 <h2 id="al_acknowledge_drawing_halt"><a href="#al_acknowledge_drawing_halt">al_acknowledge_drawing_halt</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_acknowledge_drawing_halt(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L577">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L573">Source Code</a></p>
 <p>Call this in response to the <a href="events.html#allegro_event_display_halt_drawing">ALLEGRO_EVENT_DISPLAY_HALT_DRAWING</a> event. This is currently necessary for Android and iOS as you are not allowed to draw to your display while it is not being shown. If you do not call this function to let the operating system know that you have stopped drawing or if you call it to late the application likely will be considered misbehaving and get terminated.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="events.html#allegro_event_display_halt_drawing">ALLEGRO_EVENT_DISPLAY_HALT_DRAWING</a></p>
 <h2 id="al_acknowledge_drawing_resume"><a href="#al_acknowledge_drawing_resume">al_acknowledge_drawing_resume</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_acknowledge_drawing_resume(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L586">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L582">Source Code</a></p>
 <p>Call this in response to the <a href="events.html#allegro_event_display_resume_drawing">ALLEGRO_EVENT_DISPLAY_RESUME_DRAWING</a> event.</p>
 <p>Since: 5.1.1</p>
 <p>See also: <a href="events.html#allegro_event_display_resume_drawing">ALLEGRO_EVENT_DISPLAY_RESUME_DRAWING</a></p>
 <h1 id="screensaver"><a href="#screensaver">Screensaver</a></h1>
 <h2 id="al_inhibit_screensaver"><a href="#al_inhibit_screensaver">al_inhibit_screensaver</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_inhibit_screensaver(bool inhibit)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/system.c#L433">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/system.c#L440">Source Code</a></p>
 <p>This function allows the user to stop the system screensaver from starting up if true is passed, or resets the system back to the default state (the state at program start) if false is passed. It returns true if the state was set successfully, otherwise false.</p>
 <h1 id="clipboard"><a href="#clipboard">Clipboard</a></h1>
 <p>With the clipboard API of Allegro, text can be copied from and to the clipboard. Currentlly, only UTF8 encoded text is supported. It currently works on Linux, Windows, OSX, Android and IOS.</p>
 <h2 id="al_get_clipboard_text"><a href="#al_get_clipboard_text">al_get_clipboard_text</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> *al_get_clipboard_text(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/clipboard.c#L29">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/clipboard.c#L29">Source Code</a></p>
 <p>This function returns a pointer to a string, allocated with <a href="memory.html#al_malloc">al_malloc</a> with the text contents of the clipboard if available. If not text is available on the clipboard then this function returns NULL. You must call <a href="memory.html#al_free">al_free</a> on the returned pointer when you don't need it anymore.</p>
 <p>Beware that text on the clipboard on Windows may be in Windows format, that is, it may have carriage return newline combinations for the line endings instead of regular newlines for the line endings on Linux or OSX.</p>
 <p>Since: 5.1.12</p>
 <p>See also: <a href="display.html#al_set_clipboard_text">al_set_clipboard_text</a>, <a href="display.html#al_clipboard_has_text">al_clipboard_has_text</a></p>
 <h2 id="al_set_clipboard_text"><a href="#al_set_clipboard_text">al_set_clipboard_text</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_clipboard_text(ALLEGRO_DISPLAY *display, <span class="dt">const</span> <span class="dt">char</span> *text)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/clipboard.c#L46">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/clipboard.c#L46">Source Code</a></p>
 <p>This function pastes the text given as an argument to the clipboard.</p>
 <p>Since: 5.1.12</p>
 <p>See also: <a href="display.html#al_get_clipboard_text">al_get_clipboard_text</a>, <a href="display.html#al_clipboard_has_text">al_clipboard_has_text</a></p>
 <h2 id="al_clipboard_has_text"><a href="#al_clipboard_has_text">al_clipboard_has_text</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_clipboard_has_text(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/clipboard.c#L64">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/clipboard.c#L64">Source Code</a></p>
 <p>This function returns true if and only if the clipboard has text available.</p>
 <p>Since: 5.1.12</p>
 <p>See also: <a href="display.html#al_set_clipboard_text">al_set_clipboard_text</a>, <a href="display.html#al_get_clipboard_text">al_get_clipboard_text</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:38 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:56 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/events.html b/docs/html/refman/events.html
index 0d56cef..de10511 100644
--- a/docs/html/refman/events.html
+++ b/docs/html/refman/events.html
@@ -187,7 +187,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>The appropriate reaction to an event is determined by examining the fields of the <a href="events.html#allegro_event">ALLEGRO_EVENT</a> union according to the event type.</p>
 <h1 id="allegro_event"><a href="#allegro_event">ALLEGRO_EVENT</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">union</span> ALLEGRO_EVENT ALLEGRO_EVENT;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/events.h#L202">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/events.h#L202">Source Code</a></p>
 <p>An ALLEGRO_EVENT is a union of all builtin event structures, i.e. it is an object large enough to hold the data of any event type. All events have the following fields in common:</p>
 <dl>
 <dt>type (ALLEGRO_EVENT_TYPE)</dt>
@@ -543,7 +543,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>display.source (ALLEGRO_DISPLAY *) : The display which was disconnected.</p>
 <h1 id="allegro_user_event"><a href="#allegro_user_event">ALLEGRO_USER_EVENT</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_USER_EVENT ALLEGRO_USER_EVENT;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/events.h#L186">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/events.h#L186">Source Code</a></p>
 <p>An event structure that can be emitted by user event sources. These are the public fields:</p>
 <ul>
 <li>ALLEGRO_EVENT_SOURCE *source;</li>
@@ -576,23 +576,23 @@ al_emit_user_event(&my_event_source, &my_event, NULL);</code></pre>
 <p>See also: <a href="events.html#al_emit_user_event">al_emit_user_event</a>, <a href="events.html#allegro_get_event_type">ALLEGRO_GET_EVENT_TYPE</a>, <a href="events.html#al_init_user_event_source">al_init_user_event_source</a></p>
 <h1 id="allegro_event_queue"><a href="#allegro_event_queue">ALLEGRO_EVENT_QUEUE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_EVENT_QUEUE ALLEGRO_EVENT_QUEUE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/events.h#L243">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/events.h#L243">Source Code</a></p>
 <p>An event queue holds events that have been generated by event sources that are registered with the queue. Events are stored in the order they are generated. Access is in a strictly FIFO (first-in-first-out) order.</p>
 <p>See also: <a href="events.html#al_create_event_queue">al_create_event_queue</a>, <a href="events.html#al_destroy_event_queue">al_destroy_event_queue</a></p>
 <h1 id="allegro_event_source"><a href="#allegro_event_source">ALLEGRO_EVENT_SOURCE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_EVENT_SOURCE ALLEGRO_EVENT_SOURCE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/events.h#L72">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/events.h#L72">Source Code</a></p>
 <p>An event source is any object which can generate events. For example, an ALLEGRO_DISPLAY can generate events, and you can get the ALLEGRO_EVENT_SOURCE pointer from an ALLEGRO_DISPLAY with <a href="display.html#al_get_display_event_source">al_get_display_event_source</a>.</p>
 <p>You may create your own "user" event sources that emit custom events.</p>
 <p>See also: <a href="events.html#allegro_event">ALLEGRO_EVENT</a>, <a href="events.html#al_init_user_event_source">al_init_user_event_source</a>, <a href="events.html#al_emit_user_event">al_emit_user_event</a></p>
 <h1 id="allegro_event_type"><a href="#allegro_event_type">ALLEGRO_EVENT_TYPE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="dt">unsigned</span> <span class="dt">int</span> ALLEGRO_EVENT_TYPE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/events.h#L13">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/events.h#L13">Source Code</a></p>
 <p>An integer used to distinguish between different types of events.</p>
 <p>See also: <a href="events.html#allegro_event">ALLEGRO_EVENT</a>, <a href="events.html#allegro_get_event_type">ALLEGRO_GET_EVENT_TYPE</a>, <a href="events.html#allegro_event_type_is_user">ALLEGRO_EVENT_TYPE_IS_USER</a></p>
 <h1 id="allegro_get_event_type"><a href="#allegro_get_event_type">ALLEGRO_GET_EVENT_TYPE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_GET_EVENT_TYPE(a, b, c, d)   AL_ID(a, b, c, d)</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/events.h#L67">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/events.h#L67">Source Code</a></p>
 <p>Make an event type identifier, which is a 32-bit integer. Usually, but not necessarily, this will be made from four 8-bit character codes, for example:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="er">#defin  MY_EVENT_TYPE   ALLEGRO_GET_EVENT_TYPE('M','I','N','E')</span></code></pre>
 <p>IDs less than 1024 are reserved for Allegro or its addons. Don't use anything lower than <code>ALLEGRO_GET_EVENT_TYPE(0, 0, 4, 0)</code>.</p>
@@ -612,85 +612,85 @@ al_emit_user_event(&my_event_source, &my_event, NULL);</code></pre>
 <p>See also: <a href="events.html#allegro_event">ALLEGRO_EVENT</a>, <a href="events.html#allegro_user_event">ALLEGRO_USER_EVENT</a>, <a href="events.html#allegro_event_type_is_user">ALLEGRO_EVENT_TYPE_IS_USER</a></p>
 <h1 id="allegro_event_type_is_user"><a href="#allegro_event_type_is_user">ALLEGRO_EVENT_TYPE_IS_USER</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_EVENT_TYPE_IS_USER(t)        ((t) >= 512)</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/events.h#L62">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/events.h#L62">Source Code</a></p>
 <p>A macro which evaluates to true if the event type is not a builtin event type, i.e. one of those described in <a href="events.html#allegro_event_type">ALLEGRO_EVENT_TYPE</a>.</p>
 <h1 id="al_create_event_queue"><a href="#al_create_event_queue">al_create_event_queue</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_QUEUE *al_create_event_queue(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L89">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L90">Source Code</a></p>
 <p>Create a new, empty event queue, returning a pointer to the newly created object if successful. Returns NULL on error.</p>
 <p>See also: <a href="events.html#al_register_event_source">al_register_event_source</a>, <a href="events.html#al_destroy_event_queue">al_destroy_event_queue</a>, <a href="events.html#allegro_event_queue">ALLEGRO_EVENT_QUEUE</a></p>
 <h1 id="al_destroy_event_queue"><a href="#al_destroy_event_queue">al_destroy_event_queue</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_event_queue(ALLEGRO_EVENT_QUEUE *queue)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L119">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L120">Source Code</a></p>
 <p>Destroy the event queue specified. All event sources currently registered with the queue will be automatically unregistered before the queue is destroyed.</p>
 <p>See also: <a href="events.html#al_create_event_queue">al_create_event_queue</a>, <a href="events.html#allegro_event_queue">ALLEGRO_EVENT_QUEUE</a></p>
 <h1 id="al_register_event_source"><a href="#al_register_event_source">al_register_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_register_event_source(ALLEGRO_EVENT_QUEUE *queue,
    ALLEGRO_EVENT_SOURCE *source)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L160">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L161">Source Code</a></p>
 <p>Register the event source with the event queue specified. An event source may be registered with any number of event queues simultaneously, or none. Trying to register an event source with the same event queue more than once does nothing.</p>
 <p>See also: <a href="events.html#al_unregister_event_source">al_unregister_event_source</a>, <a href="events.html#allegro_event_source">ALLEGRO_EVENT_SOURCE</a></p>
 <h1 id="al_unregister_event_source"><a href="#al_unregister_event_source">al_unregister_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_unregister_event_source(ALLEGRO_EVENT_QUEUE *queue,
    ALLEGRO_EVENT_SOURCE *source)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L180">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L181">Source Code</a></p>
 <p>Unregister an event source with an event queue. If the event source is not actually registered with the event queue, nothing happens.</p>
 <p>If the queue had any events in it which originated from the event source, they will no longer be in the queue after this call.</p>
 <p>See also: <a href="events.html#al_register_event_source">al_register_event_source</a></p>
 <h1 id="al_is_event_source_registered"><a href="#al_is_event_source_registered">al_is_event_source_registered</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_event_source_registered(ALLEGRO_EVENT_QUEUE *queue, 
       ALLEGRO_EVENT_SOURCE *source)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L146">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L147">Source Code</a></p>
 <p>Return true if the event source is registered.</p>
 <p>See also: <a href="events.html#al_register_event_source">al_register_event_source</a></p>
 <p>Since: 5.2.0</p>
 <h1 id="al_pause_event_queue"><a href="#al_pause_event_queue">al_pause_event_queue</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_pause_event_queue(ALLEGRO_EVENT_QUEUE *queue, bool pause)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L207">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L208">Source Code</a></p>
 <p>Pause or resume accepting new events into the event queue (to resume, pass false for <code>pause</code>). Events already in the queue are unaffected.</p>
 <p>While a queue is paused, any events which would be entered into the queue are simply ignored. This is an alternative to unregistering then re-registering all event sources from the event queue, if you just need to prevent events piling up in the queue for a while.</p>
 <p>See also: <a href="events.html#al_is_event_queue_paused">al_is_event_queue_paused</a></p>
 <p>Since: 5.1.0</p>
 <h1 id="al_is_event_queue_paused"><a href="#al_is_event_queue_paused">al_is_event_queue_paused</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_event_queue_paused(<span class="dt">const</span> ALLEGRO_EVENT_QUEUE *queue)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L220">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L221">Source Code</a></p>
 <p>Return true if the event queue is paused.</p>
 <p>See also: <a href="events.html#al_pause_event_queue">al_pause_event_queue</a></p>
 <p>Since: 5.1.0</p>
 <h1 id="al_is_event_queue_empty"><a href="#al_is_event_queue_empty">al_is_event_queue_empty</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_event_queue_empty(ALLEGRO_EVENT_QUEUE *queue)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L247">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L248">Source Code</a></p>
 <p>Return true if the event queue specified is currently empty.</p>
 <p>See also: <a href="events.html#al_get_next_event">al_get_next_event</a>, <a href="events.html#al_peek_next_event">al_peek_next_event</a></p>
 <h1 id="al_get_next_event"><a href="#al_get_next_event">al_get_next_event</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_next_event(ALLEGRO_EVENT_QUEUE *queue, ALLEGRO_EVENT *ret_event)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L295">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L296">Source Code</a></p>
 <p>Take the next event out of the event queue specified, and copy the contents into <code>ret_event</code>, returning true. The original event will be removed from the queue. If the event queue is empty, return false and the contents of <code>ret_event</code> are unspecified.</p>
 <p>See also: <a href="events.html#allegro_event">ALLEGRO_EVENT</a>, <a href="events.html#al_peek_next_event">al_peek_next_event</a>, <a href="events.html#al_wait_for_event">al_wait_for_event</a></p>
 <h1 id="al_peek_next_event"><a href="#al_peek_next_event">al_peek_next_event</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_peek_next_event(ALLEGRO_EVENT_QUEUE *queue, ALLEGRO_EVENT *ret_event)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L320">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L321">Source Code</a></p>
 <p>Copy the contents of the next event in the event queue specified into <code>ret_event</code> and return true. The original event packet will remain at the head of the queue. If the event queue is actually empty, this function returns false and the contents of <code>ret_event</code> are unspecified.</p>
 <p>See also: <a href="events.html#allegro_event">ALLEGRO_EVENT</a>, <a href="events.html#al_get_next_event">al_get_next_event</a>, <a href="events.html#al_drop_next_event">al_drop_next_event</a></p>
 <h1 id="al_drop_next_event"><a href="#al_drop_next_event">al_drop_next_event</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_drop_next_event(ALLEGRO_EVENT_QUEUE *queue)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L345">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L346">Source Code</a></p>
 <p>Drop (remove) the next event from the queue. If the queue is empty, nothing happens. Returns true if an event was dropped.</p>
 <p>See also: <a href="events.html#al_flush_event_queue">al_flush_event_queue</a>, <a href="events.html#al_is_event_queue_empty">al_is_event_queue_empty</a></p>
 <h1 id="al_flush_event_queue"><a href="#al_flush_event_queue">al_flush_event_queue</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_flush_event_queue(ALLEGRO_EVENT_QUEUE *queue)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L368">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L369">Source Code</a></p>
 <p>Drops all events, if any, from the queue.</p>
 <p>See also: <a href="events.html#al_drop_next_event">al_drop_next_event</a>, <a href="events.html#al_is_event_queue_empty">al_is_event_queue_empty</a></p>
 <h1 id="al_wait_for_event"><a href="#al_wait_for_event">al_wait_for_event</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_wait_for_event(ALLEGRO_EVENT_QUEUE *queue, ALLEGRO_EVENT *ret_event)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L394">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L395">Source Code</a></p>
 <p>Wait until the event queue specified is non-empty. If <code>ret_event</code> is not NULL, the first event in the queue will be copied into <code>ret_event</code> and removed from the queue. If <code>ret_event</code> is NULL the first event is left at the head of the queue.</p>
 <p>See also: <a href="events.html#allegro_event">ALLEGRO_EVENT</a>, <a href="events.html#al_wait_for_event_timed">al_wait_for_event_timed</a>, <a href="events.html#al_wait_for_event_until">al_wait_for_event_until</a>, <a href="events.html#al_get_next_event">al_get_next_event</a></p>
 <h1 id="al_wait_for_event_timed"><a href="#al_wait_for_event_timed">al_wait_for_event_timed</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_wait_for_event_timed(ALLEGRO_EVENT_QUEUE *queue,
    ALLEGRO_EVENT *ret_event, <span class="dt">float</span> secs)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L421">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L422">Source Code</a></p>
 <p>Wait until the event queue specified is non-empty. If <code>ret_event</code> is not NULL, the first event in the queue will be copied into <code>ret_event</code> and removed from the queue. If <code>ret_event</code> is NULL the first event is left at the head of the queue.</p>
 <p><code>secs</code> determines approximately how many seconds to wait. If the call times out, false is returned. Otherwise, if an event ocurred, true is returned.</p>
 <p>For compatibility with all platforms, <code>secs</code> must be 2,147,483.647 seconds or less.</p>
@@ -698,14 +698,14 @@ al_emit_user_event(&my_event_source, &my_event, NULL);</code></pre>
 <h1 id="al_wait_for_event_until"><a href="#al_wait_for_event_until">al_wait_for_event_until</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_wait_for_event_until(ALLEGRO_EVENT_QUEUE *queue,
    ALLEGRO_EVENT *ret_event, ALLEGRO_TIMEOUT *timeout)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L443">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L444">Source Code</a></p>
 <p>Wait until the event queue specified is non-empty. If <code>ret_event</code> is not NULL, the first event in the queue will be copied into <code>ret_event</code> and removed from the queue. If <code>ret_event</code> is NULL the first event is left at the head of the queue.</p>
 <p><code>timeout</code> determines how long to wait. If the call times out, false is returned. Otherwise, if an event ocurred, true is returned.</p>
 <p>For compatibility with all platforms, <code>timeout</code> must be 2,147,483.647 seconds or less.</p>
 <p>See also: <a href="events.html#allegro_event">ALLEGRO_EVENT</a>, <a href="time.html#allegro_timeout">ALLEGRO_TIMEOUT</a>, <a href="time.html#al_init_timeout">al_init_timeout</a>, <a href="events.html#al_wait_for_event">al_wait_for_event</a>, <a href="events.html#al_wait_for_event_timed">al_wait_for_event_timed</a></p>
 <h1 id="al_init_user_event_source"><a href="#al_init_user_event_source">al_init_user_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_init_user_event_source(ALLEGRO_EVENT_SOURCE *src)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/evtsrc.c#L195">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/evtsrc.c#L195">Source Code</a></p>
 <p>Initialise an event source for emitting user events. The space for the event source must already have been allocated.</p>
 <p>One possible way of creating custom event sources is to derive other structures with ALLEGRO_EVENT_SOURCE at the head, e.g.</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> THING THING;
@@ -735,14 +735,14 @@ THING *create_thing(<span class="dt">void</span>)
 <p>See also: <a href="events.html#allegro_event_source">ALLEGRO_EVENT_SOURCE</a>, <a href="events.html#al_destroy_user_event_source">al_destroy_user_event_source</a>, <a href="events.html#al_emit_user_event">al_emit_user_event</a>, <a href="events.html#allegro_user_event">ALLEGRO_USER_EVENT</a></p>
 <h1 id="al_destroy_user_event_source"><a href="#al_destroy_user_event_source">al_destroy_user_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_user_event_source(ALLEGRO_EVENT_SOURCE *src)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/evtsrc.c#L206">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/evtsrc.c#L206">Source Code</a></p>
 <p>Destroy an event source initialised with <a href="events.html#al_init_user_event_source">al_init_user_event_source</a>.</p>
 <p>This does not free the memory, as that was user allocated to begin with.</p>
 <p>See also: <a href="events.html#allegro_event_source">ALLEGRO_EVENT_SOURCE</a></p>
 <h1 id="al_emit_user_event"><a href="#al_emit_user_event">al_emit_user_event</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_emit_user_event(ALLEGRO_EVENT_SOURCE *src,
    ALLEGRO_EVENT *event, <span class="dt">void</span> (*dtor)(ALLEGRO_USER_EVENT *))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/evtsrc.c#L217">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/evtsrc.c#L217">Source Code</a></p>
 <p>Emit an event from a user event source. The event source must have been initialised with <a href="events.html#al_init_user_event_source">al_init_user_event_source</a>. Returns <code>false</code> if the event source isn't registered with any queues, hence the event wouldn't have been delivered into any queues.</p>
 <p>Events are <em>copied</em> in and out of event queues, so after this function returns the memory pointed to by <code>event</code> may be freed or reused. Some fields of the event being passed in may be modified by the function.</p>
 <p>Reference counting will be performed if <code>dtor</code> is not NULL. Whenever a copy of the event is made, the reference count increases. You need to call <a href="events.html#al_unref_user_event">al_unref_user_event</a> to decrease the reference count once you are done with a user event that you have received from <a href="events.html#al_get_next_event">al_get_next_event</a>, <a href="events.html#al_peek_next_event">al_peek_next_event</a>, <a href="events.html#al_wait_for_event">al [...]
@@ -752,22 +752,22 @@ THING *create_thing(<span class="dt">void</span>)
 <p>See also: <a href="events.html#allegro_user_event">ALLEGRO_USER_EVENT</a>, <a href="events.html#al_unref_user_event">al_unref_user_event</a></p>
 <h1 id="al_unref_user_event"><a href="#al_unref_user_event">al_unref_user_event</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_unref_user_event(ALLEGRO_USER_EVENT *event)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/events.c#L702">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/events.c#L703">Source Code</a></p>
 <p>Decrease the reference count of a user-defined event. This must be called on any user event that you get from <a href="events.html#al_get_next_event">al_get_next_event</a>, <a href="events.html#al_peek_next_event">al_peek_next_event</a>, <a href="events.html#al_wait_for_event">al_wait_for_event</a>, etc. which is reference counted. This function does nothing if the event is not reference counted.</p>
 <p>See also: <a href="events.html#al_emit_user_event">al_emit_user_event</a>, <a href="events.html#allegro_user_event">ALLEGRO_USER_EVENT</a></p>
 <h1 id="al_get_event_source_data"><a href="#al_get_event_source_data">al_get_event_source_data</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">intptr_t al_get_event_source_data(<span class="dt">const</span> ALLEGRO_EVENT_SOURCE *source)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/evtsrc.c#L274">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/evtsrc.c#L274">Source Code</a></p>
 <p>Returns the abstract user data associated with the event source. If no data was previously set, returns NULL.</p>
 <p>See also: <a href="events.html#al_set_event_source_data">al_set_event_source_data</a></p>
 <h1 id="al_set_event_source_data"><a href="#al_set_event_source_data">al_set_event_source_data</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_event_source_data(ALLEGRO_EVENT_SOURCE *source, intptr_t data)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/evtsrc.c#L264">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/evtsrc.c#L264">Source Code</a></p>
 <p>Assign the abstract user data to the event source. Allegro does not use the data internally for anything; it is simply meant as a convenient way to associate your own data or objects with events.</p>
 <p>See also: <a href="events.html#al_get_event_source_data">al_get_event_source_data</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:39 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:56 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/file.html b/docs/html/refman/file.html
index 06609c6..1c57337 100644
--- a/docs/html/refman/file.html
+++ b/docs/html/refman/file.html
@@ -167,11 +167,11 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="allegro_file"><a href="#allegro_file">ALLEGRO_FILE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_FILE ALLEGRO_FILE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/file.h#L15">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/file.h#L15">Source Code</a></p>
 <p>An opaque object representing an open file. This could be a real file on disk or a virtual file.</p>
 <h1 id="allegro_file_interface"><a href="#allegro_file_interface">ALLEGRO_FILE_INTERFACE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_FILE_INTERFACE</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/file.h#L20">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/file.h#L20">Source Code</a></p>
 <p>A structure containing function pointers to handle a type of "file", real or virtual. See the full discussion in <a href="file.html#al_set_new_file_interface">al_set_new_file_interface</a>.</p>
 <p>The fields are:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span>*         (*fi_fopen)(<span class="dt">const</span> <span class="dt">char</span> *path, <span class="dt">const</span> <span class="dt">char</span> *mode);
@@ -192,7 +192,7 @@ off_t         (*fi_fsize)(ALLEGRO_FILE *f);</code></pre>
 <p>If fi_fungetc is NULL, then Allegro's default implementation of a 16 char long buffer will be used.</p>
 <h1 id="allegro_seek"><a href="#allegro_seek">ALLEGRO_SEEK</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_SEEK</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/file.h#L40">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/file.h#L40">Source Code</a></p>
 <ul>
 <li>ALLEGRO_SEEK_SET - seek relative to beginning of file</li>
 <li>ALLEGRO_SEEK_CUR - seek relative to current file position</li>
@@ -201,7 +201,7 @@ off_t         (*fi_fsize)(ALLEGRO_FILE *f);</code></pre>
 <p>See also: <a href="file.html#al_fseek">al_fseek</a></p>
 <h1 id="al_fopen"><a href="#al_fopen">al_fopen</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FILE *al_fopen(<span class="dt">const</span> <span class="dt">char</span> *path, <span class="dt">const</span> <span class="dt">char</span> *mode)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L24">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L24">Source Code</a></p>
 <p>Creates and opens a file (real or virtual) given the path and mode. The current file interface is used to open the file.</p>
 <p>Parameters:</p>
 <ul>
@@ -215,12 +215,12 @@ off_t         (*fi_fsize)(ALLEGRO_FILE *f);</code></pre>
 <h1 id="al_fopen_interface"><a href="#al_fopen_interface">al_fopen_interface</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FILE *al_fopen_interface(<span class="dt">const</span> ALLEGRO_FILE_INTERFACE *drv,
    <span class="dt">const</span> <span class="dt">char</span> *path, <span class="dt">const</span> <span class="dt">char</span> *mode)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L32">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L32">Source Code</a></p>
 <p>Opens a file using the specified interface, instead of the interface set with <a href="file.html#al_set_new_file_interface">al_set_new_file_interface</a>.</p>
 <p>See also: <a href="file.html#al_fopen">al_fopen</a></p>
 <h1 id="al_fopen_slice"><a href="#al_fopen_slice">al_fopen_slice</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FILE *al_fopen_slice(ALLEGRO_FILE *fp, size_t initial_size, <span class="dt">const</span> <span class="dt">char</span> *mode)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file_slice.c#L205">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file_slice.c#L205">Source Code</a></p>
 <p>Opens a slice (subset) of an already open random access file as if it were a stand alone file. While the slice is open, the parent file handle must not be used in any way.</p>
 <p>The slice is opened at the current location of the parent file, up through <code>initial_size</code> bytes. The <code>initial_size</code> may be any non-negative integer that will not exceed the bounds of the parent file.</p>
 <p>Seeking with <code>ALLEGRO_SEEK_SET</code> will be relative to this starting location. <code>ALLEGRO_SEEK_END</code> will be relative to the starting location plus the size of the slice.</p>
@@ -237,37 +237,37 @@ off_t         (*fi_fsize)(ALLEGRO_FILE *f);</code></pre>
 <p>See also: <a href="file.html#al_fopen">al_fopen</a></p>
 <h1 id="al_fclose"><a href="#al_fclose">al_fclose</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_fclose(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L86">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L86">Source Code</a></p>
 <p>Close the given file, writing any buffered output data (if any).</p>
 <p>Returns true on success, false on failure. errno is set to indicate the error.</p>
 <h1 id="al_fread"><a href="#al_fread">al_fread</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_fread(ALLEGRO_FILE *f, <span class="dt">void</span> *ptr, size_t size)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L101">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L101">Source Code</a></p>
 <p>Read 'size' bytes into the buffer pointed to by 'ptr', from the given file.</p>
 <p>Returns the number of bytes actually read. If an error occurs, or the end-of-file is reached, the return value is a short byte count (or zero).</p>
 <p>al_fread() does not distinguish between EOF and other errors. Use <a href="file.html#al_feof">al_feof</a> and <a href="file.html#al_ferror">al_ferror</a> to determine which occurred.</p>
 <p>See also: <a href="file.html#al_fgetc">al_fgetc</a>, <a href="file.html#al_fread16be">al_fread16be</a>, <a href="file.html#al_fread16le">al_fread16le</a>, <a href="file.html#al_fread32be">al_fread32be</a>, <a href="file.html#al_fread32le">al_fread32le</a></p>
 <h1 id="al_fwrite"><a href="#al_fwrite">al_fwrite</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_fwrite(ALLEGRO_FILE *f, <span class="dt">const</span> <span class="dt">void</span> *ptr, size_t size)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L126">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L126">Source Code</a></p>
 <p>Write 'size' bytes from the buffer pointed to by 'ptr' into the given file.</p>
 <p>Returns the number of bytes actually written. If an error occurs, the return value is a short byte count (or zero).</p>
 <p>See also: <a href="file.html#al_fputc">al_fputc</a>, <a href="file.html#al_fputs">al_fputs</a>, <a href="file.html#al_fwrite16be">al_fwrite16be</a>, <a href="file.html#al_fwrite16le">al_fwrite16le</a>, <a href="file.html#al_fwrite32be">al_fwrite32be</a>, <a href="file.html#al_fwrite32le">al_fwrite32le</a></p>
 <h1 id="al_fflush"><a href="#al_fflush">al_fflush</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_fflush(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L138">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L138">Source Code</a></p>
 <p>Flush any pending writes to the given file.</p>
 <p>Returns true on success, false otherwise. errno is set to indicate the error.</p>
 <p>See also: <a href="state.html#al_get_errno">al_get_errno</a></p>
 <h1 id="al_ftell"><a href="#al_ftell">al_ftell</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int64_t</span> al_ftell(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L148">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L148">Source Code</a></p>
 <p>Returns the current position in the given file, or -1 on error. errno is set to indicate the error.</p>
 <p>On some platforms this function may not support large files.</p>
 <p>See also: <a href="file.html#al_fseek">al_fseek</a>, <a href="state.html#al_get_errno">al_get_errno</a></p>
 <h1 id="al_fseek"><a href="#al_fseek">al_fseek</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_fseek(ALLEGRO_FILE *f, <span class="dt">int64_t</span> offset, <span class="dt">int</span> whence)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L158">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L158">Source Code</a></p>
 <p>Set the current position of the given file to a position relative to that specified by 'whence', plus 'offset' number of bytes.</p>
 <p>'whence' can be:</p>
 <ul>
@@ -281,7 +281,7 @@ off_t         (*fi_fsize)(ALLEGRO_FILE *f);</code></pre>
 <p>See also: <a href="file.html#al_ftell">al_ftell</a>, <a href="state.html#al_get_errno">al_get_errno</a></p>
 <h1 id="al_feof"><a href="#al_feof">al_feof</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_feof(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L181">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L181">Source Code</a></p>
 <p>Returns true if the end-of-file indicator has been set on the file, i.e. we have attempted to read <em>past</em> the end of the file.</p>
 <p>This does <em>not</em> return true if we simply are at the end of the file. The following code correctly reads two bytes, even when the file contains exactly two bytes:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> b1 = al_fgetc(f);
@@ -293,39 +293,39 @@ off_t         (*fi_fsize)(ALLEGRO_FILE *f);</code></pre>
 <p>See also: <a href="file.html#al_ferror">al_ferror</a>, <a href="file.html#al_fclearerr">al_fclearerr</a></p>
 <h1 id="al_ferror"><a href="#al_ferror">al_ferror</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ferror(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L191">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L191">Source Code</a></p>
 <p>Returns non-zero if the error indicator is set on the given file, i.e. there was some sort of previous error. The error code may be system or file interface specific.</p>
 <p>See also: <a href="file.html#al_feof">al_feof</a>, <a href="file.html#al_fclearerr">al_fclearerr</a>, <a href="file.html#al_ferrmsg">al_ferrmsg</a></p>
 <h1 id="al_ferrmsg"><a href="#al_ferrmsg">al_ferrmsg</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_ferrmsg(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L201">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L201">Source Code</a></p>
 <p>Return a message string with details about the last error that occurred on the given file handle. The returned string is empty if there was no error, or if the file interface does not provide more information.</p>
 <p>See also: <a href="file.html#al_fclearerr">al_fclearerr</a>, <a href="file.html#al_ferror">al_ferror</a></p>
 <h1 id="al_fclearerr"><a href="#al_fclearerr">al_fclearerr</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_fclearerr(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L214">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L214">Source Code</a></p>
 <p>Clear the error indicator for the given file.</p>
 <p>The standard I/O backend also clears the end-of-file indicator, and other backends <em>should</em> try to do this. However, they may not if it would require too much effort (e.g. PhysicsFS backend), so your code should not rely on it if you need your code to be portable to other backends.</p>
 <p>See also: <a href="file.html#al_ferror">al_ferror</a>, <a href="file.html#al_feof">al_feof</a></p>
 <h1 id="al_fungetc"><a href="#al_fungetc">al_fungetc</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_fungetc(ALLEGRO_FILE *f, <span class="dt">int</span> c)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L497">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L497">Source Code</a></p>
 <p>Ungets a single byte from a file. Pushed-back bytes are not written to the file, only made available for subsequent reads, in reverse order.</p>
 <p>The number of pushbacks depends on the backend. The standard I/O backend only guarantees a single pushback; this depends on the libc implementation.</p>
 <p>For backends that follow the standard behavior, the pushback buffer will be cleared after any seeking or writing; also calls to <a href="file.html#al_fseek">al_fseek</a> and <a href="file.html#al_ftell">al_ftell</a> are relative to the number of pushbacks. If a pushback causes the position to become negative, the behavior of <a href="file.html#al_fseek">al_fseek</a> and <a href="file.html#al_ftell">al_ftell</a> are undefined.</p>
 <p>See also: <a href="file.html#al_fgetc">al_fgetc</a>, <a href="state.html#al_get_errno">al_get_errno</a></p>
 <h1 id="al_fsize"><a href="#al_fsize">al_fsize</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int64_t</span> al_fsize(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L523">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L523">Source Code</a></p>
 <p>Return the size of the file, if it can be determined, or -1 otherwise.</p>
 <h1 id="al_fgetc"><a href="#al_fgetc">al_fgetc</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_fgetc(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L224">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L224">Source Code</a></p>
 <p>Read and return next byte in the given file. Returns EOF on end of file or if an error occurred.</p>
 <p>See also: <a href="file.html#al_fungetc">al_fungetc</a></p>
 <h1 id="al_fputc"><a href="#al_fputc">al_fputc</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_fputc(ALLEGRO_FILE *f, <span class="dt">int</span> c)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L239">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L239">Source Code</a></p>
 <p>Write a single byte to the given file. The byte written is the value of c cast to an unsigned char.</p>
 <p>Parameters:</p>
 <ul>
@@ -335,65 +335,65 @@ off_t         (*fi_fsize)(ALLEGRO_FILE *f);</code></pre>
 <p>Returns the written byte (cast back to an int) on success, or EOF on error.</p>
 <h1 id="al_fprintf"><a href="#al_fprintf">al_fprintf</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_fprintf(ALLEGRO_FILE *pfile, <span class="dt">const</span> <span class="dt">char</span> *format, ...)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L576">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L576">Source Code</a></p>
 <p>Writes to a file with stdio "printf"-like formatting. Returns the number of bytes written, or a negative number on error.</p>
 <p>See also: <a href="file.html#al_vfprintf">al_vfprintf</a></p>
 <h1 id="al_vfprintf"><a href="#al_vfprintf">al_vfprintf</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_vfprintf(ALLEGRO_FILE *pfile, <span class="dt">const</span> <span class="dt">char</span> *format, va_list args)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L543">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L543">Source Code</a></p>
 <p>Like al_fprintf but takes a va_list. Useful for creating your own variations of formatted printing. Returns the number of bytes written, or a negative number on error.</p>
 <p>See also: <a href="file.html#al_fprintf">al_fprintf</a></p>
 <h1 id="al_fread16le"><a href="#al_fread16le">al_fread16le</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int16_t</span> al_fread16le(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L254">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L254">Source Code</a></p>
 <p>Reads a 16-bit word in little-endian format (LSB first).</p>
 <p>On success, returns the 16-bit word. On failure, returns EOF (-1). Since -1 is also a valid return value, use <a href="file.html#al_feof">al_feof</a> to check if the end of the file was reached prematurely, or <a href="file.html#al_ferror">al_ferror</a> to check if an error occurred.</p>
 <p>See also: <a href="file.html#al_fread16be">al_fread16be</a></p>
 <h1 id="al_fread16be"><a href="#al_fread16be">al_fread16be</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int16_t</span> al_fread16be(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L333">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L333">Source Code</a></p>
 <p>Reads a 16-bit word in big-endian format (MSB first).</p>
 <p>On success, returns the 16-bit word. On failure, returns EOF (-1). Since -1 is also a valid return value, use <a href="file.html#al_feof">al_feof</a> to check if the end of the file was reached prematurely, or <a href="file.html#al_ferror">al_ferror</a> to check if an error occurred.</p>
 <p>See also: <a href="file.html#al_fread16le">al_fread16le</a></p>
 <h1 id="al_fwrite16le"><a href="#al_fwrite16le">al_fwrite16le</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_fwrite16le(ALLEGRO_FILE *f, <span class="dt">int16_t</span> w)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L285">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L285">Source Code</a></p>
 <p>Writes a 16-bit word in little-endian format (LSB first).</p>
 <p>Returns the number of bytes written: 2 on success, less than 2 on an error.</p>
 <p>See also: <a href="file.html#al_fwrite16be">al_fwrite16be</a></p>
 <h1 id="al_fwrite16be"><a href="#al_fwrite16be">al_fwrite16be</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_fwrite16be(ALLEGRO_FILE *f, <span class="dt">int16_t</span> w)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L364">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L364">Source Code</a></p>
 <p>Writes a 16-bit word in big-endian format (MSB first).</p>
 <p>Returns the number of bytes written: 2 on success, less than 2 on an error.</p>
 <p>See also: <a href="file.html#al_fwrite16le">al_fwrite16le</a></p>
 <h1 id="al_fread32le"><a href="#al_fread32le">al_fread32le</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int32_t</span> al_fread32le(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L269">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L269">Source Code</a></p>
 <p>Reads a 32-bit word in little-endian format (LSB first).</p>
 <p>On success, returns the 32-bit word. On failure, returns EOF (-1). Since -1 is also a valid return value, use <a href="file.html#al_feof">al_feof</a> to check if the end of the file was reached prematurely, or <a href="file.html#al_ferror">al_ferror</a> to check if an error occurred.</p>
 <p>See also: <a href="file.html#al_fread32be">al_fread32be</a></p>
 <h1 id="al_fread32be"><a href="#al_fread32be">al_fread32be</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int32_t</span> al_fread32be(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L348">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L348">Source Code</a></p>
 <p>Read a 32-bit word in big-endian format (MSB first).</p>
 <p>On success, returns the 32-bit word. On failure, returns EOF (-1). Since -1 is also a valid return value, use <a href="file.html#al_feof">al_feof</a> to check if the end of the file was reached prematurely, or <a href="file.html#al_ferror">al_ferror</a> to check if an error occurred.</p>
 <p>See also: <a href="file.html#al_fread32le">al_fread32le</a></p>
 <h1 id="al_fwrite32le"><a href="#al_fwrite32le">al_fwrite32le</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_fwrite32le(ALLEGRO_FILE *f, <span class="dt">int32_t</span> l)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L305">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L305">Source Code</a></p>
 <p>Writes a 32-bit word in little-endian format (LSB first).</p>
 <p>Returns the number of bytes written: 4 on success, less than 4 on an error.</p>
 <p>See also: <a href="file.html#al_fwrite32be">al_fwrite32be</a></p>
 <h1 id="al_fwrite32be"><a href="#al_fwrite32be">al_fwrite32be</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_fwrite32be(ALLEGRO_FILE *f, <span class="dt">int32_t</span> l)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L384">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L384">Source Code</a></p>
 <p>Writes a 32-bit word in big-endian format (MSB first).</p>
 <p>Returns the number of bytes written: 4 on success, less than 4 on an error.</p>
 <p>See also: <a href="file.html#al_fwrite32le">al_fwrite32le</a></p>
 <h1 id="al_fgets"><a href="#al_fgets">al_fgets</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> *al_fgets(ALLEGRO_FILE *f, <span class="dt">char</span> * <span class="dt">const</span> buf, size_t max)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L412">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L412">Source Code</a></p>
 <p>Read a string of bytes terminated with a newline or end-of-file into the buffer given. The line terminator(s), if any, are included in the returned string. A maximum of max-1 bytes are read, with one byte being reserved for a NUL terminator.</p>
 <p>Parameters:</p>
 <ul>
@@ -406,14 +406,14 @@ off_t         (*fi_fsize)(ALLEGRO_FILE *f);</code></pre>
 <p>See also: <a href="file.html#al_fget_ustr">al_fget_ustr</a></p>
 <h1 id="al_fget_ustr"><a href="#al_fget_ustr">al_fget_ustr</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_USTR *al_fget_ustr(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L457">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L457">Source Code</a></p>
 <p>Read a string of bytes terminated with a newline or end-of-file. The line terminator(s), if any, are included in the returned string.</p>
 <p>On success returns a pointer to a new ALLEGRO_USTR structure. This must be freed eventually with <a href="utf8.html#al_ustr_free">al_ustr_free</a>. Returns NULL if an error occurred or if the end of file was reached without reading any bytes.</p>
 <p>See <a href="file.html#al_fopen">al_fopen</a> about translations of end-of-line characters.</p>
 <p>See also: <a href="file.html#al_fgetc">al_fgetc</a>, <a href="file.html#al_fgets">al_fgets</a></p>
 <h1 id="al_fputs"><a href="#al_fputs">al_fputs</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_fputs(ALLEGRO_FILE *f, <span class="dt">char</span> <span class="dt">const</span> *p)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L480">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L480">Source Code</a></p>
 <p>Writes a string to file. Apart from the return value, this is equivalent to:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fwrite(f, p, strlen(p));</code></pre>
 <p>Parameters:</p>
@@ -427,14 +427,14 @@ off_t         (*fi_fsize)(ALLEGRO_FILE *f);</code></pre>
 <h1 id="standard-io-specific-routines"><a href="#standard-io-specific-routines">Standard I/O specific routines</a></h1>
 <h2 id="al_fopen_fd"><a href="#al_fopen_fd">al_fopen_fd</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FILE *al_fopen_fd(<span class="dt">int</span> fd, <span class="dt">const</span> <span class="dt">char</span> *mode)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file_stdio.c#L66">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file_stdio.c#L70">Source Code</a></p>
 <p>Create an <a href="file.html#allegro_file">ALLEGRO_FILE</a> object that operates on an open file descriptor using stdio routines. See the documentation of fdopen() for a description of the 'mode' argument.</p>
 <p>Returns an ALLEGRO_FILE object on success or NULL on an error. On an error, the Allegro errno will be set and the file descriptor will not be closed.</p>
 <p>The file descriptor will be closed by <a href="file.html#al_fclose">al_fclose</a> so you should not call close() on it.</p>
 <p>See also: <a href="file.html#al_fopen">al_fopen</a></p>
 <h2 id="al_make_temp_file"><a href="#al_make_temp_file">al_make_temp_file</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FILE *al_make_temp_file(<span class="dt">const</span> <span class="dt">char</span> *template, ALLEGRO_PATH **ret_path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file_stdio.c#L454">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file_stdio.c#L458">Source Code</a></p>
 <p>Make a temporary randomly named file given a filename 'template'.</p>
 <p>'template' is a string giving the format of the generated filename and should include one or more capital Xs. The Xs are replaced with random alphanumeric characters, produced using a simple pseudo-random number generator only. There should be no path separators.</p>
 <p>If 'ret_path' is not NULL, the address it points to will be set to point to a new path structure with the name of the temporary file.</p>
@@ -444,32 +444,32 @@ off_t         (*fi_fsize)(ALLEGRO_FILE *f);</code></pre>
 <p>There are two ways to get an <a href="file.html#allegro_file">ALLEGRO_FILE</a> that doesn't use stdio. An addon library may provide a function that returns a new ALLEGRO_FILE directly, after which, all al_f* calls on that object will use overridden functions for that type of stream. Alternatively, <a href="file.html#al_set_new_file_interface">al_set_new_file_interface</a> changes which function will handle the following <a href="file.html#al_fopen">al_fopen</a> calls for the current t [...]
 <h2 id="al_set_new_file_interface"><a href="#al_set_new_file_interface">al_set_new_file_interface</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_new_file_interface(<span class="dt">const</span> ALLEGRO_FILE_INTERFACE *file_interface)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L851">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L852">Source Code</a></p>
 <p>Set the <a href="file.html#allegro_file_interface">ALLEGRO_FILE_INTERFACE</a> table for the calling thread. This will change the handler for later calls to <a href="file.html#al_fopen">al_fopen</a>.</p>
 <p>See also: <a href="file.html#al_set_standard_file_interface">al_set_standard_file_interface</a>, <a href="state.html#al_store_state">al_store_state</a>, <a href="state.html#al_restore_state">al_restore_state</a>.</p>
 <h2 id="al_set_standard_file_interface"><a href="#al_set_standard_file_interface">al_set_standard_file_interface</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_standard_file_interface(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file_stdio.c#L376">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file_stdio.c#L380">Source Code</a></p>
 <p>Set the <a href="file.html#allegro_file_interface">ALLEGRO_FILE_INTERFACE</a> table to the default, for the calling thread. This will change the handler for later calls to <a href="file.html#al_fopen">al_fopen</a>.</p>
 <p>See also: <a href="file.html#al_set_new_file_interface">al_set_new_file_interface</a></p>
 <h2 id="al_get_new_file_interface"><a href="#al_get_new_file_interface">al_get_new_file_interface</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> ALLEGRO_FILE_INTERFACE *al_get_new_file_interface(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L830">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L831">Source Code</a></p>
 <p>Return a pointer to the <a href="file.html#allegro_file_interface">ALLEGRO_FILE_INTERFACE</a> table in effect for the calling thread.</p>
 <p>See also: <a href="state.html#al_store_state">al_store_state</a>, <a href="state.html#al_restore_state">al_restore_state</a>.</p>
 <h2 id="al_create_file_handle"><a href="#al_create_file_handle">al_create_file_handle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FILE *al_create_file_handle(<span class="dt">const</span> ALLEGRO_FILE_INTERFACE *drv,
    <span class="dt">void</span> *userdata)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L63">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L63">Source Code</a></p>
 <p>Creates an empty, opened file handle with some abstract user data. This allows custom interfaces to extend the <a href="file.html#allegro_file">ALLEGRO_FILE</a> struct with their own data. You should close the handle with the standard <a href="file.html#al_fclose">al_fclose</a> function when you are finished with it.</p>
 <p>See also: <a href="file.html#al_fopen">al_fopen</a>, <a href="file.html#al_fclose">al_fclose</a>, <a href="file.html#al_set_new_file_interface">al_set_new_file_interface</a></p>
 <h2 id="al_get_file_userdata"><a href="#al_get_file_userdata">al_get_file_userdata</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> *al_get_file_userdata(ALLEGRO_FILE *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/file.c#L533">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/file.c#L533">Source Code</a></p>
 <p>Returns a pointer to the custom userdata that is attached to the file handle. This is intended to be used by functions that extend <a href="file.html#allegro_file_interface">ALLEGRO_FILE_INTERFACE</a>.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:39 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:57 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/fixed.html b/docs/html/refman/fixed.html
index 42d8986..67b772c 100644
--- a/docs/html/refman/fixed.html
+++ b/docs/html/refman/fixed.html
@@ -147,14 +147,14 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="al_fixed"><a href="#al_fixed">al_fixed</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="dt">int32_t</span> al_fixed;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/fixed.h#L30">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/fixed.h#L30">Source Code</a></p>
 <p>A fixed point number.</p>
 <p>Allegro provides some routines for working with fixed point numbers, and defines the type <code>al_fixed</code> to be a signed 32-bit integer. The high word is used for the integer part and the low word for the fraction, giving a range of -32768 to 32767 and an accuracy of about four or five decimal places. Fixed point numbers can be assigned, compared, added, subtracted, negated and shifted (for multiplying or dividing by powers of two) using the normal integer operators, but you sho [...]
 <p>The only advantage of fixed point math routines is that you don't require a floating point coprocessor to use them. This was great in the time period of i386 and i486 machines, but stopped being so useful with the coming of the Pentium class of processors. From Pentium onwards, CPUs have increased their strength in floating point operations, equaling or even surpassing integer math performance. However, many embedded processors have no FPUs so fixed point maths can still be useful there.</p>
 <p>Depending on the type of operations your program may need, using floating point types may be faster than fixed types if you are targeting a specific machine class.</p>
 <h1 id="al_itofix"><a href="#al_itofix">al_itofix</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_itofix(<span class="dt">int</span> x);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L332">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L332">Source Code</a></p>
 <p>Converts an integer to fixed point. This is the same thing as x<<16. Remember that overflows (trying to convert an integer greater than 32767) and underflows (trying to convert an integer lesser than -32768) are not detected even in debug builds! The values simply "wrap around".</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed number;
@@ -171,7 +171,7 @@ assert(al_fixtoi(number) == <span class="dv">64000</span>);</code></pre>
 <p>See also: <a href="fixed.html#al_fixtoi">al_fixtoi</a>, <a href="fixed.html#al_ftofix">al_ftofix</a>, <a href="fixed.html#al_fixtof">al_fixtof</a>.</p>
 <h1 id="al_fixtoi"><a href="#al_fixtoi">al_fixtoi</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_fixtoi(al_fixed x);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L336">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L336">Source Code</a></p>
 <p>Converts fixed point to integer, rounding as required to the nearest integer.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> result;
@@ -184,7 +184,7 @@ result = al_fixtoi(al_itofix(<span class="dv">100</span>) / <span class="dv">6</
 <p>See also: <a href="fixed.html#al_itofix">al_itofix</a>, <a href="fixed.html#al_ftofix">al_ftofix</a>, <a href="fixed.html#al_fixtof">al_fixtof</a>, <a href="fixed.html#al_fixfloor">al_fixfloor</a>, <a href="fixed.html#al_fixceil">al_fixceil</a>.</p>
 <h1 id="al_fixfloor"><a href="#al_fixfloor">al_fixfloor</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_fixfloor(al_fixed x);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L340">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L340">Source Code</a></p>
 <p>Returns the greatest integer not greater than x. That is, it rounds towards negative infinity.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> result;
@@ -197,7 +197,7 @@ result = al_fixfloor(al_itofix(<span class="dv">100</span>) / <span class="dv">6
 <p>See also: <a href="fixed.html#al_fixtoi">al_fixtoi</a>, <a href="fixed.html#al_fixceil">al_fixceil</a>.</p>
 <h1 id="al_fixceil"><a href="#al_fixceil">al_fixceil</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_fixceil(al_fixed x);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L344">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L344">Source Code</a></p>
 <p>Returns the smallest integer not less than x. That is, it rounds towards positive infinity.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> result;
@@ -210,7 +210,7 @@ result = al_fixceil(al_itofix(<span class="dv">100</span>) / <span class="dv">6<
 <p>See also: <a href="fixed.html#al_fixtoi">al_fixtoi</a>, <a href="fixed.html#al_fixfloor">al_fixfloor</a>.</p>
 <h1 id="al_ftofix"><a href="#al_ftofix">al_ftofix</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_ftofix(<span class="dt">double</span> x);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L348">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L348">Source Code</a></p>
 <p>Converts a floating point value to fixed point. Unlike <a href="fixed.html#al_itofix">al_itofix</a>, this function clamps values which could overflow the type conversion, setting Allegro's errno to ERANGE in the process if this happens.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed number;
@@ -225,7 +225,7 @@ assert(!al_get_errno()); <span class="co">/* This will fail. */</span></code></p
 <p>See also: <a href="fixed.html#al_fixtof">al_fixtof</a>, <a href="fixed.html#al_itofix">al_itofix</a>, <a href="fixed.html#al_fixtoi">al_fixtoi</a>, <a href="state.html#al_get_errno">al_get_errno</a></p>
 <h1 id="al_fixtof"><a href="#al_fixtof">al_fixtof</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">double</span> al_fixtof(al_fixed x);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L352">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L352">Source Code</a></p>
 <p>Converts fixed point to floating point.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> result;
@@ -238,7 +238,7 @@ result = al_fixtof(al_itofix(<span class="dv">100</span>) / <span class="dv">6</
 <p>See also: <a href="fixed.html#al_ftofix">al_ftofix</a>, <a href="fixed.html#al_itofix">al_itofix</a>, <a href="fixed.html#al_fixtoi">al_fixtoi</a>.</p>
 <h1 id="al_fixmul"><a href="#al_fixmul">al_fixmul</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixmul(al_fixed x, al_fixed y);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L364">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L364">Source Code</a></p>
 <p>A fixed point value can be multiplied or divided by an integer with the normal <code>*</code> and <code>/</code> operators. To multiply two fixed point values, though, you must use this function.</p>
 <p>If an overflow occurs, Allegro's errno will be set and the maximum possible value will be returned, but errno is not cleared if the operation is successful. This means that if you are going to test for overflow you should call <code>al_set_errno(0)</code> before calling <a href="fixed.html#al_fixmul">al_fixmul</a>.</p>
 <p>Example:</p>
@@ -254,7 +254,7 @@ assert(!al_get_errno());</code></pre>
 <p>See also: <a href="fixed.html#al_fixadd">al_fixadd</a>, <a href="fixed.html#al_fixsub">al_fixsub</a>, <a href="fixed.html#al_fixdiv">al_fixdiv</a>, <a href="state.html#al_get_errno">al_get_errno</a>.</p>
 <h1 id="al_fixdiv"><a href="#al_fixdiv">al_fixdiv</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixdiv(al_fixed x, al_fixed y);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L368">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L368">Source Code</a></p>
 <p>A fixed point value can be divided by an integer with the normal <code>/</code> operator. To divide two fixed point values, though, you must use this function. If a division by zero occurs, Allegro's errno will be set and the maximum possible value will be returned, but errno is not cleared if the operation is successful. This means that if you are going to test for division by zero you should call <code>al_set_errno(0)</code> before calling <a href="fixed.html#al_fixdiv">al_fixdiv</a>.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed result;
@@ -272,7 +272,7 @@ assert(!al_get_errno()); <span class="co">/* This will fail. */</span></code></p
 <p>See also: <a href="fixed.html#al_fixadd">al_fixadd</a>, <a href="fixed.html#al_fixsub">al_fixsub</a>, <a href="fixed.html#al_fixmul">al_fixmul</a>, <a href="state.html#al_get_errno">al_get_errno</a>.</p>
 <h1 id="al_fixadd"><a href="#al_fixadd">al_fixadd</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixadd(al_fixed x, al_fixed y);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L356">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L356">Source Code</a></p>
 <p>Although fixed point numbers can be added with the normal <code>+</code> integer operator, that doesn't provide any protection against overflow. If overflow is a problem, you should use this function instead. It is slower than using integer operators, but if an overflow occurs it will set Allegro's errno and clamp the result, rather than just letting it wrap.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed result;
@@ -287,7 +287,7 @@ assert(!al_get_errno()); <span class="co">/* This will fail. */</span></code></p
 <p>See also: <a href="fixed.html#al_fixsub">al_fixsub</a>, <a href="fixed.html#al_fixmul">al_fixmul</a>, <a href="fixed.html#al_fixdiv">al_fixdiv</a>.</p>
 <h1 id="al_fixsub"><a href="#al_fixsub">al_fixsub</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixsub(al_fixed x, al_fixed y);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L360">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L360">Source Code</a></p>
 <p>Although fixed point numbers can be subtracted with the normal <code>-</code> integer operator, that doesn't provide any protection against overflow. If overflow is a problem, you should use this function instead. It is slower than using integer operators, but if an overflow occurs it will set Allegro's errno and clamp the result, rather than just letting it wrap.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed result;
@@ -305,7 +305,7 @@ assert(!al_get_errno()); <span class="co">/* This will fail. */</span></code></p
 <p>Angles are represented in a binary format with 256 equal to a full circle, 64 being a right angle and so on. This has the advantage that a simple bitwise 'and' can be used to keep the angle within the range zero to a full circle.</p>
 <h2 id="al_fixtorad_r"><a href="#al_fixtorad_r">al_fixtorad_r</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> al_fixed al_fixtorad_r = (al_fixed)<span class="dv">1608</span>;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L290">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L290">Source Code</a></p>
 <p>This constant gives a ratio which can be used to convert a fixed point number in binary angle format to a fixed point number in radians.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed rad_angle, binary_angle;
@@ -318,7 +318,7 @@ rad_angle = al_fixmul(binary_angle, al_fixtorad_r);</code></pre>
 <p>See also: <a href="fixed.html#al_fixmul">al_fixmul</a>, <a href="fixed.html#al_radtofix_r">al_radtofix_r</a>.</p>
 <h2 id="al_radtofix_r"><a href="#al_radtofix_r">al_radtofix_r</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> al_fixed al_radtofix_r = (al_fixed)<span class="dv">2670177</span>;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L298">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L298">Source Code</a></p>
 <p>This constant gives a ratio which can be used to convert a fixed point number in radians to a fixed point number in binary angle format.</p>
 <p>Example:</p>
 <pre><code>    al_fixed rad_angle, binary_angle;
@@ -327,7 +327,7 @@ rad_angle = al_fixmul(binary_angle, al_fixtorad_r);</code></pre>
 <p>See also: <a href="fixed.html#al_fixmul">al_fixmul</a>, <a href="fixed.html#al_fixtorad_r">al_fixtorad_r</a>.</p>
 <h2 id="al_fixsin"><a href="#al_fixsin">al_fixsin</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixsin(al_fixed x);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L376">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L376">Source Code</a></p>
 <p>This function finds the sine of a value using a lookup table. The input value must be a fixed point binary angle.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed angle;
@@ -342,7 +342,7 @@ assert(result == <span class="dv">1</span>);</code></pre>
 <p>Return value: Returns the sine of a fixed point binary format angle as a fixed point value.</p>
 <h2 id="al_fixcos"><a href="#al_fixcos">al_fixcos</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixcos(al_fixed x);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L372">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L372">Source Code</a></p>
 <p>This function finds the cosine of a value using a lookup table. The input value must be a fixed point binary angle.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed angle;
@@ -357,7 +357,7 @@ assert(result > <span class="fl">0.7</span> && result < <span clas
 <p>Return value: Returns the cosine of a fixed point binary format angle as a fixed point value.</p>
 <h2 id="al_fixtan"><a href="#al_fixtan">al_fixtan</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixtan(al_fixed x);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L380">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L380">Source Code</a></p>
 <p>This function finds the tangent of a value using a lookup table. The input value must be a fixed point binary angle.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed angle, res_a, res_b;
@@ -372,7 +372,7 @@ printf(<span class="st">"Precision error: %f</span><span class="ch">\n</spa
 <p>Return value: Returns the tangent of a fixed point binary format angle as a fixed point value.</p>
 <h2 id="al_fixasin"><a href="#al_fixasin">al_fixasin</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixasin(al_fixed x);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L388">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L388">Source Code</a></p>
 <p>This function finds the inverse sine of a value using a lookup table. The input value must be a fixed point value. The inverse sine is defined only in the domain from -1 to 1. Outside of this input range, the function will set Allegro's errno to EDOM and return zero.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> angle;
@@ -390,7 +390,7 @@ assert(!al_get_errno());</code></pre>
 <p>Return value: Returns the inverse sine of a fixed point value, measured as fixed point binary format angle, or zero if the input was out of the range. All return values of this function will be in the range -64 to 64.</p>
 <h2 id="al_fixacos"><a href="#al_fixacos">al_fixacos</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixacos(al_fixed x);</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L384">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L384">Source Code</a></p>
 <p>This function finds the inverse cosine of a value using a lookup table. The input must be a fixed point value. The inverse cosine is defined only in the domain from -1 to 1. Outside of this input range, the function will set Allegro's errno to EDOM and return zero.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed result;
@@ -400,7 +400,7 @@ result = al_fixacos(al_itofix(-<span class="dv">1</span>));</code></pre>
 <p>Return value: Returns the inverse sine of a fixed point value, measured as fixed point binary format angle, or zero if the input was out of range. All return values of this function will be in the range 0 to 128.</p>
 <h2 id="al_fixatan"><a href="#al_fixatan">al_fixatan</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixatan(al_fixed x)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L215">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L215">Source Code</a></p>
 <p>This function finds the inverse tangent of a value using a lookup table. The input must be a fixed point value. The inverse tangent is the value whose tangent is <code>x</code>.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed result;
@@ -410,7 +410,7 @@ result = al_fixatan(al_ftofix(<span class="fl">0.326</span>));</code></pre>
 <p>Return value: Returns the inverse tangent of a fixed point value, measured as a fixed point binary format angle.</p>
 <h2 id="al_fixatan2"><a href="#al_fixatan2">al_fixatan2</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixatan2(al_fixed y, al_fixed x)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L252">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L252">Source Code</a></p>
 <p>This is a fixed point version of the libc atan2() routine. It computes the arc tangent of <code>y / x</code>, but the signs of both arguments are used to determine the quadrant of the result, and <code>x</code> is permitted to be zero. This function is useful to convert Cartesian coordinates to polar coordinates.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed result;
@@ -427,15 +427,15 @@ assert(!al_get_errno());</code></pre>
 <p>Return value: Returns the arc tangent of <code>y / x</code> in fixed point binary format angle, from -128 to 128. If both <code>x</code> and <code>y</code> are zero, returns zero and sets Allegro's errno to EDOM.</p>
 <h2 id="al_fixsqrt"><a href="#al_fixsqrt">al_fixsqrt</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixsqrt(al_fixed x)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L305">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L305">Source Code</a></p>
 <p>This finds out the non negative square root of <code>x</code>. If <code>x</code> is negative, Allegro's errno is set to EDOM and the function returns zero.</p>
 <h2 id="al_fixhypot"><a href="#al_fixhypot">al_fixhypot</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">al_fixed al_fixhypot(al_fixed x, al_fixed y)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/math.c#L321">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/math.c#L321">Source Code</a></p>
 <p>Fixed point hypotenuse (returns the square root of <code>x*x + y*y</code>). This should be better than calculating the formula yourself manually, since the error is much smaller.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:39 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:57 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/font.html b/docs/html/refman/font.html
index dd52921..d678992 100644
--- a/docs/html/refman/font.html
+++ b/docs/html/refman/font.html
@@ -119,6 +119,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <ul>
 <li><a href="#general-font-routines">General font routines</a><ul>
 <li><a href="#allegro_font">ALLEGRO_FONT</a></li>
+<li><a href="#allegro_glyph">ALLEGRO_GLYPH</a></li>
 <li><a href="#al_init_font_addon">al_init_font_addon</a></li>
 <li><a href="#al_shutdown_font_addon">al_shutdown_font_addon</a></li>
 <li><a href="#al_load_font">al_load_font</a></li>
@@ -169,6 +170,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="#al_load_ttf_font_stretch">al_load_ttf_font_stretch</a></li>
 <li><a href="#al_load_ttf_font_stretch_f">al_load_ttf_font_stretch_f</a></li>
 <li><a href="#al_get_allegro_ttf_version">al_get_allegro_ttf_version</a></li>
+<li><a href="#al_get_glyph">al_get_glyph</a></li>
 </ul></li>
 </ul>
 </div>
@@ -177,11 +179,35 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="general-font-routines"><a href="#general-font-routines">General font routines</a></h1>
 <h2 id="allegro_font"><a href="#allegro_font">ALLEGRO_FONT</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_FONT ALLEGRO_FONT;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/allegro5/allegro_font.h#L48">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/allegro5/allegro_font.h#L48">Source Code</a></p>
 <p>A handle identifying any kind of font. Usually you will create it with <a href="font.html#al_load_font">al_load_font</a> which supports loading all kinds of TrueType fonts supported by the FreeType library. If you instead pass the filename of a bitmap file, it will be loaded with <a href="graphics.html#al_load_bitmap">al_load_bitmap</a> and a font in Allegro's bitmap font format will be created from it with <a href="font.html#al_grab_font_from_bitmap">al_grab_font_from_bitmap</a>.</p>
+<h2 id="allegro_glyph"><a href="#allegro_glyph">ALLEGRO_GLYPH</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_GLYPH ALLEGRO_GLYPH;</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/allegro5/allegro_font.h#L53">Source Code</a></p>
+<p>A structure containing the properties of a character in a font.</p>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_GLYPH {
+   ALLEGRO_BITMAP *bitmap;   <span class="co">// the bitmap the character is on</span>
+   <span class="dt">int</span> x;                    <span class="co">// the x position of the glyph on bitmap</span>
+   <span class="dt">int</span> y;                    <span class="co">// the y position of the glyph on bitmap</span>
+   <span class="dt">int</span> w;                    <span class="co">// the width of the glyph in pixels</span>
+   <span class="dt">int</span> h;                    <span class="co">// the height of the glyph in pixels</span>
+   <span class="dt">int</span> kerning;              <span class="co">// pixels of kerning (see below)</span>
+   <span class="dt">int</span> offset_x;             <span class="co">// x offset to draw the glyph at</span>
+   <span class="dt">int</span> offset_y;             <span class="co">// y offset to draw the glyph at</span>
+   <span class="dt">int</span> advance;              <span class="co">// number of pixels to advance after this character</span>
+} ALLEGRO_GLYPH;</code></pre>
+<p>bitmap may be a sub-bitmap in the case of color fonts.</p>
+<p>kerning should be added to the x position you draw to if you want your text kerned and depends on which codepoints <a href="font.html#al_get_glyph">al_get_glyph</a> was called with.</p>
+<p>Glyphs are tightly packed onto the bitmap, so you need to add offset_x and offset_y to your draw position for the text to look right.</p>
+<p>advance is the number of pixels to add to your x position to advance to the next character in a string and includes kerning.</p>
+<p>Since: 5.2.1</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This API is new and subject to refinement.</p>
+</blockquote>
+<p>See also: <a href="font.html#al_get_glyph">al_get_glyph</a></p>
 <h2 id="al_init_font_addon"><a href="#al_init_font_addon">al_init_font_addon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_init_font_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/font.c#L342">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/font.c#L365">Source Code</a></p>
 <p>Initialise the font addon.</p>
 <p>Note that if you intend to load bitmap fonts, you will need to initialise allegro_image separately (unless you are using another library to load images).</p>
 <p>Similarly, if you wish to load truetype-fonts, do not forget to also call <a href="font.html#al_init_ttf_addon">al_init_ttf_addon</a>.</p>
@@ -189,24 +215,24 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="image.html#al_init_image_addon">al_init_image_addon</a>, <a href="font.html#al_init_ttf_addon">al_init_ttf_addon</a>, <a href="font.html#al_shutdown_font_addon">al_shutdown_font_addon</a></p>
 <h2 id="al_shutdown_font_addon"><a href="#al_shutdown_font_addon">al_shutdown_font_addon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_shutdown_font_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/font.c#L366">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/font.c#L389">Source Code</a></p>
 <p>Shut down the font addon. This is done automatically at program exit, but can be called any time the user wishes as well.</p>
 <p>See also: <a href="font.html#al_init_font_addon">al_init_font_addon</a></p>
 <h2 id="al_load_font"><a href="#al_load_font">al_load_font</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FONT *al_load_font(<span class="dt">char</span> <span class="dt">const</span> *filename, <span class="dt">int</span> size, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/font.c#L414">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/font.c#L437">Source Code</a></p>
 <p>Loads a font from disk. This will use <a href="font.html#al_load_bitmap_font_flags">al_load_bitmap_font_flags</a> if you pass the name of a known bitmap format, or else <a href="font.html#al_load_ttf_font">al_load_ttf_font</a>.</p>
 <p>The flags parameter is passed through to either of those functions. Bitmap and TTF fonts are also affected by the current <a href="graphics.html#al_set_new_bitmap_flags">bitmap flags</a> at the time the font is loaded.</p>
 <p>See also: <a href="font.html#al_destroy_font">al_destroy_font</a>, <a href="font.html#al_init_font_addon">al_init_font_addon</a>, <a href="font.html#al_register_font_loader">al_register_font_loader</a>, <a href="font.html#al_load_bitmap_font_flags">al_load_bitmap_font_flags</a>, <a href="font.html#al_load_ttf_font">al_load_ttf_font</a></p>
 <h2 id="al_destroy_font"><a href="#al_destroy_font">al_destroy_font</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_font(ALLEGRO_FONT *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L357">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L358">Source Code</a></p>
 <p>Frees the memory being used by a font structure. Does nothing if passed NULL.</p>
 <p>See also: <a href="font.html#al_load_font">al_load_font</a></p>
 <h2 id="al_register_font_loader"><a href="#al_register_font_loader">al_register_font_loader</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_font_loader(<span class="dt">char</span> <span class="dt">const</span> *extension,
    ALLEGRO_FONT *(*load_font)(<span class="dt">char</span> <span class="dt">const</span> *filename, <span class="dt">int</span> size, <span class="dt">int</span> flags))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/font.c#L390">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/font.c#L413">Source Code</a></p>
 <p>Informs Allegro of a new font file type, telling it how to load files of this format.</p>
 <p>The <code>extension</code> should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>load_font</code> argument may be NULL to unregister an entry.</p>
@@ -214,7 +240,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="font.html#al_init_font_addon">al_init_font_addon</a></p>
 <h2 id="al_get_font_line_height"><a href="#al_get_font_line_height">al_get_font_line_height</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_font_line_height(<span class="dt">const</span> ALLEGRO_FONT *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L297">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L298">Source Code</a></p>
 <p>Returns the usual height of a line of text in the specified font. For bitmap fonts this is simply the height of all glyph bitmaps. For truetype fonts it is whatever the font file specifies. In particular, some special glyphs may be higher than the height returned here.</p>
 <p>If the X is the position you specify to draw text, the meaning of ascent and descent and the line height is like in the figure below.</p>
 <pre><code>X------------------------
@@ -231,29 +257,29 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="font.html#al_get_text_width">al_get_text_width</a>, <a href="font.html#al_get_text_dimensions">al_get_text_dimensions</a></p>
 <h2 id="al_get_font_ascent"><a href="#al_get_font_ascent">al_get_font_ascent</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_font_ascent(<span class="dt">const</span> ALLEGRO_FONT *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L307">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L308">Source Code</a></p>
 <p>Returns the ascent of the specified font.</p>
 <p>See also: <a href="font.html#al_get_font_descent">al_get_font_descent</a>, <a href="font.html#al_get_font_line_height">al_get_font_line_height</a></p>
 <h2 id="al_get_font_descent"><a href="#al_get_font_descent">al_get_font_descent</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_font_descent(<span class="dt">const</span> ALLEGRO_FONT *f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L317">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L318">Source Code</a></p>
 <p>Returns the descent of the specified font.</p>
 <p>See also: <a href="font.html#al_get_font_ascent">al_get_font_ascent</a>, <a href="font.html#al_get_font_line_height">al_get_font_line_height</a></p>
 <h2 id="al_get_text_width"><a href="#al_get_text_width">al_get_text_width</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_text_width(<span class="dt">const</span> ALLEGRO_FONT *f, <span class="dt">const</span> <span class="dt">char</span> *str)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L281">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L282">Source Code</a></p>
 <p>Calculates the length of a string in a particular font, in pixels.</p>
 <p>See also: <a href="font.html#al_get_ustr_width">al_get_ustr_width</a>, <a href="font.html#al_get_font_line_height">al_get_font_line_height</a>, <a href="font.html#al_get_text_dimensions">al_get_text_dimensions</a></p>
 <h2 id="al_get_ustr_width"><a href="#al_get_ustr_width">al_get_ustr_width</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_ustr_width(<span class="dt">const</span> ALLEGRO_FONT *f, ALLEGRO_USTR <span class="dt">const</span> *ustr)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L269">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L270">Source Code</a></p>
 <p>Like <a href="font.html#al_get_text_width">al_get_text_width</a> but expects an ALLEGRO_USTR.</p>
 <p>See also: <a href="font.html#al_get_text_width">al_get_text_width</a>, <a href="font.html#al_get_ustr_dimensions">al_get_ustr_dimensions</a></p>
 <h2 id="al_draw_text"><a href="#al_draw_text">al_draw_text</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_text(<span class="dt">const</span> ALLEGRO_FONT *font,
    ALLEGRO_COLOR color, <span class="dt">float</span> x, <span class="dt">float</span> y, <span class="dt">int</span> flags,
    <span class="dt">char</span> <span class="dt">const</span> *text) </code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L101">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L102">Source Code</a></p>
 <p>Writes the NUL-terminated string <code>text</code> onto the target bitmap at position <code>x</code>, <code>y</code>, using the specified <code>font</code>.</p>
 <p>The <code>flags</code> parameter can be 0 or one of the following flags:</p>
 <ul>
@@ -271,14 +297,14 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_ustr(<span class="dt">const</span> ALLEGRO_FONT *font,
    ALLEGRO_COLOR color, <span class="dt">float</span> x, <span class="dt">float</span> y, <span class="dt">int</span> flags,
    <span class="dt">const</span> ALLEGRO_USTR *ustr) </code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L74">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L75">Source Code</a></p>
 <p>Like <a href="font.html#al_draw_text">al_draw_text</a>, except the text is passed as an ALLEGRO_USTR instead of a NUL-terminated char array.</p>
 <p>See also: <a href="font.html#al_draw_text">al_draw_text</a>, <a href="font.html#al_draw_justified_ustr">al_draw_justified_ustr</a>, <a href="font.html#al_draw_multiline_ustr">al_draw_multiline_ustr</a></p>
 <h2 id="al_draw_justified_text"><a href="#al_draw_justified_text">al_draw_justified_text</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_justified_text(<span class="dt">const</span> ALLEGRO_FONT *font,
    ALLEGRO_COLOR color, <span class="dt">float</span> x1, <span class="dt">float</span> x2,
    <span class="dt">float</span> y, <span class="dt">float</span> diff, <span class="dt">int</span> flags, <span class="dt">const</span> <span class="dt">char</span> *text)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L199">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L200">Source Code</a></p>
 <p>Like <a href="font.html#al_draw_text">al_draw_text</a>, but justifies the string to the region x1-x2.</p>
 <p>The <code>diff</code> parameter is the maximum amount of horizontal space to allow between words. If justisfying the text would exceed <code>diff</code> pixels, or the string contains less than two words, then the string will be drawn left aligned.</p>
 <p>The <code>flags</code> parameter can be 0 or one of the following flags:</p>
@@ -290,28 +316,28 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_justified_ustr(<span class="dt">const</span> ALLEGRO_FONT *font,
    ALLEGRO_COLOR color, <span class="dt">float</span> x1, <span class="dt">float</span> x2,
    <span class="dt">float</span> y, <span class="dt">float</span> diff, <span class="dt">int</span> flags, <span class="dt">const</span> ALLEGRO_USTR *ustr)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L114">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L115">Source Code</a></p>
 <p>Like <a href="font.html#al_draw_justified_text">al_draw_justified_text</a>, except the text is passed as an ALLEGRO_USTR instead of a NUL-terminated char array.</p>
 <p>See also: <a href="font.html#al_draw_justified_text">al_draw_justified_text</a>, <a href="font.html#al_draw_justified_textf">al_draw_justified_textf</a>.</p>
 <h2 id="al_draw_textf"><a href="#al_draw_textf">al_draw_textf</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_textf(<span class="dt">const</span> ALLEGRO_FONT *font, ALLEGRO_COLOR color,
    <span class="dt">float</span> x, <span class="dt">float</span> y, <span class="dt">int</span> flags,
    <span class="dt">const</span> <span class="dt">char</span> *format, ...)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L212">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L213">Source Code</a></p>
 <p>Formatted text output, using a printf() style format string. All parameters have the same meaning as with <a href="font.html#al_draw_text">al_draw_text</a> otherwise.</p>
 <p>See also: <a href="font.html#al_draw_text">al_draw_text</a>, <a href="font.html#al_draw_ustr">al_draw_ustr</a></p>
 <h2 id="al_draw_justified_textf"><a href="#al_draw_justified_textf">al_draw_justified_textf</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_justified_textf(<span class="dt">const</span> ALLEGRO_FONT *f,
    ALLEGRO_COLOR color, <span class="dt">float</span> x1, <span class="dt">float</span> x2, <span class="dt">float</span> y,
    <span class="dt">float</span> diff, <span class="dt">int</span> flags, <span class="dt">const</span> <span class="dt">char</span> *format, ...)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L245">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L246">Source Code</a></p>
 <p>Formatted text output, using a printf() style format string. All parameters have the same meaning as with <a href="font.html#al_draw_justified_text">al_draw_justified_text</a> otherwise.</p>
 <p>See also: <a href="font.html#al_draw_justified_text">al_draw_justified_text</a>, <a href="font.html#al_draw_justified_ustr">al_draw_justified_ustr</a>.</p>
 <h2 id="al_get_text_dimensions"><a href="#al_get_text_dimensions">al_get_text_dimensions</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_text_dimensions(<span class="dt">const</span> ALLEGRO_FONT *f,
    <span class="dt">char</span> <span class="dt">const</span> *text,
    <span class="dt">int</span> *bbx, <span class="dt">int</span> *bby, <span class="dt">int</span> *bbw, <span class="dt">int</span> *bbh)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L341">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L342">Source Code</a></p>
 <p>Sometimes, the <a href="font.html#al_get_text_width">al_get_text_width</a> and <a href="font.html#al_get_font_line_height">al_get_font_line_height</a> functions are not enough for exact text placement, so this function returns some additional information.</p>
 <p>Returned variables (all in pixels):</p>
 <ul>
@@ -324,16 +350,16 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_ustr_dimensions(<span class="dt">const</span> ALLEGRO_FONT *f,
    ALLEGRO_USTR <span class="dt">const</span> *ustr,
    <span class="dt">int</span> *bbx, <span class="dt">int</span> *bby, <span class="dt">int</span> *bbw, <span class="dt">int</span> *bbh)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L327">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L328">Source Code</a></p>
 <p>Like <a href="font.html#al_get_text_dimensions">al_get_text_dimensions</a>, except the text is passed as an ALLEGRO_USTR instead of a NUL-terminated char array.</p>
 <p>See also: <a href="font.html#al_get_text_dimensions">al_get_text_dimensions</a></p>
 <h2 id="al_get_allegro_font_version"><a href="#al_get_allegro_font_version">al_get_allegro_font_version</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_font_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/font.c#L459">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/font.c#L482">Source Code</a></p>
 <p>Returns the (compiled) version of the addon, in the same format as <a href="system.html#al_get_allegro_version">al_get_allegro_version</a>.</p>
 <h2 id="al_get_font_ranges"><a href="#al_get_font_ranges">al_get_font_ranges</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_font_ranges(ALLEGRO_FONT *f, <span class="dt">int</span> ranges_count, <span class="dt">int</span> *ranges)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L370">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L371">Source Code</a></p>
 <p>Gets information about all glyphs contained in a font, as a list of ranges. Ranges have the same format as with <a href="font.html#al_grab_font_from_bitmap">al_grab_font_from_bitmap</a>.</p>
 <p><code>ranges_count</code> is the maximum number of ranges that will be returned.</p>
 <p><code>ranges</code> should be an array with room for <code>ranges_count</code> * 2 elements. The even integers are the first unicode point in a range, the odd integers the last unicode point in a range.</p>
@@ -342,13 +368,13 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="font.html#al_grab_font_from_bitmap">al_grab_font_from_bitmap</a></p>
 <h2 id="al_set_fallback_font"><a href="#al_set_fallback_font">al_set_fallback_font</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_fallback_font(ALLEGRO_FONT *font, ALLEGRO_FONT *fallback)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L689">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L696">Source Code</a></p>
 <p>Sets a font which is used instead if a character is not present. Can be chained, but make sure there is no loop as that would crash the application! Pass NULL to remove a fallback font again.</p>
 <p>Since: 5.1.12</p>
 <p>See also: <a href="font.html#al_get_fallback_font">al_get_fallback_font</a>, <a href="font.html#al_draw_glyph">al_draw_glyph</a>, <a href="font.html#al_draw_text">al_draw_text</a></p>
 <h2 id="al_get_fallback_font"><a href="#al_get_fallback_font">al_get_fallback_font</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FONT *al_get_fallback_font(ALLEGRO_FONT *font)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L696">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L703">Source Code</a></p>
 <p>Retrieves the fallback font for this font or NULL.</p>
 <p>Since: 5.1.12</p>
 <p>See also: <a href="font.html#al_set_fallback_font">al_set_fallback_font</a></p>
@@ -359,7 +385,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h2 id="al_draw_glyph"><a href="#al_draw_glyph">al_draw_glyph</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_glyph(<span class="dt">const</span> ALLEGRO_FONT *f, ALLEGRO_COLOR color, <span class="dt">float</span> x, <span class="dt">float</span> y,
    <span class="dt">int</span> codepoint)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L377">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L378">Source Code</a></p>
 <p>Draws the glyph that corresponds with <code>codepoint</code> in the given <code>color</code> using the given <code>font</code>. If <code>font</code> does not have such a glyph, nothing will be drawn.</p>
 <p>To draw a string as left to right horizontal text you will need to use <a href="font.html#al_get_glyph_advance">al_get_glyph_advance</a> to determine the position of each glyph. For drawing strings in other directions, such as top to down, use <a href="font.html#al_get_glyph_dimensions">al_get_glyph_dimensions</a> to determine the size and position of each glyph.</p>
 <p>If you have to draw many glyphs at the same time, use <a href="graphics.html#al_hold_bitmap_drawing">al_hold_bitmap_drawing</a> with true as the parameter, before drawing the glyphs, and then call <a href="graphics.html#al_hold_bitmap_drawing">al_hold_bitmap_drawing</a> again with false as a parameter when done drawing the glyphs to further enhance performance.</p>
@@ -367,14 +393,14 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="font.html#al_get_glyph_width">al_get_glyph_width</a>, <a href="font.html#al_get_glyph_dimensions">al_get_glyph_dimensions</a>, <a href="font.html#al_get_glyph_advance">al_get_glyph_advance</a>.</p>
 <h2 id="al_get_glyph_width"><a href="#al_get_glyph_width">al_get_glyph_width</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_glyph_width(<span class="dt">const</span> ALLEGRO_FONT *f, <span class="dt">int</span> codepoint)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L385">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L386">Source Code</a></p>
 <p>This function returns the width in pixels of the glyph that corresponds with <code>codepoint</code> in the font <code>font</code>. Returns zero if the font does not have such a glyph.</p>
 <p>Since: 5.1.12</p>
 <p>See also: <a href="font.html#al_draw_glyph">al_draw_glyph</a>, <a href="font.html#al_get_glyph_dimensions">al_get_glyph_dimensions</a>, <a href="font.html#al_get_glyph_advance">al_get_glyph_advance</a>.</p>
 <h2 id="al_get_glyph_dimensions"><a href="#al_get_glyph_dimensions">al_get_glyph_dimensions</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_glyph_dimensions(<span class="dt">const</span> ALLEGRO_FONT *f,
    <span class="dt">int</span> codepoint, <span class="dt">int</span> *bbx, <span class="dt">int</span> *bby, <span class="dt">int</span> *bbw, <span class="dt">int</span> *bbh)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L392">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L393">Source Code</a></p>
 <p>Sometimes, the <a href="font.html#al_get_glyph_width">al_get_glyph_width</a> or <a href="font.html#al_get_glyph_advance">al_get_glyph_advance</a> functions are not enough for exact glyph placement, so this function returns some additional information, particularly if you want to draw the font vertically.</p>
 <p>The function itself returns true if the character was present in <code>font</code> and false if the character was not present in <code>font</code>.</p>
 <p>Returned variables (all in pixel):</p>
@@ -409,16 +435,16 @@ bbh |   |    **  |       bbh +---+-------+
 <p>See also: <a href="font.html#al_draw_glyph">al_draw_glyph</a>, <a href="font.html#al_get_glyph_width">al_get_glyph_width</a>, <a href="font.html#al_get_glyph_advance">al_get_glyph_advance</a>.</p>
 <h2 id="al_get_glyph_advance"><a href="#al_get_glyph_advance">al_get_glyph_advance</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_glyph_advance(<span class="dt">const</span> ALLEGRO_FONT *f, <span class="dt">int</span> codepoint1, <span class="dt">int</span> codepoint2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L400">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L401">Source Code</a></p>
 <p>This function returns by how much the x position should be advanced for left to right text drawing when the glyph that corresponds to codepoint1 has been drawn, and the glyph that corresponds to codepoint2 will be the next to be drawn. This takes into consideration the horizontal advance width of the glyph that corresponds with codepoint1 as well as the kerning between the glyphs of codepoint1 and codepoint2.</p>
 <p>Kerning is the process of adjusting the spacing between glyphs in a font, to obtain a more visually pleasing result. Kerning adjusts the space between two individual glyphs with an offset determined by the author of the font.</p>
-<p>If you pass ALLEGRO_NO_KERNING as codepoint1 then al_get_glyph_advance will return 0. this cn be useful when drawing the first character of a string in a loop.</p>
+<p>If you pass ALLEGRO_NO_KERNING as codepoint1 then al_get_glyph_advance will return 0. this can be useful when drawing the first character of a string in a loop.</p>
 <p>Pass ALLEGRO_NO_KERNING as codepoint2 to get the horizontal advance width of the glyph that corresponds to codepoint1 without taking any kerning into consideration. This can be used, for example, when drawing the last character of a string in a loop.</p>
 <p>This function will return zero if the glyph of codepoint1 is not present in the <code>font</code>. If the glyph of codepoint2 is not present in the font, the horizontal advance width of the glyph that corresponds to codepoint1 without taking any kerning into consideration is returned.</p>
 <p>When drawing a string one glyph at the time from the left to the right with kerning, the x position of the glyph should be incremented by the result of <a href="font.html#al_get_glyph_advance">al_get_glyph_advance</a> applied to the previous glyph drawn and the next glyph to draw.</p>
 <p>Note that the return value of this function is a recommended advance for optimal readability for left to right text determined by the author of the font. However, if you like, you may want to draw the glyphs of the font narrower or wider to each other than what <a href="font.html#al_get_glyph_advance">al_get_glyph_advance</a> returns for style or effect.</p>
 <p>In the figure below is an example of what the result of al_get_glyph_advance may be like for two glypphs <code>A</code> and <code>l</code> of the same font that has kerning for the "Al" pair, without and with the ALLEGRO_NO_KERNING flag.</p>
-<pre><code>al_get_glyph_advance(font, 'A', 'l', 0)
+<pre><code>al_get_glyph_advance(font, 'A', 'l')
      ___|___                  
     /       \  
     -------------            
@@ -430,7 +456,7 @@ bbh |   |    **  |       bbh +---+-------+
     -------------
     
     
-al_get_glyph_advance(font, 'A', 'l', ALLEGRO_NO_KERNING)    
+al_get_glyph_advance(font, 'A', ALLEGRO_NO_KERNING)
      ____|____
     /         \  
     ---------------
@@ -447,7 +473,7 @@ al_get_glyph_advance(font, 'A', 'l', ALLEGRO_NO_KERNING)
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_multiline_text(<span class="dt">const</span> ALLEGRO_FONT *font,
      ALLEGRO_COLOR color, <span class="dt">float</span> x, <span class="dt">float</span> y, <span class="dt">float</span> max_width, <span class="dt">float</span> line_height,
      <span class="dt">int</span> flags, <span class="dt">const</span> <span class="dt">char</span> *text)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L650">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L657">Source Code</a></p>
 <p>Like <a href="font.html#al_draw_text">al_draw_text</a>, but this function supports drawing multiple lines of text. It will break <code>text</code> in lines based on its contents and the <code>max_width</code> parameter. The lines are then layed out vertically depending on the <code>line_height</code> parameter and drawn each as if <a href="font.html#al_draw_text">al_draw_text</a> was called on them.</p>
 <p>A newline <code>\n</code> in the <code>text</code> will cause a "hard" line break after its occurrence in the string. The text after a hard break is placed on a new line. Carriage return <code>\r</code> is not supported, will not cause a line break, and will likely be drawn as a square or a space depending on the font.</p>
 <p>The <code>max_width</code> parameter controls the maximum desired width of the lines. This function will try to introduce a "soft" line break after the longest possible series of words that will fit in <code>max_length</code> when drawn with the given <code>font</code>. A "soft" line break can occur either on a space or tab (<code>\t</code>) character.</p>
@@ -461,7 +487,7 @@ al_get_glyph_advance(font, 'A', 'l', ALLEGRO_NO_KERNING)
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_multiline_ustr(<span class="dt">const</span> ALLEGRO_FONT *font,
      ALLEGRO_COLOR color, <span class="dt">float</span> x, <span class="dt">float</span> y, <span class="dt">float</span> max_width, <span class="dt">float</span> line_height,
      <span class="dt">int</span> flags, <span class="dt">const</span> ALLEGRO_USTR *ustr)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L623">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L630">Source Code</a></p>
 <p>Like <a href="font.html#al_draw_multiline_text">al_draw_multiline_text</a>, except the text is passed as an ALLEGRO_USTR instead of a NUL-terminated char array.</p>
 <p>Since: 5.1.9</p>
 <p>See also: <a href="font.html#al_draw_multiline_text">al_draw_multiline_text</a>, <a href="font.html#al_draw_multiline_textf">al_draw_multiline_textf</a>, <a href="font.html#al_do_multiline_text">al_do_multiline_text</a></p>
@@ -469,7 +495,7 @@ al_get_glyph_advance(font, 'A', 'l', ALLEGRO_NO_KERNING)
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_multiline_textf(<span class="dt">const</span> ALLEGRO_FONT *font,
      ALLEGRO_COLOR color, <span class="dt">float</span> x, <span class="dt">float</span> y, <span class="dt">float</span> max_width, <span class="dt">float</span> line_height,
      <span class="dt">int</span> flags, <span class="dt">const</span> <span class="dt">char</span> *format, ...)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L666">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L673">Source Code</a></p>
 <p>Formatted text output, using a printf() style format string. All parameters have the same meaning as with <a href="font.html#al_draw_multiline_text">al_draw_multiline_text</a> otherwise.</p>
 <p>Since: 5.1.9</p>
 <p>See also: <a href="font.html#al_draw_multiline_text">al_draw_multiline_text</a>, <a href="font.html#al_draw_multiline_ustr">al_draw_multiline_ustr</a>, <a href="font.html#al_do_multiline_text">al_do_multiline_text</a></p>
@@ -478,7 +504,7 @@ al_get_glyph_advance(font, 'A', 'l', ALLEGRO_NO_KERNING)
    <span class="dt">float</span> max_width, <span class="dt">const</span> <span class="dt">char</span> *text,
    bool (*cb)(<span class="dt">int</span> line_num, <span class="dt">const</span> <span class="dt">char</span> *line, <span class="dt">int</span> size, <span class="dt">void</span> *extra),
    <span class="dt">void</span> *extra)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L576">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L583">Source Code</a></p>
 <p>This function processes the <code>text</code> and splits it into lines as <a href="font.html#al_draw_multiline_text">al_draw_multiline_text</a> would, and then calls the callback <code>cb</code> once for every line. This is useful for custom drawing of multiline text, or for calculating the size of multiline text ahead of time. See the documentation on <a href="font.html#al_draw_multiline_text">al_draw_multiline_text</a> for an explanation of the splitting algorithm.</p>
 <p>For every line that this function splits <code>text</code> into the callback <code>cb</code> will be called once with the following parameters:</p>
 <ul>
@@ -496,7 +522,7 @@ al_get_glyph_advance(font, 'A', 'l', ALLEGRO_NO_KERNING)
    <span class="dt">const</span> ALLEGRO_USTR *ustr,
    bool (*cb)(<span class="dt">int</span> line_num, <span class="dt">const</span> ALLEGRO_USTR * line, <span class="dt">void</span> *extra),
    <span class="dt">void</span> *extra)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/text.c#L510">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L517">Source Code</a></p>
 <p>Like <a href="font.html#al_do_multiline_text">al_do_multiline_text</a>, but using ALLEGRO_USTR instead of a NUL-terminated char array for text.</p>
 <p>Since: 5.1.9</p>
 <p>See also: <a href="font.html#al_draw_multiline_ustr">al_draw_multiline_ustr</a></p>
@@ -504,7 +530,7 @@ al_get_glyph_advance(font, 'A', 'l', ALLEGRO_NO_KERNING)
 <h2 id="al_grab_font_from_bitmap"><a href="#al_grab_font_from_bitmap">al_grab_font_from_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FONT *al_grab_font_from_bitmap(ALLEGRO_BITMAP *bmp,
    <span class="dt">int</span> ranges_n, <span class="dt">const</span> <span class="dt">int</span> ranges[])</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/fontbmp.c#L202">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/fontbmp.c#L202">Source Code</a></p>
 <p>Creates a new font from an Allegro bitmap. You can delete the bitmap after the function returns as the font will contain a copy for itself.</p>
 <p>Parameters:</p>
 <ul>
@@ -538,19 +564,19 @@ al_grab_font_from_bitmap(bitmap, <span class="dv">4</span>, ranges)</code></pre>
 <p>See also: <a href="graphics.html#al_load_bitmap">al_load_bitmap</a>, <a href="font.html#al_grab_font_from_bitmap">al_grab_font_from_bitmap</a></p>
 <h2 id="al_load_bitmap_font"><a href="#al_load_bitmap_font">al_load_bitmap_font</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FONT *al_load_bitmap_font(<span class="dt">const</span> <span class="dt">char</span> *fname)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/fontbmp.c#L177">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/fontbmp.c#L177">Source Code</a></p>
 <p>Load a bitmap font from a file. This is done by first calling <a href="graphics.html#al_load_bitmap_flags">al_load_bitmap_flags</a> and then <a href="font.html#al_grab_font_from_bitmap">al_grab_font_from_bitmap</a>.</p>
 <p>If you wanted to load an old A4 font, for example, it would be better to load the bitmap yourself in order to call <a href="graphics.html#al_convert_mask_to_alpha">al_convert_mask_to_alpha</a> on it before passing it to <a href="font.html#al_grab_font_from_bitmap">al_grab_font_from_bitmap</a>.</p>
 <p>See also: <a href="font.html#al_load_bitmap_font_flags">al_load_bitmap_font_flags</a>, <a href="font.html#al_load_font">al_load_font</a>, <a href="graphics.html#al_load_bitmap_flags">al_load_bitmap_flags</a></p>
 <h2 id="al_load_bitmap_font_flags"><a href="#al_load_bitmap_font_flags">al_load_bitmap_font_flags</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FONT *al_load_bitmap_font_flags(<span class="dt">const</span> <span class="dt">char</span> *fname, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/fontbmp.c#L193">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/fontbmp.c#L193">Source Code</a></p>
 <p>Like <a href="font.html#al_load_bitmap_font">al_load_bitmap_font</a> but additionally takes a flags parameter which is a bitfield containing a combination of the following:</p>
 <p>ALLEGRO_NO_PREMULTIPLIED_ALPHA : The same meaning as for <a href="graphics.html#al_load_bitmap_flags">al_load_bitmap_flags</a>.</p>
 <p>See also: <a href="font.html#al_load_bitmap_font">al_load_bitmap_font</a>, <a href="graphics.html#al_load_bitmap_flags">al_load_bitmap_flags</a></p>
 <h2 id="al_create_builtin_font"><a href="#al_create_builtin_font">al_create_builtin_font</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FONT *al_create_builtin_font(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/font/stdfont.c#L442">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/stdfont.c#L442">Source Code</a></p>
 <p>Creates a monochrome bitmap font (8x8 pixels per character).</p>
 <p>This font is primarily intended to be used for displaying information in environments or during early runtime states where no external font data is available or loaded (e.g. for debugging).</p>
 <p>The builtin font contains the following unicode character ranges:</p>
@@ -567,16 +593,16 @@ al_grab_font_from_bitmap(bitmap, <span class="dv">4</span>, ranges)</code></pre>
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_ttf.h></span></code></pre>
 <h2 id="al_init_ttf_addon"><a href="#al_init_ttf_addon">al_init_ttf_addon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_init_ttf_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/ttf/ttf.c#L1046">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/ttf/ttf.c#L1097">Source Code</a></p>
 <p>Call this after <a href="font.html#al_init_font_addon">al_init_font_addon</a> to make <a href="font.html#al_load_font">al_load_font</a> recognize ".ttf" and other formats supported by <a href="font.html#al_load_ttf_font">al_load_ttf_font</a>.</p>
 <p>Returns true on success, false on failure.</p>
 <h2 id="al_shutdown_ttf_addon"><a href="#al_shutdown_ttf_addon">al_shutdown_ttf_addon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_shutdown_ttf_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/ttf/ttf.c#L1080">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/ttf/ttf.c#L1132">Source Code</a></p>
 <p>Unloads the ttf addon again. You normally don't need to call this.</p>
 <h2 id="al_load_ttf_font"><a href="#al_load_ttf_font">al_load_ttf_font</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FONT *al_load_ttf_font(<span class="dt">char</span> <span class="dt">const</span> *filename, <span class="dt">int</span> size, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/ttf/ttf.c#L921">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/ttf/ttf.c#L972">Source Code</a></p>
 <p>Loads a TrueType font from a file using the FreeType library. Quoting from the FreeType FAQ this means support for many different font formats:</p>
 <p><em>TrueType, OpenType, Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others</em></p>
 <p>The <code>size</code> parameter determines the size the font will be rendered at, specified in pixels. The standard font size is measured in <em>units per EM</em>, if you instead want to specify the size as the total height of glyphs in pixels, pass it as a negative value.</p>
@@ -593,7 +619,7 @@ al_grab_font_from_bitmap(bitmap, <span class="dv">4</span>, ranges)</code></pre>
 <h2 id="al_load_ttf_font_f"><a href="#al_load_ttf_font_f">al_load_ttf_font_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FONT *al_load_ttf_font_f(ALLEGRO_FILE *file,
     <span class="dt">char</span> <span class="dt">const</span> *filename, <span class="dt">int</span> size, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/ttf/ttf.c#L772">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/ttf/ttf.c#L823">Source Code</a></p>
 <p>Like <a href="font.html#al_load_ttf_font">al_load_ttf_font</a>, but the font is read from the file handle. The filename is only used to find possible additional files next to a font file.</p>
 <blockquote>
 <p><em>Note:</em> The file handle is owned by the returned ALLEGRO_FONT object and must not be freed by the caller, as FreeType expects to be able to read from it at a later time.</p>
@@ -601,7 +627,7 @@ al_grab_font_from_bitmap(bitmap, <span class="dv">4</span>, ranges)</code></pre>
 <h2 id="al_load_ttf_font_stretch"><a href="#al_load_ttf_font_stretch">al_load_ttf_font_stretch</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FONT *al_load_ttf_font_stretch(<span class="dt">char</span> <span class="dt">const</span> *filename, <span class="dt">int</span> w, <span class="dt">int</span> h,
    <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/ttf/ttf.c#L929">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/ttf/ttf.c#L980">Source Code</a></p>
 <p>Like <a href="font.html#al_load_ttf_font">al_load_ttf_font</a>, except it takes separate width and height parameters instead of a single size parameter.</p>
 <p>If the height is a positive value, and the width zero or positive, then font will be stretched according to those parameters. The width must not be negative if the height is positive.</p>
 <p>As with <a href="font.html#al_load_ttf_font">al_load_ttf_font</a>, 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.</p>
@@ -611,7 +637,7 @@ al_grab_font_from_bitmap(bitmap, <span class="dv">4</span>, ranges)</code></pre>
 <h2 id="al_load_ttf_font_stretch_f"><a href="#al_load_ttf_font_stretch_f">al_load_ttf_font_stretch_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FONT *al_load_ttf_font_stretch_f(ALLEGRO_FILE *file,
     <span class="dt">char</span> <span class="dt">const</span> *filename, <span class="dt">int</span> w, <span class="dt">int</span> h, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/ttf/ttf.c#L781">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/ttf/ttf.c#L832">Source Code</a></p>
 <p>Like <a href="font.html#al_load_ttf_font_stretch">al_load_ttf_font_stretch</a>, but the font is read from the file handle. The filename is only used to find possible additional files next to a font file.</p>
 <blockquote>
 <p><em>Note:</em> The file handle is owned by the returned ALLEGRO_FONT object and must not be freed by the caller, as FreeType expects to be able to read from it at a later time.</p>
@@ -620,11 +646,20 @@ al_grab_font_from_bitmap(bitmap, <span class="dv">4</span>, ranges)</code></pre>
 <p>See also: <a href="font.html#al_load_ttf_font_stretch">al_load_ttf_font_stretch</a></p>
 <h2 id="al_get_allegro_ttf_version"><a href="#al_get_allegro_ttf_version">al_get_allegro_ttf_version</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_ttf_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/ttf/ttf.c#L1097">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/ttf/ttf.c#L1149">Source Code</a></p>
 <p>Returns the (compiled) version of the addon, in the same format as <a href="system.html#al_get_allegro_version">al_get_allegro_version</a>.</p>
+<h2 id="al_get_glyph"><a href="#al_get_glyph">al_get_glyph</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c">bool al_get_glyph(<span class="dt">const</span> ALLEGRO_FONT *f, <span class="dt">int</span> prev_codepoint, <span class="dt">int</span> codepoint, ALLEGRO_GLYPH *glyph)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/font/text.c#L408">Source Code</a></p>
+<p>Gets all the information about a glyph, including the bitmap, needed to draw it yourself. prev_codepoint is the codepoint in the string before the one you want to draw and is used for kerning. codepoint is the character you want to get info about. You should clear the 'glyph' structure to 0 with memset before passing it to this function for future compatibility.</p>
+<p>Since: 5.2.1</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This API is new and subject to refinement.</p>
+</blockquote>
+<p>See also: <a href="font.html#allegro_glyph">ALLEGRO_GLYPH</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:44 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:01 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/fshook.html b/docs/html/refman/fshook.html
index 4f72f47..f24a1ef 100644
--- a/docs/html/refman/fshook.html
+++ b/docs/html/refman/fshook.html
@@ -156,11 +156,11 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>These functions allow access to the filesystem. This can either be the real filesystem like your harddrive, or a virtual filesystem like a .zip archive (or whatever else you or an addon makes it do).</p>
 <h1 id="allegro_fs_entry"><a href="#allegro_fs_entry">ALLEGRO_FS_ENTRY</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_FS_ENTRY ALLEGRO_FS_ENTRY;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/fshook.h#L37">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/fshook.h#L37">Source Code</a></p>
 <p>Opaque filesystem entry object. Represents a file or a directory (check with <a href="fshook.html#al_get_fs_entry_mode">al_get_fs_entry_mode</a>). There are no user accessible member variables.</p>
 <h1 id="allegro_file_mode"><a href="#allegro_file_mode">ALLEGRO_FILE_MODE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_FILE_MODE</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/fshook.h#L46">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/fshook.h#L46">Source Code</a></p>
 <p>Filesystem modes/types</p>
 <ul>
 <li>ALLEGRO_FILEMODE_READ - Readable</li>
@@ -172,16 +172,16 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </ul>
 <h1 id="al_create_fs_entry"><a href="#al_create_fs_entry">al_create_fs_entry</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FS_ENTRY *al_create_fs_entry(<span class="dt">const</span> <span class="dt">char</span> *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L28">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L28">Source Code</a></p>
 <p>Creates an <a href="fshook.html#allegro_fs_entry">ALLEGRO_FS_ENTRY</a> object pointing to path on the filesystem. 'path' can be a file or a directory and must not be NULL.</p>
 <h1 id="al_destroy_fs_entry"><a href="#al_destroy_fs_entry">al_destroy_fs_entry</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_fs_entry(ALLEGRO_FS_ENTRY *fh)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L38">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L38">Source Code</a></p>
 <p>Destroys a fs entry handle. The file or directory represented by it is not destroyed. If the entry was opened, it is closed before being destroyed.</p>
 <p>Does nothing if passed NULL.</p>
 <h1 id="al_get_fs_entry_name"><a href="#al_get_fs_entry_name">al_get_fs_entry_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_fs_entry_name(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L48">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L48">Source Code</a></p>
 <p>Returns the entry's filename path. Note that the filesystem encoding may not be known and the conversion to UTF-8 could in very rare cases cause this to return an invalid path. Therefore it's always safest to access the file over its <a href="fshook.html#allegro_fs_entry">ALLEGRO_FS_ENTRY</a> and not the path.</p>
 <p>On success returns a read only string which you must not modify or destroy. Returns NULL on failure.</p>
 <blockquote>
@@ -189,104 +189,104 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_update_fs_entry"><a href="#al_update_fs_entry">al_update_fs_entry</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_update_fs_entry(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L58">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L58">Source Code</a></p>
 <p>Updates file status information for a filesystem entry. File status information is automatically updated when the entry is created, however you may update it again with this function, e.g. in case it changed.</p>
 <p>Returns true on success, false on failure. Fills in errno to indicate the error.</p>
 <p>See also: <a href="state.html#al_get_errno">al_get_errno</a>, <a href="fshook.html#al_get_fs_entry_atime">al_get_fs_entry_atime</a>, <a href="fshook.html#al_get_fs_entry_ctime">al_get_fs_entry_ctime</a>, <a href="fshook.html#al_get_fs_entry_mode">al_get_fs_entry_mode</a></p>
 <h1 id="al_get_fs_entry_mode"><a href="#al_get_fs_entry_mode">al_get_fs_entry_mode</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_fs_entry_mode(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L68">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L68">Source Code</a></p>
 <p>Returns the entry's mode flags, i.e. permissions and whether the entry refers to a file or directory.</p>
 <p>See also: <a href="state.html#al_get_errno">al_get_errno</a>, <a href="fshook.html#allegro_file_mode">ALLEGRO_FILE_MODE</a></p>
 <h1 id="al_get_fs_entry_atime"><a href="#al_get_fs_entry_atime">al_get_fs_entry_atime</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">time_t al_get_fs_entry_atime(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L78">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L78">Source Code</a></p>
 <p>Returns the time in seconds since the epoch since the entry was last accessed.</p>
 <p>Warning: some filesystems either don't support this flag, or people turn it off to increase performance. It may not be valid in all circumstances.</p>
 <p>See also: <a href="fshook.html#al_get_fs_entry_ctime">al_get_fs_entry_ctime</a>, <a href="fshook.html#al_get_fs_entry_mtime">al_get_fs_entry_mtime</a>, <a href="fshook.html#al_update_fs_entry">al_update_fs_entry</a></p>
 <h1 id="al_get_fs_entry_ctime"><a href="#al_get_fs_entry_ctime">al_get_fs_entry_ctime</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">time_t al_get_fs_entry_ctime(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L98">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L98">Source Code</a></p>
 <p>Returns the time in seconds since the epoch this entry was created on the filesystem.</p>
 <p>See also: <a href="fshook.html#al_get_fs_entry_atime">al_get_fs_entry_atime</a>, <a href="fshook.html#al_get_fs_entry_mtime">al_get_fs_entry_mtime</a>, <a href="fshook.html#al_update_fs_entry">al_update_fs_entry</a></p>
 <h1 id="al_get_fs_entry_mtime"><a href="#al_get_fs_entry_mtime">al_get_fs_entry_mtime</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">time_t al_get_fs_entry_mtime(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L88">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L88">Source Code</a></p>
 <p>Returns the time in seconds since the epoch since the entry was last modified.</p>
 <p>See also: <a href="fshook.html#al_get_fs_entry_atime">al_get_fs_entry_atime</a>, <a href="fshook.html#al_get_fs_entry_ctime">al_get_fs_entry_ctime</a>, <a href="fshook.html#al_update_fs_entry">al_update_fs_entry</a></p>
 <h1 id="al_get_fs_entry_size"><a href="#al_get_fs_entry_size">al_get_fs_entry_size</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">off_t al_get_fs_entry_size(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L108">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L108">Source Code</a></p>
 <p>Returns the size, in bytes, of the given entry. May not return anything sensible for a directory entry.</p>
 <p>See also: <a href="fshook.html#al_update_fs_entry">al_update_fs_entry</a></p>
 <h1 id="al_fs_entry_exists"><a href="#al_fs_entry_exists">al_fs_entry_exists</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_fs_entry_exists(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L128">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L128">Source Code</a></p>
 <p>Check if the given entry exists on in the filesystem. Returns true if it does exist or false if it doesn't exist, or an error occurred. Error is indicated in Allegro's errno.</p>
 <p>See also: <a href="fshook.html#al_filename_exists">al_filename_exists</a></p>
 <h1 id="al_remove_fs_entry"><a href="#al_remove_fs_entry">al_remove_fs_entry</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_remove_fs_entry(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L118">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L118">Source Code</a></p>
 <p>Delete this filesystem entry from the filesystem. Only files and empty directories may be deleted.</p>
 <p>Returns true on success, and false on failure, error is indicated in Allegro's errno.</p>
 <p>See also: <a href="fshook.html#al_filename_exists">al_filename_exists</a></p>
 <h1 id="al_filename_exists"><a href="#al_filename_exists">al_filename_exists</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_filename_exists(<span class="dt">const</span> <span class="dt">char</span> *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L202">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L202">Source Code</a></p>
 <p>Check if the path exists on the filesystem, without creating an <a href="fshook.html#allegro_fs_entry">ALLEGRO_FS_ENTRY</a> object explicitly.</p>
 <p>See also: <a href="fshook.html#al_fs_entry_exists">al_fs_entry_exists</a></p>
 <h1 id="al_remove_filename"><a href="#al_remove_filename">al_remove_filename</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_remove_filename(<span class="dt">const</span> <span class="dt">char</span> *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L214">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L214">Source Code</a></p>
 <p>Delete the given path from the filesystem, which may be a file or an empty directory. This is the same as <a href="fshook.html#al_remove_fs_entry">al_remove_fs_entry</a>, except it expects the path as a string.</p>
 <p>Returns true on success, and false on failure. Allegro's errno is filled in to indicate the error.</p>
 <p>See also: <a href="fshook.html#al_remove_fs_entry">al_remove_fs_entry</a></p>
 <h1 id="directory-functions"><a href="#directory-functions">Directory functions</a></h1>
 <h2 id="al_open_directory"><a href="#al_open_directory">al_open_directory</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_open_directory(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L138">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L138">Source Code</a></p>
 <p>Opens a directory entry object. You must call this before using <a href="fshook.html#al_read_directory">al_read_directory</a> on an entry and you must call <a href="fshook.html#al_close_directory">al_close_directory</a> when you no longer need it.</p>
 <p>Returns true on success.</p>
 <p>See also: <a href="fshook.html#al_read_directory">al_read_directory</a>, <a href="fshook.html#al_close_directory">al_close_directory</a></p>
 <h2 id="al_read_directory"><a href="#al_read_directory">al_read_directory</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FS_ENTRY *al_read_directory(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L158">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L158">Source Code</a></p>
 <p>Reads the next directory item and returns a filesystem entry for it.</p>
 <p>Returns NULL if there are no more entries or if an error occurs. Call <a href="fshook.html#al_destroy_fs_entry">al_destroy_fs_entry</a> on the returned entry when you are done with it.</p>
 <p>This function will ignore any files or directories named <code>.</code> or <code>..</code> which may exist on certain platforms and may signify the current and the parent directory.</p>
 <p>See also: <a href="fshook.html#al_open_directory">al_open_directory</a>, <a href="fshook.html#al_close_directory">al_close_directory</a></p>
 <h2 id="al_close_directory"><a href="#al_close_directory">al_close_directory</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_close_directory(ALLEGRO_FS_ENTRY *e)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L148">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L148">Source Code</a></p>
 <p>Closes a previously opened directory entry object.</p>
 <p>Returns true on success, false on failure and fills in Allegro's errno to indicate the error.</p>
 <p>See also: <a href="fshook.html#al_open_directory">al_open_directory</a>, <a href="fshook.html#al_read_directory">al_read_directory</a></p>
 <h2 id="al_get_current_directory"><a href="#al_get_current_directory">al_get_current_directory</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> *al_get_current_directory(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L168">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L168">Source Code</a></p>
 <p>Returns the path to the current working directory, or NULL on failure. The returned path is dynamically allocated and must be destroyed with <a href="memory.html#al_free">al_free</a>.</p>
 <p>Allegro's errno is filled in to indicate the error if there is a failure. This function may not be implemented on some (virtual) filesystems.</p>
 <p>See also: <a href="state.html#al_get_errno">al_get_errno</a>, <a href="memory.html#al_free">al_free</a></p>
 <h2 id="al_change_directory"><a href="#al_change_directory">al_change_directory</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_change_directory(<span class="dt">const</span> <span class="dt">char</span> *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L178">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L178">Source Code</a></p>
 <p>Changes the current working directory to 'path'.</p>
 <p>Returns true on success, false on error.</p>
 <h2 id="al_make_directory"><a href="#al_make_directory">al_make_directory</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_make_directory(<span class="dt">const</span> <span class="dt">char</span> *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L190">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L190">Source Code</a></p>
 <p>Creates a new directory on the filesystem. This function also creates any parent directories as needed.</p>
 <p>Returns true on success (including if the directory already exists), otherwise returns false on error. Fills in Allegro's errno to indicate the error.</p>
 <p>See also: <a href="state.html#al_get_errno">al_get_errno</a></p>
 <h2 id="al_open_fs_entry"><a href="#al_open_fs_entry">al_open_fs_entry</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FILE *al_open_fs_entry(ALLEGRO_FS_ENTRY *e, <span class="dt">const</span> <span class="dt">char</span> *mode)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L226">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L226">Source Code</a></p>
 <p>Open an <a href="file.html#allegro_file">ALLEGRO_FILE</a> handle to a filesystem entry, for the given access mode. This is like calling <a href="file.html#al_fopen">al_fopen</a> with the name of the filesystem entry, but uses the appropriate file interface, not whatever was set with the latest call to <a href="file.html#al_set_new_file_interface">al_set_new_file_interface</a>.</p>
 <p>Returns the handle on success, NULL on error.</p>
 <p>See also: <a href="file.html#al_fopen">al_fopen</a></p>
 <h2 id="allegro_for_each_fs_entry_result"><a href="#allegro_for_each_fs_entry_result">ALLEGRO_FOR_EACH_FS_ENTRY_RESULT</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_FOR_EACH_FS_ENTRY_RESULT {</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/fshook.h#L124">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/fshook.h#L124">Source Code</a></p>
 <p>Return values for the callbacks of <a href="fshook.html#al_for_each_fs_entry">al_for_each_fs_entry</a> and for that function itself.</p>
 <ul>
 <li>ALLEGRO_FOR_EACH_FS_ENTRY_ERROR - An error ocurred.</li>
@@ -300,7 +300,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_for_each_fs_entry(ALLEGRO_FS_ENTRY *dir,
                          <span class="dt">int</span> (*callback)(ALLEGRO_FS_ENTRY *dir, <span class="dt">void</span> *extra),
                          <span class="dt">void</span> *extra)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fshook.c#L242">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fshook.c#L242">Source Code</a></p>
 <p>This function takes the <a href="fshook.html#allegro_fs_entry">ALLEGRO_FS_ENTRY</a> <code>dir</code>, which should represent a directory, and looks for any other file system entries that are in it. This function will then call the callback function <code>callback</code> once for every filesystem entry in the directory <code>dir</code>.</p>
 <p>The callback <code>callback</code> must be of type <code>int callback(ALLEGRO_FS_ENTRY * entry, void * extra)</code>. The <code>callback</code> will be called with a pointer to an <a href="fshook.html#allegro_fs_entry">ALLEGRO_FS_ENTRY</a> that matches one file or directory in <code>dir</code>, and the pointer passed in the <code>extra</code> parameter to <a href="fshook.html#al_for_each_fs_entry">al_for_each_fs_entry</a>.</p>
 <p>When <code>callback</code> returns <code>ALLEGRO_FOR_EACH_FS_ENTRY_STOP</code> or <code>ALLEGRO_FOR_EACH_FS_ENTRY_ERROR</code>, iteration will stop immediately and <a href="fshook.html#al_for_each_fs_entry">al_for_each_fs_entry</a> will return the value the <code>callback</code> returned.</p>
@@ -314,7 +314,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>By default, Allegro uses platform specific filesystem functions for things like directory access. However if for example the files of your game are not in the local filesystem but inside some file archive, you can provide your own set of functions (or use an addon which does this for you, for example our physfs addon allows access to the most common archive formats).</p>
 <h2 id="allegro_fs_interface"><a href="#allegro_fs_interface">ALLEGRO_FS_INTERFACE</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_FS_INTERFACE ALLEGRO_FS_INTERFACE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/fshook.h#L64">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/fshook.h#L64">Source Code</a></p>
 <p>The available functions you can provide for a filesystem. They are:</p>
 <pre><code>   ALLEGRO_FS_ENTRY *  fs_create_entry   (const char *path);
    void                fs_destroy_entry  (ALLEGRO_FS_ENTRY *e);
@@ -341,22 +341,22 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
    ALLEGRO_FILE *      fs_open_file(ALLEGRO_FS_ENTRY *e);</code></pre>
 <h2 id="al_set_fs_interface"><a href="#al_set_fs_interface">al_set_fs_interface</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_fs_interface(<span class="dt">const</span> ALLEGRO_FS_INTERFACE *fs_interface)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L881">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L882">Source Code</a></p>
 <p>Set the <a href="fshook.html#allegro_fs_interface">ALLEGRO_FS_INTERFACE</a> table for the calling thread.</p>
 <p>See also: <a href="fshook.html#al_set_standard_fs_interface">al_set_standard_fs_interface</a>, <a href="state.html#al_store_state">al_store_state</a>, <a href="state.html#al_restore_state">al_restore_state</a>.</p>
 <h2 id="al_set_standard_fs_interface"><a href="#al_set_standard_fs_interface">al_set_standard_fs_interface</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_standard_fs_interface(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L894">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L895">Source Code</a></p>
 <p>Return the <a href="fshook.html#allegro_fs_interface">ALLEGRO_FS_INTERFACE</a> table to the default, for the calling thread.</p>
 <p>See also: <a href="fshook.html#al_set_fs_interface">al_set_fs_interface</a>.</p>
 <h2 id="al_get_fs_interface"><a href="#al_get_fs_interface">al_get_fs_interface</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> ALLEGRO_FS_INTERFACE *al_get_fs_interface(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L864">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L865">Source Code</a></p>
 <p>Return a pointer to the <a href="fshook.html#allegro_fs_interface">ALLEGRO_FS_INTERFACE</a> table in effect for the calling thread.</p>
 <p>See also: <a href="state.html#al_store_state">al_store_state</a>, <a href="state.html#al_restore_state">al_restore_state</a>.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:39 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:57 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/fullscreen_mode.html b/docs/html/refman/fullscreen_mode.html
index a58bf41..e483392 100644
--- a/docs/html/refman/fullscreen_mode.html
+++ b/docs/html/refman/fullscreen_mode.html
@@ -126,7 +126,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="allegro_display_mode"><a href="#allegro_display_mode">ALLEGRO_DISPLAY_MODE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_DISPLAY_MODE</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/fullscreen_mode.h#L11">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/fullscreen_mode.h#L13">Source Code</a></p>
 <p>Used for fullscreen mode queries. Contains information about a supported fullscreen modes.</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_DISPLAY_MODE {
    <span class="dt">int</span> width;          <span class="co">// Screen width</span>
@@ -139,17 +139,17 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="fullscreen_mode.html#al_get_display_mode">al_get_display_mode</a></p>
 <h1 id="al_get_display_mode"><a href="#al_get_display_mode">al_get_display_mode</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_DISPLAY_MODE *al_get_display_mode(<span class="dt">int</span> index, ALLEGRO_DISPLAY_MODE *mode)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fullscreen_mode.c#L32">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fullscreen_mode.c#L32">Source Code</a></p>
 <p>Retrieves a fullscreen mode. Display parameters should not be changed between a call of <a href="fullscreen_mode.html#al_get_num_display_modes">al_get_num_display_modes</a> and <a href="fullscreen_mode.html#al_get_display_mode">al_get_display_mode</a>. index must be between 0 and the number returned from al_get_num_display_modes-1. mode must be an allocated ALLEGRO_DISPLAY_MODE structure. This function will return NULL on failure, and the mode parameter that was passed in on success.</p>
 <p>See also: <a href="fullscreen_mode.html#allegro_display_mode">ALLEGRO_DISPLAY_MODE</a>, <a href="fullscreen_mode.html#al_get_num_display_modes">al_get_num_display_modes</a></p>
 <h1 id="al_get_num_display_modes"><a href="#al_get_num_display_modes">al_get_num_display_modes</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_num_display_modes(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/fullscreen_mode.c#L23">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/fullscreen_mode.c#L23">Source Code</a></p>
 <p>Get the number of available fullscreen display modes for the current set of display parameters. This will use the values set with <a href="display.html#al_set_new_display_refresh_rate">al_set_new_display_refresh_rate</a>, and <a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a> to find the number of modes that match. Settings the new display parameters to zero will give a list of all modes for the default driver.</p>
 <p>See also: <a href="fullscreen_mode.html#al_get_display_mode">al_get_display_mode</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:39 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:57 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/getting_started.html b/docs/html/refman/getting_started.html
index a3ad09c..4a2b82d 100644
--- a/docs/html/refman/getting_started.html
+++ b/docs/html/refman/getting_started.html
@@ -176,14 +176,14 @@ allegro_native_dialog -> allegro</code></pre>
 <p>Instead, to get a "direct connection" to the sound system you would use an <a href="audio.html#allegro_voice">ALLEGRO_VOICE</a> (but depending on the platform only one such voice is guaranteed to be available and it might require a specific format of audio data). Therefore all sound can be first routed through an <a href="audio.html#allegro_mixer">ALLEGRO_MIXER</a> which is connected to such a voice (or another mixer) and will mix together all sample data fed to it.</p>
 <p>You can then directly stream real-time sample data to a mixer or a voice using an <a href="audio.html#allegro_audio_stream">ALLEGRO_AUDIO_STREAM</a> or play complete sounds using an <a href="audio.html#allegro_sample_instance">ALLEGRO_SAMPLE_INSTANCE</a>. The latter simply points to an <a href="audio.html#allegro_sample">ALLEGRO_SAMPLE</a> and will stream it for you.</p>
 <h1 id="unstable-api"><a href="#unstable-api">Unstable API</a></h1>
-<p>Some of Allegro's API is marked as unstable, which means that future versions of Allegro it may change or even be removed entirely! If you want to experiment with unstable API, define <code>ALLEGRO_UNSTABLE</code> macro before including Allegro's headers.</p>
+<p>Some of Allegro's API is marked as unstable, which means that in future versions of Allegro it may change or even be removed entirely! If you want to experiment with the unstable API, define <code>ALLEGRO_UNSTABLE</code> macro before including Allegro's headers.</p>
 <p>Note that when you define that macro, the version check performed by <a href="system.html#al_install_system">al_install_system</a> and <a href="system.html#al_init">al_init</a> becomes more scrict. See documentation of those functions for details.</p>
 <h1 id="not-the-end"><a href="#not-the-end">Not the end</a></h1>
 <p>There's a heap of stuff we haven't even mentioned yet.</p>
 <p>Enjoy!</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:38 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:55 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/graphics.html b/docs/html/refman/graphics.html
index b9dd76b..6a8e720 100644
--- a/docs/html/refman/graphics.html
+++ b/docs/html/refman/graphics.html
@@ -157,12 +157,18 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="#al_set_new_bitmap_flags">al_set_new_bitmap_flags</a></li>
 <li><a href="#al_add_new_bitmap_flag">al_add_new_bitmap_flag</a></li>
 <li><a href="#al_set_new_bitmap_format">al_set_new_bitmap_format</a></li>
+<li><a href="#al_set_new_bitmap_depth">al_set_new_bitmap_depth</a></li>
+<li><a href="#al_get_new_bitmap_depth">al_get_new_bitmap_depth</a></li>
+<li><a href="#al_set_new_bitmap_samples">al_set_new_bitmap_samples</a></li>
+<li><a href="#al_get_new_bitmap_samples">al_get_new_bitmap_samples</a></li>
 </ul></li>
 <li><a href="#bitmap-properties">Bitmap properties</a><ul>
 <li><a href="#al_get_bitmap_flags">al_get_bitmap_flags</a></li>
 <li><a href="#al_get_bitmap_format">al_get_bitmap_format</a></li>
 <li><a href="#al_get_bitmap_height">al_get_bitmap_height</a></li>
 <li><a href="#al_get_bitmap_width">al_get_bitmap_width</a></li>
+<li><a href="#al_get_bitmap_depth">al_get_bitmap_depth</a></li>
+<li><a href="#al_get_bitmap_samples">al_get_bitmap_samples</a></li>
 <li><a href="#al_get_pixel">al_get_pixel</a></li>
 <li><a href="#al_is_bitmap_locked">al_is_bitmap_locked</a></li>
 <li><a href="#al_is_compatible_bitmap">al_is_compatible_bitmap</a></li>
@@ -190,6 +196,8 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="#al_get_target_bitmap">al_get_target_bitmap</a></li>
 <li><a href="#al_put_pixel">al_put_pixel</a></li>
 <li><a href="#al_put_blended_pixel">al_put_blended_pixel</a></li>
+</ul></li>
+<li><a href="#target-bitmap">Target bitmap</a><ul>
 <li><a href="#al_set_target_bitmap">al_set_target_bitmap</a></li>
 <li><a href="#al_set_target_backbuffer">al_set_target_backbuffer</a></li>
 <li><a href="#al_get_current_display">al_get_current_display</a></li>
@@ -234,6 +242,8 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="#allegro_render_function">ALLEGRO_RENDER_FUNCTION</a></li>
 <li><a href="#allegro_write_mask_flags">ALLEGRO_WRITE_MASK_FLAGS</a></li>
 <li><a href="#al_set_render_state">al_set_render_state</a></li>
+<li><a href="#al_backup_dirty_bitmap">al_backup_dirty_bitmap</a></li>
+<li><a href="#al_backup_dirty_bitmaps">al_backup_dirty_bitmaps</a></li>
 </ul></li>
 </ul>
 </div>
@@ -242,29 +252,29 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="colors"><a href="#colors">Colors</a></h1>
 <h2 id="allegro_color"><a href="#allegro_color">ALLEGRO_COLOR</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_COLOR ALLEGRO_COLOR;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/color.h#L13">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/color.h#L13">Source Code</a></p>
 <p>An ALLEGRO_COLOR structure describes a color in a device independent way. Use <a href="graphics.html#al_map_rgb">al_map_rgb</a> et al. and <a href="graphics.html#al_unmap_rgb">al_unmap_rgb</a> et al. to translate from and to various color representations.</p>
 <h2 id="al_map_rgb"><a href="#al_map_rgb">al_map_rgb</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_map_rgb(
    <span class="dt">unsigned</span> <span class="dt">char</span> r, <span class="dt">unsigned</span> <span class="dt">char</span> g, <span class="dt">unsigned</span> <span class="dt">char</span> b)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L599">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L599">Source Code</a></p>
 <p>Convert r, g, b (ranging from 0-255) into an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>, using 255 for alpha.</p>
 <p>See also: <a href="graphics.html#al_map_rgba">al_map_rgba</a>, <a href="graphics.html#al_map_rgba_f">al_map_rgba_f</a>, <a href="graphics.html#al_map_rgb_f">al_map_rgb_f</a></p>
 <h2 id="al_map_rgb_f"><a href="#al_map_rgb_f">al_map_rgb_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_map_rgb_f(<span class="dt">float</span> r, <span class="dt">float</span> g, <span class="dt">float</span> b)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L634">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L634">Source Code</a></p>
 <p>Convert r, g, b, (ranging from 0.0f-1.0f) into an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>, using 1.0f for alpha.</p>
 <p>See also: <a href="graphics.html#al_map_rgba">al_map_rgba</a>, <a href="graphics.html#al_map_rgb">al_map_rgb</a>, <a href="graphics.html#al_map_rgba_f">al_map_rgba_f</a></p>
 <h2 id="al_map_rgba"><a href="#al_map_rgba">al_map_rgba</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_map_rgba(
    <span class="dt">unsigned</span> <span class="dt">char</span> r, <span class="dt">unsigned</span> <span class="dt">char</span> g, <span class="dt">unsigned</span> <span class="dt">char</span> b, <span class="dt">unsigned</span> <span class="dt">char</span> a)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L577">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L577">Source Code</a></p>
 <p>Convert r, g, b, a (ranging from 0-255) into an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>.</p>
 <p>See also: <a href="graphics.html#al_map_rgb">al_map_rgb</a>, <a href="graphics.html#al_premul_rgba">al_premul_rgba</a>, <a href="graphics.html#al_map_rgb_f">al_map_rgb_f</a></p>
 <h2 id="al_premul_rgba"><a href="#al_premul_rgba">al_premul_rgba</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_premul_rgba(
    <span class="dt">unsigned</span> <span class="dt">char</span> r, <span class="dt">unsigned</span> <span class="dt">char</span> g, <span class="dt">unsigned</span> <span class="dt">char</span> b, <span class="dt">unsigned</span> <span class="dt">char</span> a)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L588">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L588">Source Code</a></p>
 <p>This is a shortcut for <a href="graphics.html#al_map_rgba">al_map_rgba</a>(r * a / 255, g * a / 255, b * a / 255, a).</p>
 <p>By default Allegro uses pre-multiplied alpha for transparent blending of bitmaps and primitives (see <a href="graphics.html#al_load_bitmap_flags">al_load_bitmap_flags</a> for a discussion of that feature). This means that if you want to tint a bitmap or primitive to be transparent you need to multiply the color components by the alpha components when you pass them to this function. For example:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> r = <span class="dv">255</span>;
@@ -278,12 +288,12 @@ al_draw_tinted_bitmap(bmp, c, <span class="dv">0</span>, <span class="dv">0</spa
 <p>See also: <a href="graphics.html#al_map_rgba">al_map_rgba</a>, <a href="graphics.html#al_premul_rgba_f">al_premul_rgba_f</a></p>
 <h2 id="al_map_rgba_f"><a href="#al_map_rgba_f">al_map_rgba_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_map_rgba_f(<span class="dt">float</span> r, <span class="dt">float</span> g, <span class="dt">float</span> b, <span class="dt">float</span> a)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L608">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L608">Source Code</a></p>
 <p>Convert r, g, b, a (ranging from 0.0f-1.0f) into an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>.</p>
 <p>See also: <a href="graphics.html#al_map_rgba">al_map_rgba</a>, <a href="graphics.html#al_premul_rgba_f">al_premul_rgba_f</a>, <a href="graphics.html#al_map_rgb_f">al_map_rgb_f</a></p>
 <h2 id="al_premul_rgba_f"><a href="#al_premul_rgba_f">al_premul_rgba_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_premul_rgba_f(<span class="dt">float</span> r, <span class="dt">float</span> g, <span class="dt">float</span> b, <span class="dt">float</span> a)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L621">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L621">Source Code</a></p>
 <p>This is a shortcut for <a href="graphics.html#al_map_rgba_f">al_map_rgba_f</a>(r * a, g * a, b * a, a).</p>
 <p>By default Allegro uses pre-multiplied alpha for transparent blending of bitmaps and primitives (see <a href="graphics.html#al_load_bitmap_flags">al_load_bitmap_flags</a> for a discussion of that feature). This means that if you want to tint a bitmap or primitive to be transparent you need to multiply the color components by the alpha components when you pass them to this function. For example:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> r = <span class="dv">1</span>;
@@ -298,30 +308,30 @@ al_draw_tinted_bitmap(bmp, c, <span class="dv">0</span>, <span class="dv">0</spa
 <h2 id="al_unmap_rgb"><a href="#al_unmap_rgb">al_unmap_rgb</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_unmap_rgb(ALLEGRO_COLOR color,
    <span class="dt">unsigned</span> <span class="dt">char</span> *r, <span class="dt">unsigned</span> <span class="dt">char</span> *g, <span class="dt">unsigned</span> <span class="dt">char</span> *b)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L657">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L657">Source Code</a></p>
 <p>Retrieves components of an ALLEGRO_COLOR, ignoring alpha. Components will range from 0-255.</p>
 <p>See also: <a href="graphics.html#al_unmap_rgba">al_unmap_rgba</a>, <a href="graphics.html#al_unmap_rgba_f">al_unmap_rgba_f</a>, <a href="graphics.html#al_unmap_rgb_f">al_unmap_rgb_f</a></p>
 <h2 id="al_unmap_rgb_f"><a href="#al_unmap_rgb_f">al_unmap_rgb_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_unmap_rgb_f(ALLEGRO_COLOR color, <span class="dt">float</span> *r, <span class="dt">float</span> *g, <span class="dt">float</span> *b)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L680">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L680">Source Code</a></p>
 <p>Retrieves components of an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>, ignoring alpha. Components will range from 0.0f-1.0f.</p>
 <p>See also: <a href="graphics.html#al_unmap_rgba">al_unmap_rgba</a>, <a href="graphics.html#al_unmap_rgb">al_unmap_rgb</a>, <a href="graphics.html#al_unmap_rgba_f">al_unmap_rgba_f</a></p>
 <h2 id="al_unmap_rgba"><a href="#al_unmap_rgba">al_unmap_rgba</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_unmap_rgba(ALLEGRO_COLOR color,
    <span class="dt">unsigned</span> <span class="dt">char</span> *r, <span class="dt">unsigned</span> <span class="dt">char</span> *g, <span class="dt">unsigned</span> <span class="dt">char</span> *b, <span class="dt">unsigned</span> <span class="dt">char</span> *a)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L645">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L645">Source Code</a></p>
 <p>Retrieves components of an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>. Components will range from 0-255.</p>
 <p>See also: <a href="graphics.html#al_unmap_rgb">al_unmap_rgb</a>, <a href="graphics.html#al_unmap_rgba_f">al_unmap_rgba_f</a>, <a href="graphics.html#al_unmap_rgb_f">al_unmap_rgb_f</a></p>
 <h2 id="al_unmap_rgba_f"><a href="#al_unmap_rgba_f">al_unmap_rgba_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_unmap_rgba_f(ALLEGRO_COLOR color,
    <span class="dt">float</span> *r, <span class="dt">float</span> *g, <span class="dt">float</span> *b, <span class="dt">float</span> *a)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L668">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L668">Source Code</a></p>
 <p>Retrieves components of an <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>. Components will range from 0.0f-1.0f.</p>
 <p>See also: <a href="graphics.html#al_unmap_rgba">al_unmap_rgba</a>, <a href="graphics.html#al_unmap_rgb">al_unmap_rgb</a>, <a href="graphics.html#al_unmap_rgb_f">al_unmap_rgb_f</a></p>
 <h1 id="locking-and-pixel-formats"><a href="#locking-and-pixel-formats">Locking and pixel formats</a></h1>
 <h2 id="allegro_locked_region"><a href="#allegro_locked_region">ALLEGRO_LOCKED_REGION</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_LOCKED_REGION ALLEGRO_LOCKED_REGION;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/bitmap_lock.h#L23">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/bitmap_lock.h#L23">Source Code</a></p>
 <p>Users who wish to manually edit or read from a bitmap are required to lock it first. The ALLEGRO_LOCKED_REGION structure represents the locked region of the bitmap. This call will work with any bitmap, including memory bitmaps.</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_LOCKED_REGION {
    <span class="dt">void</span> *data;
@@ -338,7 +348,7 @@ al_draw_tinted_bitmap(bmp, c, <span class="dv">0</span>, <span class="dv">0</spa
 <p>See also: <a href="graphics.html#al_lock_bitmap">al_lock_bitmap</a>, <a href="graphics.html#al_lock_bitmap_region">al_lock_bitmap_region</a>, <a href="graphics.html#al_unlock_bitmap">al_unlock_bitmap</a>, <a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a></p>
 <h2 id="allegro_pixel_format"><a href="#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_PIXEL_FORMAT</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/color.h#L23">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/color.h#L23">Source Code</a></p>
 <p>Pixel formats. Each pixel format specifies the exact size and bit layout of a pixel in memory. Components are specified from high bits to low bits, so for example a fully opaque red pixel in ARGB_8888 format is 0xFFFF0000.</p>
 <blockquote>
 <p><em>Note:</em></p>
@@ -389,36 +399,36 @@ al_draw_tinted_bitmap(bmp, c, <span class="dv">0</span>, <span class="dv">0</spa
 <p>See also: <a href="graphics.html#al_set_new_bitmap_format">al_set_new_bitmap_format</a>, <a href="graphics.html#al_get_bitmap_format">al_get_bitmap_format</a></p>
 <h2 id="al_get_pixel_size"><a href="#al_get_pixel_size">al_get_pixel_size</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_pixel_size(<span class="dt">int</span> format)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L422">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L422">Source Code</a></p>
 <p>Return the number of bytes that a pixel of the given format occupies. For blocked pixel formats (e.g. compressed formats), this returns 0.</p>
 <p>See also: <a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a>, <a href="graphics.html#al_get_pixel_format_bits">al_get_pixel_format_bits</a></p>
 <h2 id="al_get_pixel_format_bits"><a href="#al_get_pixel_format_bits">al_get_pixel_format_bits</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_pixel_format_bits(<span class="dt">int</span> format)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L430">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L430">Source Code</a></p>
 <p>Return the number of bits that a pixel of the given format occupies. For blocked pixel formats (e.g. compressed formats), this returns 0.</p>
 <p>See also: <a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a>, <a href="graphics.html#al_get_pixel_size">al_get_pixel_size</a></p>
 <h2 id="al_get_pixel_block_size"><a href="#al_get_pixel_block_size">al_get_pixel_block_size</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_pixel_block_size(<span class="dt">int</span> format)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L398">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L398">Source Code</a></p>
 <p>Return the number of bytes that a block of pixels with this format occupies.</p>
 <p>Since: 5.1.9.</p>
 <p>See also: <a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a>, <a href="graphics.html#al_get_pixel_block_width">al_get_pixel_block_width</a>, <a href="graphics.html#al_get_pixel_block_height">al_get_pixel_block_height</a></p>
 <h2 id="al_get_pixel_block_width"><a href="#al_get_pixel_block_width">al_get_pixel_block_width</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_pixel_block_width(<span class="dt">int</span> format)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L406">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L406">Source Code</a></p>
 <p>Return the width of the the pixel block for this format.</p>
 <p>Since: 5.1.9.</p>
 <p>See also: <a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a>, <a href="graphics.html#al_get_pixel_block_size">al_get_pixel_block_size</a>, <a href="graphics.html#al_get_pixel_block_height">al_get_pixel_block_height</a></p>
 <h2 id="al_get_pixel_block_height"><a href="#al_get_pixel_block_height">al_get_pixel_block_height</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_pixel_block_height(<span class="dt">int</span> format)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/pixels.c#L414">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/pixels.c#L414">Source Code</a></p>
 <p>Return the height of the the pixel block for this format.</p>
 <p>Since: 5.1.9.</p>
 <p>See also: <a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a>, <a href="graphics.html#al_get_pixel_block_size">al_get_pixel_block_size</a>, <a href="graphics.html#al_get_pixel_block_width">al_get_pixel_block_width</a></p>
 <h2 id="al_lock_bitmap"><a href="#al_lock_bitmap">al_lock_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_LOCKED_REGION *al_lock_bitmap(ALLEGRO_BITMAP *bitmap,
    <span class="dt">int</span> format, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_lock.c#L126">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_lock.c#L126">Source Code</a></p>
 <p>Lock an entire bitmap for reading or writing. If the bitmap is a display bitmap it will be updated from system memory after the bitmap is unlocked (unless locked read only). Returns NULL if the bitmap cannot be locked, e.g. the bitmap was locked previously and not unlocked. This function also returns NULL if the <code>format</code> is a compressed format.</p>
 <p>Flags are:</p>
 <ul>
@@ -435,7 +445,7 @@ al_draw_tinted_bitmap(bmp, c, <span class="dv">0</span>, <span class="dv">0</spa
 <h2 id="al_lock_bitmap_region"><a href="#al_lock_bitmap_region">al_lock_bitmap_region</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_LOCKED_REGION *al_lock_bitmap_region(ALLEGRO_BITMAP *bitmap,
    <span class="dt">int</span> x, <span class="dt">int</span> y, <span class="dt">int</span> width, <span class="dt">int</span> height, <span class="dt">int</span> format, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_lock.c#L25">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_lock.c#L25">Source Code</a></p>
 <p>Like <a href="graphics.html#al_lock_bitmap">al_lock_bitmap</a>, but only locks a specific area of the bitmap. If the bitmap is a video bitmap, only that area of the texture will be updated when it is unlocked. Locking only the region you indend to modify will be faster than locking the whole bitmap.</p>
 <blockquote>
 <p><em>Note:</em> Using the ALLEGRO_LOCK_WRITEONLY with a blocked pixel format (i.e. formats for which <a href="graphics.html#al_get_pixel_block_width">al_get_pixel_block_width</a> or <a href="graphics.html#al_get_pixel_block_height">al_get_pixel_block_height</a> do not return 1) requires you to have the region be aligned to the block width for optimal performance. If it is not, then the function will have to lock the region with the ALLEGRO_LOCK_READWRITE instead in order to pad this re [...]
@@ -443,13 +453,13 @@ al_draw_tinted_bitmap(bmp, c, <span class="dv">0</span>, <span class="dv">0</spa
 <p>See also: <a href="graphics.html#allegro_locked_region">ALLEGRO_LOCKED_REGION</a>, <a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a>, <a href="graphics.html#al_unlock_bitmap">al_unlock_bitmap</a></p>
 <h2 id="al_unlock_bitmap"><a href="#al_unlock_bitmap">al_unlock_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_unlock_bitmap(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_lock.c#L135">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_lock.c#L135">Source Code</a></p>
 <p>Unlock a previously locked bitmap or bitmap region. If the bitmap is a video bitmap, the texture will be updated to match the system memory copy (unless it was locked read only).</p>
 <p>See also: <a href="graphics.html#al_lock_bitmap">al_lock_bitmap</a>, <a href="graphics.html#al_lock_bitmap_region">al_lock_bitmap_region</a>, <a href="graphics.html#al_lock_bitmap_blocked">al_lock_bitmap_blocked</a>, <a href="graphics.html#al_lock_bitmap_region_blocked">al_lock_bitmap_region_blocked</a></p>
 <h2 id="al_lock_bitmap_blocked"><a href="#al_lock_bitmap_blocked">al_lock_bitmap_blocked</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_LOCKED_REGION *al_lock_bitmap_blocked(ALLEGRO_BITMAP *bitmap,
    <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_lock.c#L174">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_lock.c#L174">Source Code</a></p>
 <p>Like <a href="graphics.html#al_lock_bitmap">al_lock_bitmap</a>, but allows locking bitmaps with a blocked pixel format (i.e. a format for which <a href="graphics.html#al_get_pixel_block_width">al_get_pixel_block_width</a> or <a href="graphics.html#al_get_pixel_block_height">al_get_pixel_block_height</a> do not return 1) in that format. To that end, this function also does not allow format conversion. For bitmap formats with a block size of 1, this function is identical to calling <cod [...]
 <blockquote>
 <p><em>Note:</em> Currently there are no drawing functions that work when the bitmap is locked with a compressed format. <a href="graphics.html#al_get_pixel">al_get_pixel</a> will also not work.</p>
@@ -459,18 +469,18 @@ al_draw_tinted_bitmap(bmp, c, <span class="dv">0</span>, <span class="dv">0</spa
 <h2 id="al_lock_bitmap_region_blocked"><a href="#al_lock_bitmap_region_blocked">al_lock_bitmap_region_blocked</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_LOCKED_REGION *al_lock_bitmap_region_blocked(ALLEGRO_BITMAP *bitmap,
    <span class="dt">int</span> x_block, <span class="dt">int</span> y_block, <span class="dt">int</span> width_block, <span class="dt">int</span> height_block, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_lock.c#L189">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_lock.c#L189">Source Code</a></p>
 <p>Like <a href="graphics.html#al_lock_bitmap_blocked">al_lock_bitmap_blocked</a>, but allows locking a sub-region, for performance. Unlike <a href="graphics.html#al_lock_bitmap_region">al_lock_bitmap_region</a> the region specified in terms of blocks and not pixels.</p>
 <p>Since: 5.1.9</p>
 <p>See also: <a href="graphics.html#al_lock_bitmap_region">al_lock_bitmap_region</a>, <a href="graphics.html#al_lock_bitmap_blocked">al_lock_bitmap_blocked</a></p>
 <h1 id="bitmap-creation"><a href="#bitmap-creation">Bitmap creation</a></h1>
 <h2 id="allegro_bitmap"><a href="#allegro_bitmap">ALLEGRO_BITMAP</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_BITMAP ALLEGRO_BITMAP;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/bitmap.h#L12">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/bitmap.h#L12">Source Code</a></p>
 <p>Abstract type representing a bitmap (2D image).</p>
 <h2 id="al_create_bitmap"><a href="#al_create_bitmap">al_create_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_create_bitmap(<span class="dt">int</span> w, <span class="dt">int</span> h)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L181">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L183">Source Code</a></p>
 <p>Creates a new bitmap using the bitmap format and flags for the current thread. Blitting between bitmaps of differing formats, or blitting between memory bitmaps and display bitmaps may be slow.</p>
 <p>Unless you set the ALLEGRO_MEMORY_BITMAP flag, the bitmap is created for the current display. Blitting to another display may be slow.</p>
 <p>If a display bitmap is created, there may be limitations on the allowed dimensions. For example a DirectX or OpenGL backend usually has a maximum allowed texture size - so if bitmap creation fails for very large dimensions, you may want to re-try with a smaller bitmap. Some platforms also dictate a minimum texture size, which is relevant if you plan to use this bitmap with the primitives addon. If you try to create a bitmap smaller than this, this call will not fail but the returned b [...]
@@ -483,7 +493,7 @@ al_draw_tinted_bitmap(bmp, c, <span class="dv">0</span>, <span class="dv">0</spa
 <h2 id="al_create_sub_bitmap"><a href="#al_create_sub_bitmap">al_create_sub_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_create_sub_bitmap(ALLEGRO_BITMAP *parent,
    <span class="dt">int</span> x, <span class="dt">int</span> y, <span class="dt">int</span> w, <span class="dt">int</span> h)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L407">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L433">Source Code</a></p>
 <p>Creates a sub-bitmap of the parent, at the specified coordinates and of the specified size. A sub-bitmap is a bitmap that shares drawing memory with a pre-existing (parent) bitmap, but possibly with a different size and clipping settings.</p>
 <p>The sub-bitmap may originate off or extend past the parent bitmap.</p>
 <p>See the discussion in <a href="display.html#al_get_backbuffer">al_get_backbuffer</a> about using sub-bitmaps of the backbuffer.</p>
@@ -494,19 +504,19 @@ al_draw_tinted_bitmap(bmp, c, <span class="dv">0</span>, <span class="dv">0</spa
 <p>See also: <a href="graphics.html#al_create_bitmap">al_create_bitmap</a></p>
 <h2 id="al_clone_bitmap"><a href="#al_clone_bitmap">al_clone_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_clone_bitmap(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L635">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L661">Source Code</a></p>
 <p>Create a new bitmap with <a href="graphics.html#al_create_bitmap">al_create_bitmap</a>, and copy the pixel data from the old bitmap across. If the new bitmap is a memory bitmap, its projection bitmap is reset to be orthographic.</p>
 <p>See also: <a href="graphics.html#al_create_bitmap">al_create_bitmap</a>, <a href="graphics.html#al_set_new_bitmap_format">al_set_new_bitmap_format</a>, <a href="graphics.html#al_set_new_bitmap_flags">al_set_new_bitmap_flags</a>, <a href="graphics.html#al_convert_bitmap">al_convert_bitmap</a></p>
 <h2 id="al_convert_bitmap"><a href="#al_convert_bitmap">al_convert_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_convert_bitmap(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_type.c#L146">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_type.c#L154">Source Code</a></p>
 <p>Converts the bitmap to the current bitmap flags and format. The bitmap will be as if it was created anew with <a href="graphics.html#al_create_bitmap">al_create_bitmap</a> but retain its contents. All of this bitmap's sub-bitmaps are also converted. If the new bitmap type is memory, then the bitmap's projection bitmap is reset to be orthographic.</p>
 <p>If this bitmap is a sub-bitmap, then it, its parent and all the sibling sub-bitmaps are also converted.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="graphics.html#al_create_bitmap">al_create_bitmap</a>, <a href="graphics.html#al_set_new_bitmap_format">al_set_new_bitmap_format</a>, <a href="graphics.html#al_set_new_bitmap_flags">al_set_new_bitmap_flags</a>, <a href="graphics.html#al_clone_bitmap">al_clone_bitmap</a></p>
 <h2 id="al_convert_memory_bitmaps"><a href="#al_convert_memory_bitmaps">al_convert_memory_bitmaps</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_convert_memory_bitmaps(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_type.c#L223">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_type.c#L231">Source Code</a></p>
 <p>If you create a bitmap when there is no current display (for example because you have not called <a href="display.html#al_create_display">al_create_display</a> in the current thread) and are using the ALLEGRO_CONVERT_BITMAP bitmap flag (which is set by default) then the bitmap will be created successfully, but as a memory bitmap. This function converts all such bitmaps to proper video bitmaps belonging to the current display.</p>
 <p>Note that video bitmaps get automatically converted back to memory bitmaps when the last display is destroyed.</p>
 <p>This operation will preserve all bitmap flags except ALLEGRO_VIDEO_BITMAP and ALLEGRO_MEMORY_BITMAP.</p>
@@ -514,24 +524,24 @@ al_draw_tinted_bitmap(bmp, c, <span class="dv">0</span>, <span class="dv">0</spa
 <p>See also: <a href="graphics.html#al_convert_bitmap">al_convert_bitmap</a>, <a href="graphics.html#al_create_bitmap">al_create_bitmap</a></p>
 <h2 id="al_destroy_bitmap"><a href="#al_destroy_bitmap">al_destroy_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_bitmap(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L198">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L201">Source Code</a></p>
 <p>Destroys the given bitmap, freeing all resources used by it. This function does nothing if the bitmap argument is NULL.</p>
 <p>As a convenience, if the calling thread is currently targeting the bitmap then the bitmap will be untargeted first. The new target bitmap is unspecified. (since: 5.0.10, 5.1.6)</p>
 <p>Otherwise, it is an error to destroy a bitmap while it (or a sub-bitmap) is the target bitmap of any thread.</p>
 <p>See also: <a href="graphics.html#al_create_bitmap">al_create_bitmap</a></p>
 <h2 id="al_get_new_bitmap_flags"><a href="#al_get_new_bitmap_flags">al_get_new_bitmap_flags</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_new_bitmap_flags(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L673">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L674">Source Code</a></p>
 <p>Returns the flags used for newly created bitmaps.</p>
 <p>See also: <a href="graphics.html#al_set_new_bitmap_flags">al_set_new_bitmap_flags</a></p>
 <h2 id="al_get_new_bitmap_format"><a href="#al_get_new_bitmap_format">al_get_new_bitmap_format</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_new_bitmap_format(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L660">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L661">Source Code</a></p>
 <p>Returns the format used for newly created bitmaps.</p>
 <p>See also: <a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a>, <a href="graphics.html#al_set_new_bitmap_format">al_set_new_bitmap_format</a></p>
 <h2 id="al_set_new_bitmap_flags"><a href="#al_set_new_bitmap_flags">al_set_new_bitmap_flags</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_new_bitmap_flags(<span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L633">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L634">Source Code</a></p>
 <p>Sets the flags to use for newly created bitmaps. Valid flags are:</p>
 <dl>
 <dt>ALLEGRO_MEMORY_BITMAP</dt>
@@ -570,58 +580,123 @@ al_draw_tinted_bitmap(bmp, c, <span class="dv">0</span>, <span class="dv">0</spa
 <p>See also: <a href="graphics.html#al_get_new_bitmap_flags">al_get_new_bitmap_flags</a>, <a href="graphics.html#al_get_bitmap_flags">al_get_bitmap_flags</a></p>
 <h2 id="al_add_new_bitmap_flag"><a href="#al_add_new_bitmap_flag">al_add_new_bitmap_flag</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_add_new_bitmap_flag(<span class="dt">int</span> flag)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L647">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L648">Source Code</a></p>
 <p>A convenience function which does the same as</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_set_new_bitmap_flags(al_get_new_bitmap_flags() | flag);</code></pre>
 <p>See also: <a href="graphics.html#al_set_new_bitmap_flags">al_set_new_bitmap_flags</a>, <a href="graphics.html#al_get_new_bitmap_flags">al_get_new_bitmap_flags</a>, <a href="graphics.html#al_get_bitmap_flags">al_get_bitmap_flags</a></p>
 <h2 id="al_set_new_bitmap_format"><a href="#al_set_new_bitmap_format">al_set_new_bitmap_format</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_new_bitmap_format(<span class="dt">int</span> format)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L620">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L621">Source Code</a></p>
 <p>Sets the pixel format (<a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a>) for newly created bitmaps. The default format is 0 and means the display driver will choose the best format.</p>
 <p>See also: <a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a>, <a href="graphics.html#al_get_new_bitmap_format">al_get_new_bitmap_format</a>, <a href="graphics.html#al_get_bitmap_format">al_get_bitmap_format</a></p>
+<h2 id="al_set_new_bitmap_depth"><a href="#al_set_new_bitmap_depth">al_set_new_bitmap_depth</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_new_bitmap_depth(<span class="dt">int</span> depth)
+SETTER(new_bitmap_depth, depth)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L934">Source Code</a></p>
+<p>Sets the depthbuffer depth used by newly created bitmaps (on the current thread) if they are used with <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a>. 0 means no depth-buffer will be created when drawing into the bitmap, which is the default.</p>
+<p>Since: 5.2.1</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This is an experimental feature and currently only works for the OpenGL backend.</p>
+</blockquote>
+<h2 id="al_get_new_bitmap_depth"><a href="#al_get_new_bitmap_depth">al_get_new_bitmap_depth</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_new_bitmap_depth(<span class="dt">void</span>)
+GETTER(new_bitmap_depth, <span class="dv">0</span>)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L929">Source Code</a></p>
+<p>Returns the value currently set with <a href="graphics.html#al_set_new_bitmap_depth">al_set_new_bitmap_depth</a> on the current thread or 0 if none was set.</p>
+<p>Since: 5.2.1</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This is an experimental feature and currently only works for the OpenGL backend.</p>
+</blockquote>
+<h2 id="al_set_new_bitmap_samples"><a href="#al_set_new_bitmap_samples">al_set_new_bitmap_samples</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_new_bitmap_samples(<span class="dt">int</span> samples)
+SETTER(new_bitmap_samples, samples)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L944">Source Code</a></p>
+<p>Sets the multi-sampling samples used by newly created bitmaps (on the current thread) if they are used with <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a>. 0 means multi-sampling will not be used when drawing into the bitmap, which is the default. 1 means multi-sampling will be used but only using a single sample per pixel (so usually there will be no visual difference to not using multi-sampling at all).</p>
+<blockquote>
+<p><em>Note:</em> Some platforms have restrictions on when the multi-sampling buffer for a bitmap is realized, i.e. down-scaled back to the actual bitmap dimensions. This may only happen after a call to <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a>. So for example:</p>
+</blockquote>
+<pre><code>al_set_target_bitmap(multisample);
+al_clear_to_color(blue);
+al_draw_line(0, 0, 100, 100, red, 1);
+al_lock_bitmap(multisample, ...)
+// ERROR: the contents of the bitmap will be undefined
+
+al_set_target_bitmap(backbuffer);
+al_lock_bitmap(multisample, ...)
+// CORRECT: at this point, the bitmap contents are updated and
+// there will be an anti-aliased line in it.</code></pre>
+<p>Since: 5.2.1</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This is an experimental feature and currently only works for the OpenGL backend.</p>
+</blockquote>
+<h2 id="al_get_new_bitmap_samples"><a href="#al_get_new_bitmap_samples">al_get_new_bitmap_samples</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_new_bitmap_samples(<span class="dt">void</span>)
+GETTER(new_bitmap_samples, <span class="dv">0</span>)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L939">Source Code</a></p>
+<p>Returns the value currently set with <a href="graphics.html#al_set_new_bitmap_samples">al_set_new_bitmap_samples</a> on the current thread or 0 if none was set.</p>
+<p>Since: 5.2.1</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This is an experimental feature and currently only works for the OpenGL backend.</p>
+</blockquote>
 <h1 id="bitmap-properties"><a href="#bitmap-properties">Bitmap properties</a></h1>
 <h2 id="al_get_bitmap_flags"><a href="#al_get_bitmap_flags">al_get_bitmap_flags</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_bitmap_flags(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L322">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L325">Source Code</a></p>
 <p>Return the flags used to create the bitmap.</p>
 <p>See also: <a href="graphics.html#al_set_new_bitmap_flags">al_set_new_bitmap_flags</a></p>
 <h2 id="al_get_bitmap_format"><a href="#al_get_bitmap_format">al_get_bitmap_format</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_bitmap_format(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L301">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L304">Source Code</a></p>
 <p>Returns the pixel format of a bitmap.</p>
 <p>See also: <a href="graphics.html#allegro_pixel_format">ALLEGRO_PIXEL_FORMAT</a>, <a href="graphics.html#al_set_new_bitmap_flags">al_set_new_bitmap_flags</a></p>
 <h2 id="al_get_bitmap_height"><a href="#al_get_bitmap_height">al_get_bitmap_height</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_bitmap_height(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L292">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L295">Source Code</a></p>
 <p>Returns the height of a bitmap in pixels.</p>
 <h2 id="al_get_bitmap_width"><a href="#al_get_bitmap_width">al_get_bitmap_width</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_bitmap_width(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L283">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L286">Source Code</a></p>
 <p>Returns the width of a bitmap in pixels.</p>
+<h2 id="al_get_bitmap_depth"><a href="#al_get_bitmap_depth">al_get_bitmap_depth</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_bitmap_depth(ALLEGRO_BITMAP *bitmap)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L345">Source Code</a></p>
+<p>Return the depthbuffer depth used by this bitmap if it is used with <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a>.</p>
+<p>Since: 5.2.1</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This is an experimental feature and currently only works for the OpenGL backend.</p>
+</blockquote>
+<h2 id="al_get_bitmap_samples"><a href="#al_get_bitmap_samples">al_get_bitmap_samples</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_bitmap_samples(ALLEGRO_BITMAP *bitmap)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L356">Source Code</a></p>
+<p>Return the multi-sampling samples used by this bitmap if it is used with <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a>.</p>
+<p>Since: 5.2.1</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This is an experimental feature and currently only works for the OpenGL backend.</p>
+</blockquote>
 <h2 id="al_get_pixel"><a href="#al_get_pixel">al_get_pixel</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_get_pixel(ALLEGRO_BITMAP *bitmap, <span class="dt">int</span> x, <span class="dt">int</span> y)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_pixel.c#L27">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_pixel.c#L27">Source Code</a></p>
 <p>Get a pixel's color value from the specified bitmap. This operation is slow on non-memory bitmaps. Consider locking the bitmap if you are going to use this function multiple times on the same bitmap.</p>
 <p>See also: <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>, <a href="graphics.html#al_put_pixel">al_put_pixel</a>, <a href="graphics.html#al_lock_bitmap">al_lock_bitmap</a></p>
 <h2 id="al_is_bitmap_locked"><a href="#al_is_bitmap_locked">al_is_bitmap_locked</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_bitmap_locked(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_lock.c#L167">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_lock.c#L167">Source Code</a></p>
 <p>Returns whether or not a bitmap is already locked.</p>
 <p>See also: <a href="graphics.html#al_lock_bitmap">al_lock_bitmap</a>, <a href="graphics.html#al_lock_bitmap_region">al_lock_bitmap_region</a>, <a href="graphics.html#al_unlock_bitmap">al_unlock_bitmap</a></p>
 <h2 id="al_is_compatible_bitmap"><a href="#al_is_compatible_bitmap">al_is_compatible_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_compatible_bitmap(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L252">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L248">Source Code</a></p>
 <p>D3D and OpenGL allow sharing a texture in a way so it can be used for multiple windows. Each <a href="graphics.html#allegro_bitmap">ALLEGRO_BITMAP</a> created with <a href="graphics.html#al_create_bitmap">al_create_bitmap</a> however is usually tied to a single ALLEGRO_DISPLAY. This function can be used to know if the bitmap is compatible with the given display, even if it is a different display to the one it was created with. It returns true if the bitmap is compatible (things like a [...]
 <p>The only time this function is useful is if you are using multiple windows and need accelerated blitting of the same bitmaps to both.</p>
 <p>Returns true if the bitmap is compatible with the current display, false otherwise. If there is no current display, false is returned.</p>
 <h2 id="al_is_sub_bitmap"><a href="#al_is_sub_bitmap">al_is_sub_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_sub_bitmap(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L479">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L505">Source Code</a></p>
 <p>Returns true if the specified bitmap is a sub-bitmap, false otherwise.</p>
 <p>See also: <a href="graphics.html#al_create_sub_bitmap">al_create_sub_bitmap</a>, <a href="graphics.html#al_get_parent_bitmap">al_get_parent_bitmap</a></p>
 <h2 id="al_get_parent_bitmap"><a href="#al_get_parent_bitmap">al_get_parent_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_get_parent_bitmap(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L487">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L513">Source Code</a></p>
 <p>Returns the bitmap this bitmap is a sub-bitmap of. Returns NULL if this bitmap is not a sub-bitmap. This function always returns the real bitmap, and never a sub-bitmap. This might NOT match what was passed to <a href="graphics.html#al_create_sub_bitmap">al_create_sub_bitmap</a>. Consider this code, for instance:</p>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP* a = al_create_bitmap(<span class="dv">512</span>, <span class="dv">512</span>);
 ALLEGRO_BITMAP* b = al_create_sub_bitmap(a, <span class="dv">128</span>, <span class="dv">128</span>, <span class="dv">256</span>, <span class="dv">256</span>);
@@ -632,20 +707,20 @@ ASSERT(al_get_parent_bitmap(b) == a && al_get_parent_bitmap(c) == a);</c
 <p>See also: <a href="graphics.html#al_create_sub_bitmap">al_create_sub_bitmap</a>, <a href="graphics.html#al_is_sub_bitmap">al_is_sub_bitmap</a></p>
 <h2 id="al_get_bitmap_x"><a href="#al_get_bitmap_x">al_get_bitmap_x</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_bitmap_x(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L496">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L522">Source Code</a></p>
 <p>For a sub-bitmap, return it's x position within the parent.</p>
 <p>See also: <a href="graphics.html#al_create_sub_bitmap">al_create_sub_bitmap</a>, <a href="graphics.html#al_get_parent_bitmap">al_get_parent_bitmap</a>, <a href="graphics.html#al_get_bitmap_y">al_get_bitmap_y</a></p>
 <p>Since: 5.1.12</p>
 <h2 id="al_get_bitmap_y"><a href="#al_get_bitmap_y">al_get_bitmap_y</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_bitmap_y(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L505">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L531">Source Code</a></p>
 <p>For a sub-bitmap, return it's y position within the parent.</p>
 <p>See also: <a href="graphics.html#al_create_sub_bitmap">al_create_sub_bitmap</a>, <a href="graphics.html#al_get_parent_bitmap">al_get_parent_bitmap</a>, <a href="graphics.html#al_get_bitmap_x">al_get_bitmap_x</a></p>
 <p>Since: 5.1.12</p>
 <h2 id="al_reparent_bitmap"><a href="#al_reparent_bitmap">al_reparent_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_reparent_bitmap(ALLEGRO_BITMAP *bitmap, ALLEGRO_BITMAP *parent,
    <span class="dt">int</span> x, <span class="dt">int</span> y, <span class="dt">int</span> w, <span class="dt">int</span> h)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L454">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L480">Source Code</a></p>
 <p>For a sub-bitmap, changes the parent, position and size. This is the same as destroying the bitmap and re-creating it with <a href="graphics.html#al_create_sub_bitmap">al_create_sub_bitmap</a> - except the bitmap pointer stays the same. This has many uses, for example an animation player could return a single bitmap which can just be re-parented to different animation frames without having to re-draw the contents. Or a sprite atlas could re-arrange its sprites without having to invali [...]
 <p>See also: <a href="graphics.html#al_create_sub_bitmap">al_create_sub_bitmap</a>, <a href="graphics.html#al_get_parent_bitmap">al_get_parent_bitmap</a></p>
 <p>Since: 5.1.12</p>
@@ -653,19 +728,19 @@ ASSERT(al_get_parent_bitmap(b) == a && al_get_parent_bitmap(c) == a);</c
 <p>All drawing operations draw to the current "target bitmap" of the current thread. Initially, the target bitmap will be the backbuffer of the last display created in a thread.</p>
 <h2 id="al_clear_to_color"><a href="#al_clear_to_color">al_clear_to_color</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_clear_to_color(ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/drawing.c#L26">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/drawing.c#L26">Source Code</a></p>
 <p>Clear the complete target bitmap, but confined by the clipping rectangle.</p>
 <p>See also: <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>, <a href="graphics.html#al_set_clipping_rectangle">al_set_clipping_rectangle</a>, <a href="graphics.html#al_clear_depth_buffer">al_clear_depth_buffer</a></p>
 <h2 id="al_clear_depth_buffer"><a href="#al_clear_depth_buffer">al_clear_depth_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_clear_depth_buffer(<span class="dt">float</span> z)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/drawing.c#L46">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/drawing.c#L46">Source Code</a></p>
 <p>Clear the depth buffer (confined by the clipping rectangle) to the given value. A depth buffer is only available if it was requested with <a href="display.html#al_set_new_display_option">al_set_new_display_option</a> and the requirement could be met by the <a href="display.html#al_create_display">al_create_display</a> call creating the current display. Operations involving the depth buffer are also affected by <a href="graphics.html#al_set_render_state">al_set_render_state</a>.</p>
 <p>For example, if <code>ALLEGRO_DEPTH_FUNCTION</code> is set to <code>ALLEGRO_RENDER_LESS</code> then depth buffer value of 1 represents infinite distance, and thus is a good value to use when clearing the depth buffer.</p>
 <p>Since: 5.1.2</p>
 <p>See also: <a href="graphics.html#al_clear_to_color">al_clear_to_color</a>, <a href="graphics.html#al_set_clipping_rectangle">al_set_clipping_rectangle</a>, <a href="graphics.html#al_set_render_state">al_set_render_state</a>, <a href="display.html#al_set_new_display_option">al_set_new_display_option</a></p>
 <h2 id="al_draw_bitmap"><a href="#al_draw_bitmap">al_draw_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_bitmap(ALLEGRO_BITMAP *bitmap, <span class="dt">float</span> dx, <span class="dt">float</span> dy, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_draw.c#L148">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_draw.c#L148">Source Code</a></p>
 <p>Draws an unscaled, unrotated bitmap at the given position to the current target bitmap (see <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a>).</p>
 <p><code>flags</code> can be a combination of:</p>
 <ul>
@@ -682,7 +757,7 @@ ASSERT(al_get_parent_bitmap(b) == a && al_get_parent_bitmap(c) == a);</c
 <h2 id="al_draw_tinted_bitmap"><a href="#al_draw_tinted_bitmap">al_draw_tinted_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_tinted_bitmap(ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR tint,
    <span class="dt">float</span> dx, <span class="dt">float</span> dy, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_draw.c#L137">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_draw.c#L137">Source Code</a></p>
 <p>Like <a href="graphics.html#al_draw_bitmap">al_draw_bitmap</a> but multiplies all colors in the bitmap with the given color. For example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_draw_tinted_bitmap(bitmap, al_map_rgba_f(<span class="fl">0.5</span>, <span class="fl">0.5</span>, <span class="fl">0.5</span>, <span class="fl">0.5</span>), x, y, <span class="dv">0</span>);</code></pre>
 <p>The above will draw the bitmap 50% transparently (r/g/b values need to be pre-multiplied with the alpha component with the default blend mode).</p>
@@ -693,7 +768,7 @@ ASSERT(al_get_parent_bitmap(b) == a && al_get_parent_bitmap(c) == a);</c
 <h2 id="al_draw_bitmap_region"><a href="#al_draw_bitmap_region">al_draw_bitmap_region</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_bitmap_region(ALLEGRO_BITMAP *bitmap,
    <span class="dt">float</span> sx, <span class="dt">float</span> sy, <span class="dt">float</span> sw, <span class="dt">float</span> sh, <span class="dt">float</span> dx, <span class="dt">float</span> dy, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_draw.c#L156">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_draw.c#L156">Source Code</a></p>
 <p>Draws a region of the given bitmap to the target bitmap.</p>
 <ul>
 <li>sx - source x</li>
@@ -711,13 +786,13 @@ ASSERT(al_get_parent_bitmap(b) == a && al_get_parent_bitmap(c) == a);</c
    ALLEGRO_COLOR tint,
    <span class="dt">float</span> sx, <span class="dt">float</span> sy, <span class="dt">float</span> sw, <span class="dt">float</span> sh, <span class="dt">float</span> dx, <span class="dt">float</span> dy,
    <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_draw.c#L125">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_draw.c#L125">Source Code</a></p>
 <p>Like <a href="graphics.html#al_draw_bitmap_region">al_draw_bitmap_region</a> but multiplies all colors in the bitmap with the given color.</p>
 <p>See <a href="graphics.html#al_draw_bitmap">al_draw_bitmap</a> for a note on restrictions on which bitmaps can be drawn where.</p>
 <p>See also: <a href="graphics.html#al_draw_tinted_bitmap">al_draw_tinted_bitmap</a></p>
 <h2 id="al_draw_pixel"><a href="#al_draw_pixel">al_draw_pixel</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_pixel(<span class="dt">float</span> x, <span class="dt">float</span> y, ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/drawing.c#L64">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/drawing.c#L64">Source Code</a></p>
 <p>Draws a single pixel at x, y. This function, unlike <a href="graphics.html#al_put_pixel">al_put_pixel</a>, does blending and, unlike <a href="graphics.html#al_put_blended_pixel">al_put_blended_pixel</a>, respects the transformations (that is, the pixel's position is transformed, but its size is unaffected - it remains a pixel). This function can be slow if called often; if you need to draw a lot of pixels consider using <a href="primitives.html#al_draw_prim">al_draw_prim</a> with ALLE [...]
 <ul>
 <li>x - destination x</li>
@@ -731,7 +806,7 @@ ASSERT(al_get_parent_bitmap(b) == a && al_get_parent_bitmap(c) == a);</c
 <h2 id="al_draw_rotated_bitmap"><a href="#al_draw_rotated_bitmap">al_draw_rotated_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_rotated_bitmap(ALLEGRO_BITMAP *bitmap,
    <span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> dx, <span class="dt">float</span> dy, <span class="dt">float</span> angle, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_draw.c#L205">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_draw.c#L205">Source Code</a></p>
 <p>Draws a rotated version of the given bitmap to the target bitmap. The bitmap is rotated by 'angle' radians clockwise.</p>
 <p>The point at cx/cy relative to the upper left corner of the bitmap will be drawn at dx/dy and the bitmap is rotated around this point. If cx,cy is 0,0 the bitmap will rotate around its upper left corner.</p>
 <ul>
@@ -753,7 +828,7 @@ al_draw_rotated_bitmap(bitmap, w / <span class="dv">2</span>, h / <span class="d
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_tinted_rotated_bitmap(ALLEGRO_BITMAP *bitmap,
    ALLEGRO_COLOR tint,
    <span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> dx, <span class="dt">float</span> dy, <span class="dt">float</span> angle, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_draw.c#L194">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_draw.c#L194">Source Code</a></p>
 <p>Like <a href="graphics.html#al_draw_rotated_bitmap">al_draw_rotated_bitmap</a> but multiplies all colors in the bitmap with the given color.</p>
 <p>See <a href="graphics.html#al_draw_bitmap">al_draw_bitmap</a> for a note on restrictions on which bitmaps can be drawn where.</p>
 <p>See also: <a href="graphics.html#al_draw_tinted_bitmap">al_draw_tinted_bitmap</a></p>
@@ -761,7 +836,7 @@ al_draw_rotated_bitmap(bitmap, w / <span class="dv">2</span>, h / <span class="d
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_scaled_rotated_bitmap(ALLEGRO_BITMAP *bitmap,
    <span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> dx, <span class="dt">float</span> dy, <span class="dt">float</span> xscale, <span class="dt">float</span> yscale,
    <span class="dt">float</span> angle, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_draw.c#L244">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_draw.c#L244">Source Code</a></p>
 <p>Like <a href="graphics.html#al_draw_rotated_bitmap">al_draw_rotated_bitmap</a>, but can also scale the bitmap.</p>
 <p>The point at cx/cy in the bitmap will be drawn at dx/dy and the bitmap is rotated and scaled around this point.</p>
 <ul>
@@ -781,7 +856,7 @@ al_draw_rotated_bitmap(bitmap, w / <span class="dv">2</span>, h / <span class="d
    ALLEGRO_COLOR tint,
    <span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> dx, <span class="dt">float</span> dy, <span class="dt">float</span> xscale, <span class="dt">float</span> yscale,
    <span class="dt">float</span> angle, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_draw.c#L215">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_draw.c#L215">Source Code</a></p>
 <p>Like <a href="graphics.html#al_draw_scaled_rotated_bitmap">al_draw_scaled_rotated_bitmap</a> but multiplies all colors in the bitmap with the given color.</p>
 <p>See <a href="graphics.html#al_draw_bitmap">al_draw_bitmap</a> for a note on restrictions on which bitmaps can be drawn where.</p>
 <p>See also: <a href="graphics.html#al_draw_tinted_bitmap">al_draw_tinted_bitmap</a></p>
@@ -791,7 +866,7 @@ al_draw_rotated_bitmap(bitmap, w / <span class="dv">2</span>, h / <span class="d
    ALLEGRO_COLOR tint,
    <span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> dx, <span class="dt">float</span> dy, <span class="dt">float</span> xscale, <span class="dt">float</span> yscale,
    <span class="dt">float</span> angle, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_draw.c#L229">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_draw.c#L229">Source Code</a></p>
 <p>Like <a href="graphics.html#al_draw_tinted_scaled_rotated_bitmap">al_draw_tinted_scaled_rotated_bitmap</a> but you specify an area within the bitmap to be drawn.</p>
 <p>You can get the same effect with a sub bitmap:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_draw_tinted_scaled_rotated_bitmap(bitmap, sx, sy, sw, sh, tint,
@@ -808,7 +883,7 @@ al_draw_tinted_scaled_rotated_bitmap(sub_bitmap, tint, cx, cy,
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_scaled_bitmap(ALLEGRO_BITMAP *bitmap,
    <span class="dt">float</span> sx, <span class="dt">float</span> sy, <span class="dt">float</span> sw, <span class="dt">float</span> sh,
    <span class="dt">float</span> dx, <span class="dt">float</span> dy, <span class="dt">float</span> dw, <span class="dt">float</span> dh, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_draw.c#L180">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_draw.c#L180">Source Code</a></p>
 <p>Draws a scaled version of the given bitmap to the target bitmap.</p>
 <ul>
 <li>sx - source x</li>
@@ -828,29 +903,31 @@ al_draw_tinted_scaled_rotated_bitmap(sub_bitmap, tint, cx, cy,
    ALLEGRO_COLOR tint,
    <span class="dt">float</span> sx, <span class="dt">float</span> sy, <span class="dt">float</span> sw, <span class="dt">float</span> sh,
    <span class="dt">float</span> dx, <span class="dt">float</span> dy, <span class="dt">float</span> dw, <span class="dt">float</span> dh, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_draw.c#L166">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_draw.c#L166">Source Code</a></p>
 <p>Like <a href="graphics.html#al_draw_scaled_bitmap">al_draw_scaled_bitmap</a> but multiplies all colors in the bitmap with the given color.</p>
 <p>See <a href="graphics.html#al_draw_bitmap">al_draw_bitmap</a> for a note on restrictions on which bitmaps can be drawn where.</p>
 <p>See also: <a href="graphics.html#al_draw_tinted_bitmap">al_draw_tinted_bitmap</a></p>
 <h2 id="al_get_target_bitmap"><a href="#al_get_target_bitmap">al_get_target_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_get_target_bitmap(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L499">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L500">Source Code</a></p>
 <p>Return the target bitmap of the calling thread.</p>
 <p>See also: <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a></p>
 <h2 id="al_put_pixel"><a href="#al_put_pixel">al_put_pixel</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_put_pixel(<span class="dt">int</span> x, <span class="dt">int</span> y, ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_pixel.c#L131">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_pixel.c#L131">Source Code</a></p>
 <p>Draw a single pixel on the target bitmap. This operation is slow on non-memory bitmaps. Consider locking the bitmap if you are going to use this function multiple times on the same bitmap. This function is not affected by the transformations or the color blenders.</p>
 <p>See also: <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>, <a href="graphics.html#al_get_pixel">al_get_pixel</a>, <a href="graphics.html#al_put_blended_pixel">al_put_blended_pixel</a>, <a href="graphics.html#al_lock_bitmap">al_lock_bitmap</a></p>
 <h2 id="al_put_blended_pixel"><a href="#al_put_blended_pixel">al_put_blended_pixel</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_put_blended_pixel(<span class="dt">int</span> x, <span class="dt">int</span> y, ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_pixel.c#L139">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_pixel.c#L139">Source Code</a></p>
 <p>Like <a href="graphics.html#al_put_pixel">al_put_pixel</a>, but the pixel color is blended using the current blenders before being drawn.</p>
 <p>See also: <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a>, <a href="graphics.html#al_put_pixel">al_put_pixel</a></p>
+<h1 id="target-bitmap"><a href="#target-bitmap">Target bitmap</a></h1>
 <h2 id="al_set_target_bitmap"><a href="#al_set_target_bitmap">al_set_target_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_target_bitmap(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L393">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L394">Source Code</a></p>
 <p>This function selects the bitmap to which all subsequent drawing operations in the calling thread will draw to. To return to drawing to a display, set the backbuffer of the display as the target bitmap, using <a href="display.html#al_get_backbuffer">al_get_backbuffer</a>. As a convenience, you may also use <a href="graphics.html#al_set_target_backbuffer">al_set_target_backbuffer</a>.</p>
+<p>Each allegro bitmap maintains two transformation matrices associated with it for drawing onto the bitmap. There is a view matrix and a projection matrix. When you call al_set_target_bitmap, these will be made current for the bitmap, affecting global OpenGL and DirectX states depending on the driver in use.</p>
 <p>Each video bitmap is tied to a display. When a video bitmap is set to as the target bitmap, the display that the bitmap belongs to is automatically made "current" for the calling thread (if it is not current already). Then drawing other bitmaps which are tied to the same display can be hardware accelerated.</p>
 <p>A single display cannot be current for multiple threads simultaneously. If you need to release a display, so it is not current for the calling thread, call <code>al_set_target_bitmap(NULL);</code></p>
 <p>Setting a memory bitmap as the target bitmap will not change which display is current for the calling thread.</p>
@@ -876,35 +953,35 @@ al_draw_line(x1, y1, x2, y2, color, <span class="dv">0</span>);</code></pre>
 <p>See also: <a href="graphics.html#al_get_target_bitmap">al_get_target_bitmap</a>, <a href="graphics.html#al_set_target_backbuffer">al_set_target_backbuffer</a></p>
 <h2 id="al_set_target_backbuffer"><a href="#al_set_target_backbuffer">al_set_target_backbuffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_target_backbuffer(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L490">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L491">Source Code</a></p>
 <p>Same as <code>al_set_target_bitmap(al_get_backbuffer(display));</code></p>
 <p>See also: <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a>, <a href="display.html#al_get_backbuffer">al_get_backbuffer</a></p>
 <h2 id="al_get_current_display"><a href="#al_get_current_display">al_get_current_display</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_DISPLAY *al_get_current_display(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L380">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L381">Source Code</a></p>
 <p>Return the display that is "current" for the calling thread, or NULL if there is none.</p>
 <p>See also: <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a></p>
 <h1 id="blending-modes"><a href="#blending-modes">Blending modes</a></h1>
 <h2 id="al_get_blender"><a href="#al_get_blender">al_get_blender</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_blender(<span class="dt">int</span> *op, <span class="dt">int</span> *src, <span class="dt">int</span> *dst)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L564">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L565">Source Code</a></p>
 <p>Returns the active blender for the current thread. You can pass NULL for values you are not interested in.</p>
 <p>See also: <a href="graphics.html#al_set_blender">al_set_blender</a>, <a href="graphics.html#al_get_separate_blender">al_get_separate_blender</a></p>
 <h2 id="al_get_separate_blender"><a href="#al_get_separate_blender">al_get_separate_blender</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_separate_blender(<span class="dt">int</span> *op, <span class="dt">int</span> *src, <span class="dt">int</span> *dst,
    <span class="dt">int</span> *alpha_op, <span class="dt">int</span> *alpha_src, <span class="dt">int</span> *alpha_dst)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L586">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L587">Source Code</a></p>
 <p>Returns the active blender for the current thread. You can pass NULL for values you are not interested in.</p>
 <p>See also: <a href="graphics.html#al_set_separate_blender">al_set_separate_blender</a>, <a href="graphics.html#al_get_blender">al_get_blender</a></p>
 <h2 id="al_get_blend_color"><a href="#al_get_blend_color">al_get_blend_color</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COLOR al_get_blend_color(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L573">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L574">Source Code</a></p>
 <p>Returns the color currently used for constant color blending (white by default).</p>
 <p>See also: <a href="graphics.html#al_set_blend_color">al_set_blend_color</a>, <a href="graphics.html#al_set_blender">al_set_blender</a></p>
 <p>Since: 5.1.12</p>
 <h2 id="al_set_blender"><a href="#al_set_blender">al_set_blender</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_blender(<span class="dt">int</span> op, <span class="dt">int</span> src, <span class="dt">int</span> dst)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L512">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L513">Source Code</a></p>
 <p>Sets the function to use for blending for the current thread.</p>
 <p>Blending means, the source and destination colors are combined in drawing operations.</p>
 <p>Assume the source color (e.g. color of a rectangle to draw, or pixel of a bitmap to draw) is given as its red/green/blue/alpha components (if the bitmap has no alpha it always is assumed to be fully opaque, so 255 for 8-bit or 1.0 for floating point): <em>s = s.r, s.g, s.b, s.a</em>. And this color is drawn to a destination, which already has a color: <em>d = d.r, d.g, d.b, d.a</em>.</p>
@@ -980,29 +1057,29 @@ a = d.a * 0 + s.a * d.a</code></pre>
 <h2 id="al_set_separate_blender"><a href="#al_set_separate_blender">al_set_separate_blender</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_separate_blender(<span class="dt">int</span> op, <span class="dt">int</span> src, <span class="dt">int</span> dst,
    <span class="dt">int</span> alpha_op, <span class="dt">int</span> alpha_src, <span class="dt">int</span> alpha_dst)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L534">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L535">Source Code</a></p>
 <p>Like <a href="graphics.html#al_set_blender">al_set_blender</a>, but allows specifying a separate blending operation for the alpha channel. This is useful if your target bitmap also has an alpha channel and the two alpha channels need to be combined in a different way than the color components.</p>
 <p>See also: <a href="graphics.html#al_set_blender">al_set_blender</a>, <a href="graphics.html#al_get_blender">al_get_blender</a>, <a href="graphics.html#al_get_separate_blender">al_get_separate_blender</a></p>
 <h2 id="al_set_blend_color"><a href="#al_set_blend_color">al_set_blend_color</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_blend_color(ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L521">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L522">Source Code</a></p>
 <p>Sets the color to use for blending when using the ALLEGRO_CONST_COLOR or ALLEGRO_INVERSE_CONST_COLOR blend functions. See <a href="graphics.html#al_set_blender">al_set_blender</a> for more information.</p>
 <p>See also: <a href="graphics.html#al_set_blender">al_set_blender</a>, <a href="graphics.html#al_get_blend_color">al_get_blend_color</a></p>
 <p>Since: 5.1.12</p>
 <h1 id="clipping"><a href="#clipping">Clipping</a></h1>
 <h2 id="al_get_clipping_rectangle"><a href="#al_get_clipping_rectangle">al_get_clipping_rectangle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_clipping_rectangle(<span class="dt">int</span> *x, <span class="dt">int</span> *y, <span class="dt">int</span> *w, <span class="dt">int</span> *h)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L391">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L417">Source Code</a></p>
 <p>Gets the clipping rectangle of the target bitmap.</p>
 <p>See also: <a href="graphics.html#al_set_clipping_rectangle">al_set_clipping_rectangle</a></p>
 <h2 id="al_set_clipping_rectangle"><a href="#al_set_clipping_rectangle">al_set_clipping_rectangle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_clipping_rectangle(<span class="dt">int</span> x, <span class="dt">int</span> y, <span class="dt">int</span> width, <span class="dt">int</span> height)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L341">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L367">Source Code</a></p>
 <p>Set the region of the target bitmap or display that pixels get clipped to. The default is to clip pixels to the entire bitmap.</p>
 <p>See also: <a href="graphics.html#al_get_clipping_rectangle">al_get_clipping_rectangle</a>, <a href="graphics.html#al_reset_clipping_rectangle">al_reset_clipping_rectangle</a></p>
 <h2 id="al_reset_clipping_rectangle"><a href="#al_reset_clipping_rectangle">al_reset_clipping_rectangle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_reset_clipping_rectangle(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L376">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L402">Source Code</a></p>
 <p>Equivalent to calling `al_set_clipping_rectangle(0, 0, w, h)' where <em>w</em> and <em>h</em> are the width and height of the target bitmap respectively.</p>
 <p>Does nothing if there is no target bitmap.</p>
 <p>See also: <a href="graphics.html#al_set_clipping_rectangle">al_set_clipping_rectangle</a></p>
@@ -1010,26 +1087,26 @@ a = d.a * 0 + s.a * d.a</code></pre>
 <h1 id="graphics-utility-functions"><a href="#graphics-utility-functions">Graphics utility functions</a></h1>
 <h2 id="al_convert_mask_to_alpha"><a href="#al_convert_mask_to_alpha">al_convert_mask_to_alpha</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_convert_mask_to_alpha(ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR mask_color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap.c#L247">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L250">Source Code</a></p>
 <p>Convert the given mask color to an alpha channel in the bitmap. Can be used to convert older 4.2-style bitmaps with magic pink to alpha-ready bitmaps.</p>
 <p>See also: <a href="graphics.html#allegro_color">ALLEGRO_COLOR</a></p>
 <h1 id="deferred-drawing"><a href="#deferred-drawing">Deferred drawing</a></h1>
 <h2 id="al_hold_bitmap_drawing"><a href="#al_hold_bitmap_drawing">al_hold_bitmap_drawing</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_hold_bitmap_drawing(bool hold)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L497">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L493">Source Code</a></p>
 <p>Enables or disables deferred bitmap drawing. This allows for efficient drawing of many bitmaps that share a parent bitmap, such as sub-bitmaps from a tilesheet or simply identical bitmaps. Drawing bitmaps that do not share a parent is less efficient, so it is advisable to stagger bitmap drawing calls such that the parent bitmap is the same for large number of those calls. While deferred bitmap drawing is enabled, the only functions that can be used are the bitmap drawing functions and [...]
 <p>No drawing is guaranteed to take place until you disable the hold. Thus, the idiom of this function's usage is to enable the deferred bitmap drawing, draw as many bitmaps as possible, taking care to stagger bitmaps that share parent bitmaps, and then disable deferred drawing. As mentioned above, this function also works with bitmap and truetype fonts, so if multiple lines of text need to be drawn, this function can speed things up.</p>
 <p>See also: <a href="graphics.html#al_is_bitmap_drawing_held">al_is_bitmap_drawing_held</a></p>
 <h2 id="al_is_bitmap_drawing_held"><a href="#al_is_bitmap_drawing_held">al_is_bitmap_drawing_held</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_bitmap_drawing_held(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L533">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L529">Source Code</a></p>
 <p>Returns whether the deferred bitmap drawing mode is turned on or off.</p>
 <p>See also: <a href="graphics.html#al_hold_bitmap_drawing">al_hold_bitmap_drawing</a></p>
 <h1 id="image-io"><a href="#image-io">Image I/O</a></h1>
 <h2 id="al_register_bitmap_loader"><a href="#al_register_bitmap_loader">al_register_bitmap_loader</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_bitmap_loader(<span class="dt">const</span> <span class="dt">char</span> *extension,
    ALLEGRO_BITMAP *(*loader)(<span class="dt">const</span> <span class="dt">char</span> *filename, <span class="dt">int</span> flags))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L128">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L128">Source Code</a></p>
 <p>Register a handler for <a href="graphics.html#al_load_bitmap">al_load_bitmap</a>. The given function will be used to handle the loading of bitmaps files with the given extension.</p>
 <p>The extension should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>loader</code> argument may be NULL to unregister an entry.</p>
@@ -1038,7 +1115,7 @@ a = d.a * 0 + s.a * d.a</code></pre>
 <h2 id="al_register_bitmap_saver"><a href="#al_register_bitmap_saver">al_register_bitmap_saver</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_bitmap_saver(<span class="dt">const</span> <span class="dt">char</span> *extension,
    bool (*saver)(<span class="dt">const</span> <span class="dt">char</span> *filename, ALLEGRO_BITMAP *bmp))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L137">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L137">Source Code</a></p>
 <p>Register a handler for <a href="graphics.html#al_save_bitmap">al_save_bitmap</a>. The given function will be used to handle the saving of bitmaps files with the given extension.</p>
 <p>The extension should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>saver</code> argument may be NULL to unregister an entry.</p>
@@ -1047,7 +1124,7 @@ a = d.a * 0 + s.a * d.a</code></pre>
 <h2 id="al_register_bitmap_loader_f"><a href="#al_register_bitmap_loader_f">al_register_bitmap_loader_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_bitmap_loader_f(<span class="dt">const</span> <span class="dt">char</span> *extension,
    ALLEGRO_BITMAP *(*fs_loader)(ALLEGRO_FILE *fp, <span class="dt">int</span> flags))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L146">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L146">Source Code</a></p>
 <p>Register a handler for <a href="graphics.html#al_load_bitmap_f">al_load_bitmap_f</a>. The given function will be used to handle the loading of bitmaps files with the given extension.</p>
 <p>The extension should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>fs_loader</code> argument may be NULL to unregister an entry.</p>
@@ -1056,7 +1133,7 @@ a = d.a * 0 + s.a * d.a</code></pre>
 <h2 id="al_register_bitmap_saver_f"><a href="#al_register_bitmap_saver_f">al_register_bitmap_saver_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_bitmap_saver_f(<span class="dt">const</span> <span class="dt">char</span> *extension,
    bool (*fs_saver)(ALLEGRO_FILE *fp, ALLEGRO_BITMAP *bmp))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L155">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L155">Source Code</a></p>
 <p>Register a handler for <a href="graphics.html#al_save_bitmap_f">al_save_bitmap_f</a>. The given function will be used to handle the saving of bitmaps files with the given extension.</p>
 <p>The extension should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>saver_f</code> argument may be NULL to unregister an entry.</p>
@@ -1064,7 +1141,7 @@ a = d.a * 0 + s.a * d.a</code></pre>
 <p>See also: <a href="graphics.html#al_register_bitmap_saver">al_register_bitmap_saver</a></p>
 <h2 id="al_load_bitmap"><a href="#al_load_bitmap">al_load_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_load_bitmap(<span class="dt">const</span> <span class="dt">char</span> *filename)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L173">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L173">Source Code</a></p>
 <p>Loads an image file into a new <a href="graphics.html#allegro_bitmap">ALLEGRO_BITMAP</a>. The file type is determined by the extension, except if the file has no extension in which case <a href="graphics.html#al_identify_bitmap">al_identify_bitmap</a> is used instead.</p>
 <p>Returns NULL on error.</p>
 <p>This is the same as calling <a href="graphics.html#al_load_bitmap_flags">al_load_bitmap_flags</a> with a flags parameter of 0.</p>
@@ -1074,7 +1151,7 @@ a = d.a * 0 + s.a * d.a</code></pre>
 <p>See also: <a href="graphics.html#al_load_bitmap_flags">al_load_bitmap_flags</a>, <a href="graphics.html#al_load_bitmap_f">al_load_bitmap_f</a>, <a href="graphics.html#al_register_bitmap_loader">al_register_bitmap_loader</a>, <a href="graphics.html#al_set_new_bitmap_format">al_set_new_bitmap_format</a>, <a href="graphics.html#al_set_new_bitmap_flags">al_set_new_bitmap_flags</a>, <a href="image.html#al_init_image_addon">al_init_image_addon</a></p>
 <h2 id="al_load_bitmap_flags"><a href="#al_load_bitmap_flags">al_load_bitmap_flags</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_load_bitmap_flags(<span class="dt">const</span> <span class="dt">char</span> *filename, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L190">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L190">Source Code</a></p>
 <p>Loads an image file into a new <a href="graphics.html#allegro_bitmap">ALLEGRO_BITMAP</a>. The file type is determined by the extension, except if the file has no extension in which case <a href="graphics.html#al_identify_bitmap">al_identify_bitmap</a> is used instead.</p>
 <p>Returns NULL on error.</p>
 <p>The flags parameter may be a combination of the following constants:</p>
@@ -1137,7 +1214,7 @@ al_draw_bitmap(tmp_buffer, <span class="dv">0</span>, <span class="dv">0</span>,
 <p>See also: <a href="graphics.html#al_load_bitmap">al_load_bitmap</a></p>
 <h2 id="al_load_bitmap_f"><a href="#al_load_bitmap_f">al_load_bitmap_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_load_bitmap_f(ALLEGRO_FILE *fp, <span class="dt">const</span> <span class="dt">char</span> *ident)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L247">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L247">Source Code</a></p>
 <p>Loads an image from an <a href="file.html#allegro_file">ALLEGRO_FILE</a> stream into a new <a href="graphics.html#allegro_bitmap">ALLEGRO_BITMAP</a>. The file type is determined by the passed 'ident' parameter, which is a file name extension including the leading dot. If (and only if) 'ident' is NULL, the file type is determined with <a href="graphics.html#al_identify_bitmap_f">al_identify_bitmap_f</a> instead.</p>
 <p>This is the same as calling <a href="graphics.html#al_load_bitmap_flags_f">al_load_bitmap_flags_f</a> with 0 for the flags parameter.</p>
 <p>Returns NULL on error. The file remains open afterwards.</p>
@@ -1148,7 +1225,7 @@ al_draw_bitmap(tmp_buffer, <span class="dv">0</span>, <span class="dv">0</span>,
 <h2 id="al_load_bitmap_flags_f"><a href="#al_load_bitmap_flags_f">al_load_bitmap_flags_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_load_bitmap_flags_f(ALLEGRO_FILE *fp,
    <span class="dt">const</span> <span class="dt">char</span> *ident, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L264">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L264">Source Code</a></p>
 <p>Loads an image from an <a href="file.html#allegro_file">ALLEGRO_FILE</a> stream into a new <a href="graphics.html#allegro_bitmap">ALLEGRO_BITMAP</a>. The file type is determined by the passed 'ident' parameter, which is a file name extension including the leading dot. If (and only if) 'ident' is NULL, the file type is determined with <a href="graphics.html#al_identify_bitmap_f">al_identify_bitmap_f</a> instead.</p>
 <p>The flags parameter is the same as for <a href="graphics.html#al_load_bitmap_flags">al_load_bitmap_flags</a>.</p>
 <p>Returns NULL on error. The file remains open afterwards.</p>
@@ -1159,7 +1236,7 @@ al_draw_bitmap(tmp_buffer, <span class="dv">0</span>, <span class="dv">0</span>,
 <p>See also: <a href="graphics.html#al_load_bitmap_f">al_load_bitmap_f</a>, <a href="graphics.html#al_load_bitmap_flags">al_load_bitmap_flags</a></p>
 <h2 id="al_save_bitmap"><a href="#al_save_bitmap">al_save_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_save_bitmap(<span class="dt">const</span> <span class="dt">char</span> *filename, ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L226">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L226">Source Code</a></p>
 <p>Saves an <a href="graphics.html#allegro_bitmap">ALLEGRO_BITMAP</a> to an image file. The file type is determined by the extension.</p>
 <p>Returns true on success, false on error.</p>
 <blockquote>
@@ -1169,7 +1246,7 @@ al_draw_bitmap(tmp_buffer, <span class="dv">0</span>, <span class="dv">0</span>,
 <h2 id="al_save_bitmap_f"><a href="#al_save_bitmap_f">al_save_bitmap_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_save_bitmap_f(ALLEGRO_FILE *fp, <span class="dt">const</span> <span class="dt">char</span> *ident,
    ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L281">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L281">Source Code</a></p>
 <p>Saves an <a href="graphics.html#allegro_bitmap">ALLEGRO_BITMAP</a> to an <a href="file.html#allegro_file">ALLEGRO_FILE</a> stream. The file type is determined by the passed 'ident' parameter, which is a file name extension including the leading dot.</p>
 <p>Returns true on success, false on error. The file remains open afterwards.</p>
 <blockquote>
@@ -1179,7 +1256,7 @@ al_draw_bitmap(tmp_buffer, <span class="dv">0</span>, <span class="dv">0</span>,
 <h2 id="al_register_bitmap_identifier"><a href="#al_register_bitmap_identifier">al_register_bitmap_identifier</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_register_bitmap_identifier(<span class="dt">const</span> <span class="dt">char</span> *extension,
    bool (*identifier)(ALLEGRO_FILE *f))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L164">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L164">Source Code</a></p>
 <p>Register an identify handler for <a href="graphics.html#al_identify_bitmap">al_identify_bitmap</a>. The given function will be used to detect files for the given extension. It will be called with a single argument of type <a href="file.html#allegro_file">ALLEGRO_FILE</a> which is a file handle opened for reading and located at the first byte of the file. The handler should try to read as few bytes as possible to safely determine if the given file contents correspond to the type with t [...]
 <p>The extension should include the leading dot ('.') character. It will be matched case-insensitively.</p>
 <p>The <code>identifier</code> argument may be NULL to unregister an entry.</p>
@@ -1188,13 +1265,13 @@ al_draw_bitmap(tmp_buffer, <span class="dv">0</span>, <span class="dv">0</span>,
 <p>See also: <a href="graphics.html#al_identify_bitmap">al_identify_bitmap</a></p>
 <h2 id="al_identify_bitmap"><a href="#al_identify_bitmap">al_identify_bitmap</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> <span class="dt">const</span> *al_identify_bitmap(<span class="dt">char</span> <span class="dt">const</span> *filename)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L307">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L307">Source Code</a></p>
 <p>This works exactly as <a href="graphics.html#al_identify_bitmap_f">al_identify_bitmap_f</a> but you specify the filename of the file for which to detect the type and not a file handle. The extension, if any, of the passed filename is not taken into account - only the file contents.</p>
 <p>Since: 5.1.12</p>
 <p>See also: <a href="image.html#al_init_image_addon">al_init_image_addon</a>, <a href="graphics.html#al_identify_bitmap_f">al_identify_bitmap_f</a>, <a href="graphics.html#al_register_bitmap_identifier">al_register_bitmap_identifier</a></p>
 <h2 id="al_identify_bitmap_f"><a href="#al_identify_bitmap_f">al_identify_bitmap_f</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> <span class="dt">const</span> *al_identify_bitmap_f(ALLEGRO_FILE *fp)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/bitmap_io.c#L296">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap_io.c#L296">Source Code</a></p>
 <p>Tries to guess the bitmap file type of the open ALLEGRO_FILE by reading the first few bytes. By default Allegro cannot recognize any file types, but calling <a href="image.html#al_init_image_addon">al_init_image_addon</a> will add detection of (some of) the types it can read. You can also use <a href="graphics.html#al_register_bitmap_identifier">al_register_bitmap_identifier</a> to add identification for custom file types.</p>
 <p>Returns a pointer to a static string with a file extension for the type, including the leading dot. For example ".png" or ".jpg". Returns NULL if the bitmap type cannot be determined.</p>
 <p>Since: 5.1.12</p>
@@ -1202,7 +1279,7 @@ al_draw_bitmap(tmp_buffer, <span class="dv">0</span>, <span class="dv">0</span>,
 <h1 id="render-state"><a href="#render-state">Render State</a></h1>
 <h2 id="allegro_render_state"><a href="#allegro_render_state">ALLEGRO_RENDER_STATE</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_RENDER_STATE {</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/render_state.h#L10">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/render_state.h#L12">Source Code</a></p>
 <p>Possible render states which can be set with <a href="graphics.html#al_set_render_state">al_set_render_state</a>:</p>
 <dl>
 <dt>ALLEGRO_ALPHA_TEST</dt>
@@ -1228,7 +1305,7 @@ al_draw_bitmap(tmp_buffer, <span class="dv">0</span>, <span class="dv">0</span>,
 <p>See also: <a href="graphics.html#al_set_render_state">al_set_render_state</a>, <a href="graphics.html#allegro_render_function">ALLEGRO_RENDER_FUNCTION</a>, <a href="graphics.html#allegro_write_mask_flags">ALLEGRO_WRITE_MASK_FLAGS</a></p>
 <h2 id="allegro_render_function"><a href="#allegro_render_function">ALLEGRO_RENDER_FUNCTION</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_RENDER_FUNCTION {</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/render_state.h#L24">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/render_state.h#L26">Source Code</a></p>
 <p>Possible functions are:</p>
 <ul>
 <li>ALLEGRO_RENDER_NEVER</li>
@@ -1244,7 +1321,7 @@ al_draw_bitmap(tmp_buffer, <span class="dv">0</span>, <span class="dv">0</span>,
 <p>See also: <a href="graphics.html#al_set_render_state">al_set_render_state</a></p>
 <h2 id="allegro_write_mask_flags"><a href="#allegro_write_mask_flags">ALLEGRO_WRITE_MASK_FLAGS</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_WRITE_MASK_FLAGS {</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/render_state.h#L37">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/render_state.h#L39">Source Code</a></p>
 <p>Each enabled bit means the corresponding value is written, a disabled bit means it is not.</p>
 <ul>
 <li>ALLEGRO_MASK_RED</li>
@@ -1259,14 +1336,33 @@ al_draw_bitmap(tmp_buffer, <span class="dv">0</span>, <span class="dv">0</span>,
 <p>See also: <a href="graphics.html#al_set_render_state">al_set_render_state</a></p>
 <h2 id="al_set_render_state"><a href="#al_set_render_state">al_set_render_state</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_render_state(ALLEGRO_RENDER_STATE state, <span class="dt">int</span> value)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/display.c#L595">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L591">Source Code</a></p>
 <p>Set one of several render attributes; see <a href="graphics.html#allegro_render_state">ALLEGRO_RENDER_STATE</a> for details.</p>
 <p>This function does nothing if the target bitmap is a memory bitmap.</p>
 <p>Since: 5.1.2</p>
 <p>See also: <a href="graphics.html#allegro_render_state">ALLEGRO_RENDER_STATE</a>, <a href="graphics.html#allegro_render_function">ALLEGRO_RENDER_FUNCTION</a>, <a href="graphics.html#allegro_write_mask_flags">ALLEGRO_WRITE_MASK_FLAGS</a></p>
+<h2 id="al_backup_dirty_bitmap"><a href="#al_backup_dirty_bitmap">al_backup_dirty_bitmap</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_backup_dirty_bitmap(ALLEGRO_BITMAP *bitmap)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/bitmap.c#L678">Source Code</a></p>
+<p>On some platforms, notably Windows Direct3D and Android, textures may be lost at any time for events such as display resize or switching out of the app. On those platforms, bitmaps created without the ALLEGRO_NO_PRESERVE_TEXTURE flag automatically get backed up to system memory every time al_flip_display is called.</p>
+<p>This function gives you more control over when your bitmaps get backed up. By calling this function after modifying a bitmap, you can make sure the bitmap is backed up right away instead of during the next flip.</p>
+<p>Since: 5.2.1</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This API is new and subject to refinement.</p>
+</blockquote>
+<p>See also: <a href="graphics.html#al_backup_dirty_bitmaps">al_backup_dirty_bitmaps</a>, <a href="graphics.html#al_create_bitmap">al_create_bitmap</a></p>
+<h2 id="al_backup_dirty_bitmaps"><a href="#al_backup_dirty_bitmaps">al_backup_dirty_bitmaps</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_backup_dirty_bitmaps(ALLEGRO_DISPLAY *display)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/display.c#L629">Source Code</a></p>
+<p>Backs up all of a display's bitmaps to system memory.</p>
+<p>Since: 5.2.1</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This API is new and subject to refinement.</p>
+</blockquote>
+<p>See also: <a href="graphics.html#al_backup_dirty_bitmap">al_backup_dirty_bitmap</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:39 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:58 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/haptic.html b/docs/html/refman/haptic.html
index ced7da2..ed45214 100644
--- a/docs/html/refman/haptic.html
+++ b/docs/html/refman/haptic.html
@@ -159,7 +159,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Currently force feedback is fully supported on Linux and on Windows for DirectInput compatible devices. There is also minimal support for Android. It is not yet supported on OSX, iOS, or on Windows for XInput compatible devices.</p>
 <h1 id="allegro_haptic"><a href="#allegro_haptic">ALLEGRO_HAPTIC</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_HAPTIC ALLEGRO_HAPTIC;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/haptic.h#L64">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/haptic.h#L64">Source Code</a></p>
 <p>This is an abstract data type representing a haptic device that supports force feedback or vibration.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -168,7 +168,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="haptic.html#al_get_haptic_from_joystick">al_get_haptic_from_joystick</a></p>
 <h1 id="allegro_haptic_constants"><a href="#allegro_haptic_constants">ALLEGRO_HAPTIC_CONSTANTS</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">enum</span> ALLEGRO_HAPTIC_CONSTANTS</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/haptic.h#L37">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/haptic.h#L37">Source Code</a></p>
 <p>This enum contains flags that are used to define haptic effects and capabilities. If the flag is set in the return value of <a href="haptic.html#al_get_haptic_capabilities">al_get_haptic_capabilities</a>, it means the device supports the given effect. The value of these flags should be set into a <a href="haptic.html#allegro_haptic_effect">ALLEGRO_HAPTIC_EFFECT</a> struct to determine what kind of haptic effect should be played.</p>
 <ul>
 <li>ALLEGRO_HAPTIC_RUMBLE - simple vibration effects</li>
@@ -198,7 +198,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="haptic.html#al_get_haptic_capabilities">al_get_haptic_capabilities</a>, <a href="haptic.html#allegro_haptic_effect">ALLEGRO_HAPTIC_EFFECT</a></p>
 <h1 id="allegro_haptic_effect"><a href="#allegro_haptic_effect">ALLEGRO_HAPTIC_EFFECT</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">struct</span> ALLEGRO_HAPTIC_EFFECT</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/haptic.h#L169">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/haptic.h#L169">Source Code</a></p>
 <p>This struct models a particular haptic or vibration effect. It needs to be filled in correctly and uploaded to a haptic device before the device can play it back.</p>
 <p><em>Fields:</em></p>
 <dl>
@@ -252,7 +252,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="allegro_haptic_effect_id"><a href="#allegro_haptic_effect_id">ALLEGRO_HAPTIC_EFFECT_ID</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_HAPTIC_EFFECT_ID ALLEGRO_HAPTIC_EFFECT_ID;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/haptic.h#L183">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/haptic.h#L183">Source Code</a></p>
 <p>This struct is used as a handle to control playback of a haptic effect and should be considered opaque. Its implementation is visible merely to allow allocation by the users of the Allegro library.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -260,7 +260,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_install_haptic"><a href="#al_install_haptic">al_install_haptic</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_install_haptic(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L34">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L34">Source Code</a></p>
 <p>Installs the haptic (force feedback) device subsystem. This must be called before using any other haptic-related functions. Returns true if the haptics subsystem could be initialized correctly, false in case of error.</p>
 <p>For portability you should first open a display before calling <a href="haptic.html#al_install_haptic">al_install_haptic</a>. On some platforms, such as DirectInput under Windows, <a href="haptic.html#al_install_haptic">al_install_haptic</a> will only work if at least one active display is available. This display must stay available until <a href="haptic.html#al_uninstall_haptic">al_uninstall_haptic</a> is called.</p>
 <p>If you need to close and reopen your active display for example, then you should call <a href="haptic.html#al_uninstall_haptic">al_uninstall_haptic</a> before closing the display, and <a href="haptic.html#al_install_haptic">al_install_haptic</a> after opening it again.</p>
@@ -270,7 +270,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_uninstall_haptic"><a href="#al_uninstall_haptic">al_uninstall_haptic</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_uninstall_haptic(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L64">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L64">Source Code</a></p>
 <p>Uninstalls the haptic device subsystem. This is useful since on some platforms haptic effects are bound to the active display.</p>
 <p>If you need to close and reopen your active display for example, then you should call <a href="haptic.html#al_uninstall_haptic">al_uninstall_haptic</a> before closing the display, and <a href="haptic.html#al_install_haptic">al_install_haptic</a> after opening it again.</p>
 <p>Since: 5.1.8</p>
@@ -279,7 +279,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_is_haptic_installed"><a href="#al_is_haptic_installed">al_is_haptic_installed</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_haptic_installed(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L76">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L76">Source Code</a></p>
 <p>Returns true if the haptic device subsystem is installed, false if not.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -287,7 +287,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_is_mouse_haptic"><a href="#al_is_mouse_haptic">al_is_mouse_haptic</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_mouse_haptic(ALLEGRO_MOUSE *dev)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L95">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L95">Source Code</a></p>
 <p>Returns true if the mouse has haptic capabilities, false if not.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -295,7 +295,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_is_keyboard_haptic"><a href="#al_is_keyboard_haptic">al_is_keyboard_haptic</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_keyboard_haptic(ALLEGRO_KEYBOARD *dev)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L106">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L106">Source Code</a></p>
 <p>Returns true if the keyboard has haptic capabilities, false if not.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -303,7 +303,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_is_display_haptic"><a href="#al_is_display_haptic">al_is_display_haptic</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_display_haptic(ALLEGRO_DISPLAY *dev)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L117">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L117">Source Code</a></p>
 <p>Returns true if the display has haptic capabilities, false if not. This mainly concerns force feedback that shakes a hand held device, such as a phone or a tablet.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -311,7 +311,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_is_joystick_haptic"><a href="#al_is_joystick_haptic">al_is_joystick_haptic</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_joystick_haptic(ALLEGRO_JOYSTICK *dev)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L84">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L84">Source Code</a></p>
 <p>Returns true if the joystick has haptic capabilities, false if not.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -319,7 +319,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_is_touch_input_haptic"><a href="#al_is_touch_input_haptic">al_is_touch_input_haptic</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_touch_input_haptic(ALLEGRO_TOUCH_INPUT *dev)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L127">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L127">Source Code</a></p>
 <p>Returns true if the touch input device has haptic capabilities, false if not.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -327,7 +327,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_get_haptic_from_mouse"><a href="#al_get_haptic_from_mouse">al_get_haptic_from_mouse</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_HAPTIC *al_get_haptic_from_mouse(ALLEGRO_MOUSE *dev)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L148">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L148">Source Code</a></p>
 <p>If the mouse has haptic capabilities, returns the associated haptic device handle. Otherwise returns NULL.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -335,7 +335,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_get_haptic_from_keyboard"><a href="#al_get_haptic_from_keyboard">al_get_haptic_from_keyboard</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_HAPTIC *al_get_haptic_from_keyboard(ALLEGRO_KEYBOARD *dev)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L159">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L159">Source Code</a></p>
 <p>If the keyboard has haptic capabilities, returns the associated haptic device handle. Otherwise returns NULL.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -343,7 +343,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_get_haptic_from_display"><a href="#al_get_haptic_from_display">al_get_haptic_from_display</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_HAPTIC *al_get_haptic_from_display(ALLEGRO_DISPLAY *dev)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L170">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L170">Source Code</a></p>
 <p>If the display has haptic capabilities, returns the associated haptic device handle. Otherwise returns NULL.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -351,7 +351,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_get_haptic_from_joystick"><a href="#al_get_haptic_from_joystick">al_get_haptic_from_joystick</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_HAPTIC *al_get_haptic_from_joystick(ALLEGRO_JOYSTICK *dev)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L137">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L137">Source Code</a></p>
 <p>If the joystick has haptic capabilities, returns the associated haptic device handle. Otherwise returns NULL. It's neccesary to call this again every time the joystick configuration changes, such as through hot plugging. In that case, the old haptic device must be released using <a href="haptic.html#al_release_haptic">al_release_haptic</a>.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -359,7 +359,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_get_haptic_from_touch_input"><a href="#al_get_haptic_from_touch_input">al_get_haptic_from_touch_input</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_HAPTIC *al_get_haptic_from_touch_input(ALLEGRO_TOUCH_INPUT *dev)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L181">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L181">Source Code</a></p>
 <p>If the touch input device has haptic capabilities, returns the associated haptic device handle. Otherwise returns NULL.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -367,7 +367,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_release_haptic"><a href="#al_release_haptic">al_release_haptic</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_release_haptic(ALLEGRO_HAPTIC *haptic)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L385">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L385">Source Code</a></p>
 <p>Releases the haptic device and its resources when it's not needed anymore. Should also be used in case the joystick configuration changed, such as when a joystick is hot plugged. This function also automatically releases all haptic effects that are still uploaded to the device and that have not been released manually using <a href="haptic.html#al_release_haptic_effect">al_release_haptic_effect</a>.</p>
 <p>Returns true on success or false if the haptic device couldn't be released for any reason, such as NULL being passed, the device not being active or failure in the driver.</p>
 <p>Since: 5.1.8</p>
@@ -376,7 +376,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_is_haptic_active"><a href="#al_is_haptic_active">al_is_haptic_active</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_haptic_active(ALLEGRO_HAPTIC *hap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L192">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L192">Source Code</a></p>
 <p>Returns true if the haptic device can currently be used, false if not.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -384,7 +384,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_get_haptic_capabilities"><a href="#al_get_haptic_capabilities">al_get_haptic_capabilities</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_haptic_capabilities(ALLEGRO_HAPTIC *hap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L203">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L203">Source Code</a></p>
 <p>Returns an integer with or'ed values from <a href="haptic.html#allegro_haptic_constants">ALLEGRO_HAPTIC_CONSTANTS</a>, which, if set, indicate that the haptic device supports the given feature.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -392,7 +392,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_is_haptic_capable"><a href="#al_is_haptic_capable">al_is_haptic_capable</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_haptic_capable(ALLEGRO_HAPTIC * hap, <span class="dt">int</span> query) {</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L213">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L213">Source Code</a></p>
 <p>Returns true if the haptic device supports the feature indicated by the query parameter, false if the feature is not supported. The query parameter must be one of the values of <a href="haptic.html#allegro_haptic_constants">ALLEGRO_HAPTIC_CONSTANTS</a>.</p>
 <p>Since: 5.1.9</p>
 <blockquote>
@@ -401,7 +401,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="haptic.html#al_get_haptic_capabilities">al_get_haptic_capabilities</a></p>
 <h1 id="al_set_haptic_gain"><a href="#al_set_haptic_gain">al_set_haptic_gain</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_haptic_gain(ALLEGRO_HAPTIC *hap, <span class="dt">double</span> gain)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L231">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L231">Source Code</a></p>
 <p>Sets the gain of the haptic device if supported. Gain is much like volume for sound, it is as if every effect's intensity is multiplied by it. Gain is a value between 0.0 and 1.0. Returns true if set sucessfully, false if not. Only works if <a href="haptic.html#al_get_haptic_capabilities">al_get_haptic_capabilities</a> returns a value that has <a href="haptic.html#allegro_haptic_constants">ALLEGRO_HAPTIC_GAIN</a> set. If not, this function returns false, and all effects will be played [...]
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -409,7 +409,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_get_haptic_gain"><a href="#al_get_haptic_gain">al_get_haptic_gain</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">double</span> al_get_haptic_gain(ALLEGRO_HAPTIC *hap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L220">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L220">Source Code</a></p>
 <p>Returns the current gain of the device. Gain is much like volume for sound, it is as if every effect's intensity is multiplied by it. Gain is a value between 0.0 and 1.0. Only works correctly if <a href="haptic.html#al_get_haptic_capabilities">al_get_haptic_capabilities</a> returns a value that has <a href="haptic.html#allegro_haptic_constants">ALLEGRO_HAPTIC_GAIN</a> set. If this is not set, this function will simply return 1.0 and all effects will be played without any gain influence.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -417,7 +417,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_set_haptic_autocenter"><a href="#al_set_haptic_autocenter">al_set_haptic_autocenter</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_haptic_autocenter(ALLEGRO_HAPTIC *hap, <span class="dt">double</span> intensity)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L252">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L252">Source Code</a></p>
 <p>Turns on or off the automatic centering feature of the haptic device if supported. Depending on the device automatic centering may ensure that the axes of the device are centered again automatically after playing a haptic effect. The intensity parameter should be passed with a value between 0.0 and 1.0. The value 0.0 means automatic centering is disabled, and 1.0 means full strength automatic centering. Any value in between those two extremes will result in partial automatic centering [...]
 <p>Since: 5.1.9</p>
 <blockquote>
@@ -425,7 +425,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_get_haptic_autocenter"><a href="#al_get_haptic_autocenter">al_get_haptic_autocenter</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">double</span> al_get_haptic_autocenter(ALLEGRO_HAPTIC *hap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L241">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L241">Source Code</a></p>
 <p>Returns the current automatic centering intensity of the device. Depending on the device automatic centering may ensure that the axes of the device are centered again automatically after playing a haptic effect. The return value can be between 0.0 and 1.0. The value 0.0 means automatic centering is disabled, and 1.0 means automatic centering is enabled at full strength. Any value in between those two extremes means partial automatic centering is enabled. Some platforms do not support  [...]
 <p>Since: 5.1.9</p>
 <blockquote>
@@ -433,7 +433,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_get_max_haptic_effects"><a href="#al_get_max_haptic_effects">al_get_max_haptic_effects</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_max_haptic_effects(ALLEGRO_HAPTIC *hap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L264">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L264">Source Code</a></p>
 <p>Returns the maximum amount of haptic effects that can be uploaded to the device. This depends on the operating system, driver, platform and the device itself. This may return a value as low as 1.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -441,7 +441,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_is_haptic_effect_ok"><a href="#al_is_haptic_effect_ok">al_is_haptic_effect_ok</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_haptic_effect_ok(ALLEGRO_HAPTIC *hap, ALLEGRO_HAPTIC_EFFECT *effect)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L275">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L275">Source Code</a></p>
 <p>Returns true if the haptic device can play the haptic effect as given, false if not. The haptic effect must have been filled in completely and correctly.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -450,7 +450,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_upload_haptic_effect"><a href="#al_upload_haptic_effect">al_upload_haptic_effect</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_upload_haptic_effect(ALLEGRO_HAPTIC *hap,
    ALLEGRO_HAPTIC_EFFECT *effect, ALLEGRO_HAPTIC_EFFECT_ID *id)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L286">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L286">Source Code</a></p>
 <p>Uploads the haptic effect to the device. The haptic effect must have been filled in completely and correctly. You must also pass in a pointer to a user allocated <a href="haptic.html#allegro_haptic_effect_id">ALLEGRO_HAPTIC_EFFECT_ID</a>. This <code>id</code> can be used to control playback of the effect. Returns true if the effect was successfully uploaded, false if not.</p>
 <p>The function <a href="haptic.html#al_get_max_haptic_effects">al_get_max_haptic_effects</a> returns how many effects can be uploaded to the device at the same time.</p>
 <p>The same haptic effect can be uploaded several times, as long as care is taken to pass in a different <a href="haptic.html#allegro_haptic_effect_id">ALLEGRO_HAPTIC_EFFECT_ID</a>.</p>
@@ -460,7 +460,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_play_haptic_effect"><a href="#al_play_haptic_effect">al_play_haptic_effect</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_play_haptic_effect(ALLEGRO_HAPTIC_EFFECT_ID *id, <span class="dt">int</span> loop)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L298">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L298">Source Code</a></p>
 <p>Plays back a previously uploaded haptic effect. The play_id must be a valid <a href="haptic.html#allegro_haptic_effect_id">ALLEGRO_HAPTIC_EFFECT_ID</a> obtained from <a href="haptic.html#al_upload_haptic_effect">al_upload_haptic_effect</a>, <a href="haptic.html#al_upload_and_play_haptic_effect">al_upload_and_play_haptic_effect</a> or <a href="haptic.html#al_rumble_haptic">al_rumble_haptic</a>.</p>
 <p>The haptic effect will be played back loop times in sequence. If loop is less than or equal to 1, then the effect will be played once only.</p>
 <p>This function returns immediately and doesn't wait for the playback to finish. It returns true if the playback was started sucessfully or false if not.</p>
@@ -471,7 +471,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_upload_and_play_haptic_effect"><a href="#al_upload_and_play_haptic_effect">al_upload_and_play_haptic_effect</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_upload_and_play_haptic_effect(ALLEGRO_HAPTIC *hap,
    ALLEGRO_HAPTIC_EFFECT *effect, ALLEGRO_HAPTIC_EFFECT_ID *id, <span class="dt">int</span> loop)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L309">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L309">Source Code</a></p>
 <p>Uploads the haptic effect to the device and starts playback immediately. Returns true if the upload and playback were successful, false if either failed.</p>
 <p>In case false is returned, the haptic effect will be automatically released as if <a href="haptic.html#al_release_haptic_effect">al_release_haptic_effect</a> had been called, so there is no need to call it again manually in this case. However, if true is returned, it is necessary to call <a href="haptic.html#al_release_haptic_effect">al_release_haptic_effect</a> when the effect isn't needed anymore, to prevent the amount of available effects on the haptic devicefrom running out.</p>
 <p>Since: 5.1.8</p>
@@ -481,7 +481,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="haptic.html#al_upload_haptic_effect">al_upload_haptic_effect</a>, <a href="haptic.html#al_play_haptic_effect">al_play_haptic_effect</a></p>
 <h1 id="al_stop_haptic_effect"><a href="#al_stop_haptic_effect">al_stop_haptic_effect</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_stop_haptic_effect(ALLEGRO_HAPTIC_EFFECT_ID *id)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L330">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L330">Source Code</a></p>
 <p>Stops playing a previously uploaded haptic effect. The play_id must be a valid <a href="haptic.html#allegro_haptic_effect_id">ALLEGRO_HAPTIC_EFFECT_ID</a> obtained from <a href="haptic.html#al_upload_haptic_effect">al_upload_haptic_effect</a>, <a href="haptic.html#al_upload_and_play_haptic_effect">al_upload_and_play_haptic_effect</a> or <a href="haptic.html#al_rumble_haptic">al_rumble_haptic</a>.</p>
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -489,7 +489,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_is_haptic_effect_playing"><a href="#al_is_haptic_effect_playing">al_is_haptic_effect_playing</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_haptic_effect_playing(ALLEGRO_HAPTIC_EFFECT_ID *id)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L340">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L340">Source Code</a></p>
 <p>Returns true if the haptic effect is currently playing. Returns false if the effect has been stopped or if it has already finished playing, or if it has not been played yet. The play_id must be a valid <a href="haptic.html#allegro_haptic_effect_id">ALLEGRO_HAPTIC_EFFECT_ID</a> obtained from <a href="haptic.html#al_upload_haptic_effect">al_upload_haptic_effect</a>, <a href="haptic.html#al_upload_and_play_haptic_effect">al_upload_and_play_haptic_effect</a> or <a href="haptic.html#al_rum [...]
 <p>Since: 5.1.8</p>
 <blockquote>
@@ -497,7 +497,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_get_haptic_effect_duration"><a href="#al_get_haptic_effect_duration">al_get_haptic_effect_duration</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">double</span> al_get_haptic_effect_duration(ALLEGRO_HAPTIC_EFFECT * effect)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L349">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L349">Source Code</a></p>
 <p>Returns the estimated duration in seconds of a single loop of the given haptic effect. The effect's <code>effect.replay</code> must have been filled in correctly before using this function.</p>
 <p>Since: 5.1.9</p>
 <blockquote>
@@ -505,7 +505,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_release_haptic_effect"><a href="#al_release_haptic_effect">al_release_haptic_effect</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_release_haptic_effect(ALLEGRO_HAPTIC_EFFECT_ID *id)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L374">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L374">Source Code</a></p>
 <p>Releases a previously uploaded haptic effect from the device it has been uploaded to, allowing for other effects to be uploaded. The play_id must be a valid <a href="haptic.html#allegro_haptic_effect_id">ALLEGRO_HAPTIC_EFFECT_ID</a> obtained from <a href="haptic.html#al_upload_haptic_effect">al_upload_haptic_effect</a>, <a href="haptic.html#al_upload_and_play_haptic_effect">al_upload_and_play_haptic_effect</a> or <a href="haptic.html#al_rumble_haptic">al_rumble_haptic</a>.</p>
 <p>This function is called automatically when you call <a href="haptic.html#al_release_haptic">al_release_haptic</a> on a <a href="haptic.html#allegro_haptic">ALLEGRO_HAPTIC</a> for all effects that are still uploaded to the device. Therefore this function is most useful if you want to upload and release haptic effects dynamically, for example as a way to circumvent the limit imposed by <a href="haptic.html#al_get_max_haptic_effects">al_get_max_haptic_effects</a>.</p>
 <p>Returns true on success, false if the effect couldn't be released for any reason such as when NULL is passed, the effect is not active or failure to release the effect by the driver.</p>
@@ -516,7 +516,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_rumble_haptic"><a href="#al_rumble_haptic">al_rumble_haptic</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_rumble_haptic(ALLEGRO_HAPTIC *hap,
    <span class="dt">double</span> intensity, <span class="dt">double</span> duration, ALLEGRO_HAPTIC_EFFECT_ID *id)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/haptic.c#L356">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/haptic.c#L356">Source Code</a></p>
 <p>Uploads a simple rumble effect to the haptic device and starts playback immediately. The parameter <code>intensity</code> is a relative magnitude between 0.0 and 1.0 that determines the intensity of the rumble effect. The <code>duration</code> determines the duration of the effect in seconds.</p>
 <p>You must also pass in a pointer to a user allocated <a href="haptic.html#allegro_haptic_effect_id">ALLEGRO_HAPTIC_EFFECT_ID</a>. It it is stored a reference to be used to control playback of the effect. Returns true if the rumble effect was successfully uploaded and started, false if not.</p>
 <p>In case false is returned, the rumble effect will be automatically released as if <a href="haptic.html#al_release_haptic_effect">al_release_haptic_effect</a> had been called, so there is no need to call it again manually in this case. However, if true is returned, it is necessary to call <a href="haptic.html#al_release_haptic_effect">al_release_haptic_effect</a> when the effect isn't needed anymore, to prevent the amount of available effects on the haptic device from running out.</p>
@@ -525,8 +525,8 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> Perhaps could be simplified due to limited support for all the exposed features across all of the platforms. Awaiting feedback from users.</p>
 </blockquote>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:40 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:58 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/image.html b/docs/html/refman/image.html
index 22954f2..8ee4725 100644
--- a/docs/html/refman/image.html
+++ b/docs/html/refman/image.html
@@ -126,22 +126,22 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_image.h></span></code></pre>
 <h1 id="al_init_image_addon"><a href="#al_init_image_addon">al_init_image_addon</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_init_image_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/image/iio.c#L14">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/image/iio.c#L14">Source Code</a></p>
 <p>Initializes the image addon. This registers bitmap format handlers for <a href="graphics.html#al_load_bitmap">al_load_bitmap</a>, <a href="graphics.html#al_load_bitmap_f">al_load_bitmap_f</a>, <a href="graphics.html#al_save_bitmap">al_save_bitmap</a>, <a href="graphics.html#al_save_bitmap_f">al_save_bitmap_f</a>.</p>
 <p>The following types are built into the Allegro image addon and guaranteed to be available: BMP, DDS, PCX, TGA. Every platform also supports JPEG and PNG via external dependencies.</p>
 <p>Other formats may be available depending on the operating system and installed libraries, but are not guaranteed and should not be assumed to be universally available.</p>
 <p>The DDS format is only supported to load from, and only if the DDS file contains textures compressed in the DXT1, DXT3 and DXT5 formats. Note that when loading a DDS file, the created bitmap will always be a video bitmap and will have the pixel format matching the format in the file.</p>
 <h1 id="al_shutdown_image_addon"><a href="#al_shutdown_image_addon">al_shutdown_image_addon</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_shutdown_image_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/image/iio.c#L141">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/image/iio.c#L141">Source Code</a></p>
 <p>Shut down the image addon. This is done automatically at program exit, but can be called any time the user wishes as well.</p>
 <h1 id="al_get_allegro_image_version"><a href="#al_get_allegro_image_version">al_get_allegro_image_version</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_image_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/image/iio.c#L149">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/image/iio.c#L149">Source Code</a></p>
 <p>Returns the (compiled) version of the addon, in the same format as <a href="system.html#al_get_allegro_version">al_get_allegro_version</a>.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:44 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:01 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/index.html b/docs/html/refman/index.html
index 5eec365..9213e34 100644
--- a/docs/html/refman/index.html
+++ b/docs/html/refman/index.html
@@ -152,10 +152,11 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="native_dialog.html">Native dialogs addon</a></li>
 <li><a href="physfs.html">PhysicsFS addon</a></li>
 <li><a href="primitives.html">Primitives addon</a></li>
+<li><a href="video.html">Video streaming addon</a></li>
 </ul>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:45 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:03 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/index_all.html b/docs/html/refman/index_all.html
index bc60ab4..12732d9 100644
--- a/docs/html/refman/index_all.html
+++ b/docs/html/refman/index_all.html
@@ -158,6 +158,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="fshook.html#allegro_fs_entry">ALLEGRO_FS_ENTRY</a> <!-- --></li>
 <li><a href="fshook.html#allegro_fs_interface">ALLEGRO_FS_INTERFACE</a> <!-- --></li>
 <li><a href="events.html#allegro_get_event_type">ALLEGRO_GET_EVENT_TYPE</a> <!-- --></li>
+<li><a href="font.html#allegro_glyph">ALLEGRO_GLYPH</a> <!-- --></li>
 <li><a href="haptic.html#allegro_haptic">ALLEGRO_HAPTIC</a> <!-- --></li>
 <li><a href="haptic.html#allegro_haptic_constants">ALLEGRO_HAPTIC_CONSTANTS</a> <!-- --></li>
 <li><a href="haptic.html#allegro_haptic_effect">ALLEGRO_HAPTIC_EFFECT</a> <!-- --></li>
@@ -335,6 +336,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="primitives.html#structures-and-types">Structures and types</a> <!-- --></li>
 <li><a href="system.html#system-routines">System routines</a> <!-- --></li>
 <li><a href="font.html#ttf-fonts">TTF fonts</a> <!-- --></li>
+<li><a href="graphics.html#target-bitmap">Target bitmap</a> <!-- --></li>
 <li><a href="getting_started.html#the-main-function">The main function</a> <!-- --></li>
 <li><a href="threads.html#threads">Threads</a> <!-- --></li>
 <li><a href="time.html#time-routines">Time routines</a> <!-- --></li>
@@ -357,6 +359,8 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="config.html#al_add_config_section">al_add_config_section</a> <!-- --></li>
 <li><a href="graphics.html#al_add_new_bitmap_flag">al_add_new_bitmap_flag</a> <!-- --></li>
 <li><a href="timer.html#al_add_timer_count">al_add_timer_count</a> <!-- --></li>
+<li><a href="platform.html#al_android_get_activity">al_android_get_activity</a> <!-- --></li>
+<li><a href="platform.html#al_android_get_jni_env">al_android_get_jni_env</a> <!-- --></li>
 <li><a href="platform.html#al_android_get_os_version">al_android_get_os_version</a> <!-- --></li>
 <li><a href="platform.html#al_android_set_apk_file_interface">al_android_set_apk_file_interface</a> <!-- --></li>
 <li><a href="platform.html#al_android_set_apk_fs_interface">al_android_set_apk_fs_interface</a> <!-- --></li>
@@ -371,6 +375,8 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="audio.html#al_attach_sample_instance_to_voice">al_attach_sample_instance_to_voice</a> <!-- --></li>
 <li><a href="shader.html#al_attach_shader_source">al_attach_shader_source</a> <!-- --></li>
 <li><a href="shader.html#al_attach_shader_source_file">al_attach_shader_source_file</a> <!-- --></li>
+<li><a href="graphics.html#al_backup_dirty_bitmap">al_backup_dirty_bitmap</a> <!-- --></li>
+<li><a href="graphics.html#al_backup_dirty_bitmaps">al_backup_dirty_bitmaps</a> <!-- --></li>
 <li><a href="threads.html#al_broadcast_cond">al_broadcast_cond</a> <!-- --></li>
 <li><a href="transformations.html#al_build_camera_transform">al_build_camera_transform</a> <!-- --></li>
 <li><a href="native_dialog.html#al_build_menu">al_build_menu</a> <!-- --></li>
@@ -627,9 +633,11 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="audio.html#al_get_audio_stream_speed">al_get_audio_stream_speed</a> <!-- --></li>
 <li><a href="audio.html#al_get_available_audio_stream_fragments">al_get_available_audio_stream_fragments</a> <!-- --></li>
 <li><a href="display.html#al_get_backbuffer">al_get_backbuffer</a> <!-- --></li>
+<li><a href="graphics.html#al_get_bitmap_depth">al_get_bitmap_depth</a> <!-- --></li>
 <li><a href="graphics.html#al_get_bitmap_flags">al_get_bitmap_flags</a> <!-- --></li>
 <li><a href="graphics.html#al_get_bitmap_format">al_get_bitmap_format</a> <!-- --></li>
 <li><a href="graphics.html#al_get_bitmap_height">al_get_bitmap_height</a> <!-- --></li>
+<li><a href="graphics.html#al_get_bitmap_samples">al_get_bitmap_samples</a> <!-- --></li>
 <li><a href="graphics.html#al_get_bitmap_width">al_get_bitmap_width</a> <!-- --></li>
 <li><a href="graphics.html#al_get_bitmap_x">al_get_bitmap_x</a> <!-- --></li>
 <li><a href="graphics.html#al_get_bitmap_y">al_get_bitmap_y</a> <!-- --></li>
@@ -681,6 +689,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="fshook.html#al_get_fs_entry_name">al_get_fs_entry_name</a> <!-- --></li>
 <li><a href="fshook.html#al_get_fs_entry_size">al_get_fs_entry_size</a> <!-- --></li>
 <li><a href="fshook.html#al_get_fs_interface">al_get_fs_interface</a> <!-- --></li>
+<li><a href="font.html#al_get_glyph">al_get_glyph</a> <!-- --></li>
 <li><a href="font.html#al_get_glyph_advance">al_get_glyph_advance</a> <!-- --></li>
 <li><a href="font.html#al_get_glyph_dimensions">al_get_glyph_dimensions</a> <!-- --></li>
 <li><a href="font.html#al_get_glyph_width">al_get_glyph_width</a> <!-- --></li>
@@ -731,8 +740,10 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="native_dialog.html#al_get_native_file_dialog_count">al_get_native_file_dialog_count</a> <!-- --></li>
 <li><a href="native_dialog.html#al_get_native_file_dialog_path">al_get_native_file_dialog_path</a> <!-- --></li>
 <li><a href="native_dialog.html#al_get_native_text_log_event_source">al_get_native_text_log_event_source</a> <!-- --></li>
+<li><a href="graphics.html#al_get_new_bitmap_depth">al_get_new_bitmap_depth</a> <!-- --></li>
 <li><a href="graphics.html#al_get_new_bitmap_flags">al_get_new_bitmap_flags</a> <!-- --></li>
 <li><a href="graphics.html#al_get_new_bitmap_format">al_get_new_bitmap_format</a> <!-- --></li>
+<li><a href="graphics.html#al_get_new_bitmap_samples">al_get_new_bitmap_samples</a> <!-- --></li>
 <li><a href="monitor.html#al_get_new_display_adapter">al_get_new_display_adapter</a> <!-- --></li>
 <li><a href="display.html#al_get_new_display_flags">al_get_new_display_flags</a> <!-- --></li>
 <li><a href="display.html#al_get_new_display_option">al_get_new_display_option</a> <!-- --></li>
@@ -1054,8 +1065,10 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="mouse.html#al_set_mouse_wheel_precision">al_set_mouse_wheel_precision</a> <!-- --></li>
 <li><a href="mouse.html#al_set_mouse_xy">al_set_mouse_xy</a> <!-- --></li>
 <li><a href="mouse.html#al_set_mouse_z">al_set_mouse_z</a> <!-- --></li>
+<li><a href="graphics.html#al_set_new_bitmap_depth">al_set_new_bitmap_depth</a> <!-- --></li>
 <li><a href="graphics.html#al_set_new_bitmap_flags">al_set_new_bitmap_flags</a> <!-- --></li>
 <li><a href="graphics.html#al_set_new_bitmap_format">al_set_new_bitmap_format</a> <!-- --></li>
+<li><a href="graphics.html#al_set_new_bitmap_samples">al_set_new_bitmap_samples</a> <!-- --></li>
 <li><a href="monitor.html#al_set_new_display_adapter">al_set_new_display_adapter</a> <!-- --></li>
 <li><a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a> <!-- --></li>
 <li><a href="display.html#al_set_new_display_option">al_set_new_display_option</a> <!-- --></li>
@@ -1226,8 +1239,8 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="platform.html#iphone">iPhone</a> <!-- --></li>
 </ul>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:45 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:03 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/joystick.html b/docs/html/refman/joystick.html
index 788de94..eaae026 100644
--- a/docs/html/refman/joystick.html
+++ b/docs/html/refman/joystick.html
@@ -145,12 +145,12 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>On Windows there are two joystick drivers, a DirectInput one and an Xinput one. If support for XInput was compiled in, then it can be enabled by calling al_set_config_value(al_get_system_config(), "joystick", "driver", "xinput") before calling al_install_joystick, or by setting the same option in the allegro5.cfg configuration file. The Xinput and DirectInput drivers are mutually exclusive. The haptics subsystem will use the same driver as the joystick sy [...]
 <h1 id="allegro_joystick"><a href="#allegro_joystick">ALLEGRO_JOYSTICK</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_JOYSTICK ALLEGRO_JOYSTICK;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/joystick.h#L35">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/joystick.h#L35">Source Code</a></p>
 <p>This is an abstract data type representing a physical joystick.</p>
 <p>See also: <a href="joystick.html#al_get_joystick">al_get_joystick</a></p>
 <h1 id="allegro_joystick_state"><a href="#allegro_joystick_state">ALLEGRO_JOYSTICK_STATE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_JOYSTICK_STATE ALLEGRO_JOYSTICK_STATE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/joystick.h#L41">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/joystick.h#L41">Source Code</a></p>
 <p>This is a structure that is used to hold a "snapshot" of a joystick's axes and buttons at a particular instant. All fields public and read-only.</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">struct</span> {
    <span class="dt">float</span> axis[num_axes];             <span class="co">// -1.0 to 1.0</span>
@@ -159,7 +159,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="joystick.html#al_get_joystick_state">al_get_joystick_state</a></p>
 <h1 id="allegro_joyflags"><a href="#allegro_joyflags">ALLEGRO_JOYFLAGS</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">enum</span> ALLEGRO_JOYFLAGS</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/joystick.h#L54">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/joystick.h#L54">Source Code</a></p>
 <ul>
 <li>ALLEGRO_JOYFLAG_DIGITAL - the stick provides digital input</li>
 <li>ALLEGRO_JOYFLAG_ANALOGUE - the stick provides analogue input</li>
@@ -168,22 +168,22 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="joystick.html#al_get_joystick_stick_flags">al_get_joystick_stick_flags</a></p>
 <h1 id="al_install_joystick"><a href="#al_install_joystick">al_install_joystick</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_install_joystick(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L40">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L40">Source Code</a></p>
 <p>Install a joystick driver, returning true if successful. If a joystick driver was already installed, returns true immediately.</p>
 <p>See also: <a href="joystick.html#al_uninstall_joystick">al_uninstall_joystick</a></p>
 <h1 id="al_uninstall_joystick"><a href="#al_uninstall_joystick">al_uninstall_joystick</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_uninstall_joystick(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L73">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L73">Source Code</a></p>
 <p>Uninstalls the active joystick driver. All outstanding <a href="joystick.html#allegro_joystick">ALLEGRO_JOYSTICK</a> structures are invalidated. If no joystick driver was active, this function does nothing.</p>
 <p>This function is automatically called when Allegro is shut down.</p>
 <p>See also: <a href="joystick.html#al_install_joystick">al_install_joystick</a></p>
 <h1 id="al_is_joystick_installed"><a href="#al_is_joystick_installed">al_is_joystick_installed</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_joystick_installed(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L87">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L87">Source Code</a></p>
 <p>Returns true if <a href="joystick.html#al_install_joystick">al_install_joystick</a> was called successfully.</p>
 <h1 id="al_reconfigure_joysticks"><a href="#al_reconfigure_joysticks">al_reconfigure_joysticks</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_reconfigure_joysticks(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L96">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L96">Source Code</a></p>
 <p>Allegro is able to cope with users connecting and disconnected joystick devices on-the-fly. On existing platforms, the joystick event source will generate an event of type <code>ALLEGRO_EVENT_JOYSTICK_CONFIGURATION</code> when a device is plugged in or unplugged. In response, you should call <a href="joystick.html#al_reconfigure_joysticks">al_reconfigure_joysticks</a>.</p>
 <p>Afterwards, the number returned by <a href="joystick.html#al_get_num_joysticks">al_get_num_joysticks</a> may be different, and the handles returned by <a href="joystick.html#al_get_joystick">al_get_joystick</a> may be different or be ordered differently.</p>
 <p>All <a href="joystick.html#allegro_joystick">ALLEGRO_JOYSTICK</a> handles remain valid, but handles for disconnected devices become inactive: their states will no longer update, and <a href="joystick.html#al_get_joystick">al_get_joystick</a> will not return the handle. Handles for devices which remain connected will continue to represent the same devices. Previously inactive handles may become active again, being reused to represent newly connected devices.</p>
@@ -192,78 +192,78 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="joystick.html#al_get_joystick_event_source">al_get_joystick_event_source</a>, <a href="events.html#allegro_event">ALLEGRO_EVENT</a></p>
 <h1 id="al_get_num_joysticks"><a href="#al_get_num_joysticks">al_get_num_joysticks</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_num_joysticks(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L138">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L138">Source Code</a></p>
 <p>Return the number of joysticks currently on the system (or potentially on the system). This number can change after <a href="joystick.html#al_reconfigure_joysticks">al_reconfigure_joysticks</a> is called, in order to support hotplugging.</p>
 <p>Returns 0 if there is no joystick driver installed.</p>
 <p>See also: <a href="joystick.html#al_get_joystick">al_get_joystick</a>, <a href="joystick.html#al_get_joystick_active">al_get_joystick_active</a></p>
 <h1 id="al_get_joystick"><a href="#al_get_joystick">al_get_joystick</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_JOYSTICK * al_get_joystick(<span class="dt">int</span> num)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L150">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L150">Source Code</a></p>
 <p>Get a handle for a joystick on the system. The number may be from 0 to <a href="joystick.html#al_get_num_joysticks">al_get_num_joysticks</a>-1. If successful a pointer to a joystick object is returned, which represents a physical device. Otherwise NULL is returned.</p>
 <p>The handle and the index are only incidentally linked. After <a href="joystick.html#al_reconfigure_joysticks">al_reconfigure_joysticks</a> is called, <a href="joystick.html#al_get_joystick">al_get_joystick</a> may return handles in a different order, and handles which represent disconnected devices will not be returned.</p>
 <p>See also: <a href="joystick.html#al_get_num_joysticks">al_get_num_joysticks</a>, <a href="joystick.html#al_reconfigure_joysticks">al_reconfigure_joysticks</a>, <a href="joystick.html#al_get_joystick_active">al_get_joystick_active</a></p>
 <h1 id="al_release_joystick"><a href="#al_release_joystick">al_release_joystick</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_release_joystick(ALLEGRO_JOYSTICK *joy)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L162">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L162">Source Code</a></p>
 <p>This function currently does nothing.</p>
 <p>See also: <a href="joystick.html#al_get_joystick">al_get_joystick</a></p>
 <h1 id="al_get_joystick_active"><a href="#al_get_joystick_active">al_get_joystick_active</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_joystick_active(ALLEGRO_JOYSTICK *joy)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L174">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L174">Source Code</a></p>
 <p>Return if the joystick handle is "active", i.e. in the current configuration, the handle represents some physical device plugged into the system. <a href="joystick.html#al_get_joystick">al_get_joystick</a> returns active handles. After reconfiguration, active handles may become inactive, and vice versa.</p>
 <p>See also: <a href="joystick.html#al_reconfigure_joysticks">al_reconfigure_joysticks</a></p>
 <h1 id="al_get_joystick_name"><a href="#al_get_joystick_name">al_get_joystick_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_joystick_name(ALLEGRO_JOYSTICK *joy)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L185">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L185">Source Code</a></p>
 <p>Return the name of the given joystick.</p>
 <p>See also: <a href="joystick.html#al_get_joystick_stick_name">al_get_joystick_stick_name</a>, <a href="joystick.html#al_get_joystick_axis_name">al_get_joystick_axis_name</a>, <a href="joystick.html#al_get_joystick_button_name">al_get_joystick_button_name</a></p>
 <h1 id="al_get_joystick_stick_name"><a href="#al_get_joystick_stick_name">al_get_joystick_stick_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_joystick_stick_name(ALLEGRO_JOYSTICK *joy, <span class="dt">int</span> stick)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L222">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L222">Source Code</a></p>
 <p>Return the name of the given "stick". If the stick doesn't exist, NULL is returned.</p>
 <p>See also: <a href="joystick.html#al_get_joystick_axis_name">al_get_joystick_axis_name</a>, <a href="joystick.html#al_get_joystick_num_sticks">al_get_joystick_num_sticks</a></p>
 <h1 id="al_get_joystick_axis_name"><a href="#al_get_joystick_axis_name">al_get_joystick_axis_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_joystick_axis_name(ALLEGRO_JOYSTICK *joy, <span class="dt">int</span> stick, <span class="dt">int</span> axis)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L251">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L251">Source Code</a></p>
 <p>Return the name of the given axis. If the axis doesn't exist, NULL is returned. Indices begin from 0.</p>
 <p>See also: <a href="joystick.html#al_get_joystick_stick_name">al_get_joystick_stick_name</a>, <a href="joystick.html#al_get_joystick_num_axes">al_get_joystick_num_axes</a></p>
 <h1 id="al_get_joystick_button_name"><a href="#al_get_joystick_button_name">al_get_joystick_button_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_joystick_button_name(ALLEGRO_JOYSTICK *joy, <span class="dt">int</span> button)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L279">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L279">Source Code</a></p>
 <p>Return the name of the given button. If the button doesn't exist, NULL is returned. Indices begin from 0.</p>
 <p>See also: <a href="joystick.html#al_get_joystick_stick_name">al_get_joystick_stick_name</a>, <a href="joystick.html#al_get_joystick_axis_name">al_get_joystick_axis_name</a>, <a href="joystick.html#al_get_joystick_num_buttons">al_get_joystick_num_buttons</a></p>
 <h1 id="al_get_joystick_stick_flags"><a href="#al_get_joystick_stick_flags">al_get_joystick_stick_flags</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_joystick_stick_flags(ALLEGRO_JOYSTICK *joy, <span class="dt">int</span> stick)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L207">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L207">Source Code</a></p>
 <p>Return the flags of the given "stick". If the stick doesn't exist, NULL is returned. Indices begin from 0.</p>
 <p>See also: <a href="joystick.html#allegro_joyflags">ALLEGRO_JOYFLAGS</a></p>
 <h1 id="al_get_joystick_num_sticks"><a href="#al_get_joystick_num_sticks">al_get_joystick_num_sticks</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_joystick_num_sticks(ALLEGRO_JOYSTICK *joy)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L196">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L196">Source Code</a></p>
 <p>Return the number of "sticks" on the given joystick. A stick has one or more axes.</p>
 <p>See also: <a href="joystick.html#al_get_joystick_num_axes">al_get_joystick_num_axes</a>, <a href="joystick.html#al_get_joystick_num_buttons">al_get_joystick_num_buttons</a></p>
 <h1 id="al_get_joystick_num_axes"><a href="#al_get_joystick_num_axes">al_get_joystick_num_axes</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_joystick_num_axes(ALLEGRO_JOYSTICK *joy, <span class="dt">int</span> stick)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L237">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L237">Source Code</a></p>
 <p>Return the number of axes on the given "stick". If the stick doesn't exist, 0 is returned.</p>
 <p>See also: <a href="joystick.html#al_get_joystick_num_sticks">al_get_joystick_num_sticks</a></p>
 <h1 id="al_get_joystick_num_buttons"><a href="#al_get_joystick_num_buttons">al_get_joystick_num_buttons</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_joystick_num_buttons(ALLEGRO_JOYSTICK *joy)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L268">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L268">Source Code</a></p>
 <p>Return the number of buttons on the joystick.</p>
 <p>See also: <a href="joystick.html#al_get_joystick_num_sticks">al_get_joystick_num_sticks</a></p>
 <h1 id="al_get_joystick_state"><a href="#al_get_joystick_state">al_get_joystick_state</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_joystick_state(ALLEGRO_JOYSTICK *joy, ALLEGRO_JOYSTICK_STATE *ret_state)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L294">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L294">Source Code</a></p>
 <p>Get the current joystick state.</p>
 <p>See also: <a href="joystick.html#allegro_joystick_state">ALLEGRO_JOYSTICK_STATE</a>, <a href="joystick.html#al_get_joystick_num_buttons">al_get_joystick_num_buttons</a>, <a href="joystick.html#al_get_joystick_num_axes">al_get_joystick_num_axes</a></p>
 <h1 id="al_get_joystick_event_source"><a href="#al_get_joystick_event_source">al_get_joystick_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_joystick_event_source(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/joynu.c#L114">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/joynu.c#L114">Source Code</a></p>
 <p>Returns the global joystick event source. All <a href="events.html#allegro_event_joystick_axis">joystick events</a> are generated by this event source.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:40 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:58 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/keyboard.html b/docs/html/refman/keyboard.html
index 7b18b1b..c19c310 100644
--- a/docs/html/refman/keyboard.html
+++ b/docs/html/refman/keyboard.html
@@ -134,7 +134,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="allegro_keyboard_state"><a href="#allegro_keyboard_state">ALLEGRO_KEYBOARD_STATE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_KEYBOARD_STATE ALLEGRO_KEYBOARD_STATE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/keyboard.h#L33">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/keyboard.h#L33">Source Code</a></p>
 <p>This is a structure that is used to hold a "snapshot" of a keyboard's state at a particular instant. It contains the following publically readable fields:</p>
 <ul>
 <li>display - points to the display that had keyboard focus at the time the state was saved. If no display was focused, this points to NULL.</li>
@@ -254,45 +254,45 @@ ALLEGRO_KEYMOD_ACCENT4</code></pre>
 <p>The event field 'keyboard.modifiers' is a bitfield composed of these constants. These indicate the modifier keys which were pressed at the time a character was typed.</p>
 <h1 id="al_install_keyboard"><a href="#al_install_keyboard">al_install_keyboard</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_install_keyboard(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/keybdnu.c#L127">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/keybdnu.c#L127">Source Code</a></p>
 <p>Install a keyboard driver. Returns true if successful. If a driver was already installed, nothing happens and true is returned.</p>
 <p>See also: <a href="keyboard.html#al_uninstall_keyboard">al_uninstall_keyboard</a>, <a href="keyboard.html#al_is_keyboard_installed">al_is_keyboard_installed</a></p>
 <h1 id="al_is_keyboard_installed"><a href="#al_is_keyboard_installed">al_is_keyboard_installed</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_keyboard_installed(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/keybdnu.c#L118">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/keybdnu.c#L118">Source Code</a></p>
 <p>Returns true if <a href="keyboard.html#al_install_keyboard">al_install_keyboard</a> was called successfully.</p>
 <h1 id="al_uninstall_keyboard"><a href="#al_uninstall_keyboard">al_uninstall_keyboard</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_uninstall_keyboard(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/keybdnu.c#L178">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/keybdnu.c#L178">Source Code</a></p>
 <p>Uninstalls the active keyboard driver, if any. This will automatically unregister the keyboard event source with any event queues.</p>
 <p>This function is automatically called when Allegro is shut down.</p>
 <p>See also: <a href="keyboard.html#al_install_keyboard">al_install_keyboard</a></p>
 <h1 id="al_get_keyboard_state"><a href="#al_get_keyboard_state">al_get_keyboard_state</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_keyboard_state(ALLEGRO_KEYBOARD_STATE *ret_state)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/keybdnu.c#L245">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/keybdnu.c#L245">Source Code</a></p>
 <p>Save the state of the keyboard specified at the time the function is called into the structure pointed to by <em>ret_state</em>.</p>
 <p>See also: <a href="keyboard.html#al_key_down">al_key_down</a>, <a href="keyboard.html#allegro_keyboard_state">ALLEGRO_KEYBOARD_STATE</a></p>
 <h1 id="al_key_down"><a href="#al_key_down">al_key_down</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_key_down(<span class="dt">const</span> ALLEGRO_KEYBOARD_STATE *state, <span class="dt">int</span> keycode)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/keybdnu.c#L257">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/keybdnu.c#L257">Source Code</a></p>
 <p>Return true if the key specified was held down in the state specified.</p>
 <p>See also: <a href="keyboard.html#allegro_keyboard_state">ALLEGRO_KEYBOARD_STATE</a></p>
 <h1 id="al_keycode_to_name"><a href="#al_keycode_to_name">al_keycode_to_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_keycode_to_name(<span class="dt">int</span> keycode)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/keybdnu.c#L223">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/keybdnu.c#L223">Source Code</a></p>
 <p>Converts the given keycode to a description of the key.</p>
 <h1 id="al_set_keyboard_leds"><a href="#al_set_keyboard_leds">al_set_keyboard_leds</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_keyboard_leds(<span class="dt">int</span> leds)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/keybdnu.c#L209">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/keybdnu.c#L209">Source Code</a></p>
 <p>Overrides the state of the keyboard LED indicators. Set <code>leds</code> to a combination of the keyboard modifier flags to enable the corresponding LED indicators (<code>ALLEGRO_KEYMOD_NUMLOCK</code>, <code>ALLEGRO_KEYMOD_CAPSLOCK</code> and <code>ALLEGRO_KEYMOD_SCROLLLOCK</code> are supported) or to -1 to return to default behavior. False is returned if the current keyboard driver cannot set LED indicators.</p>
 <h1 id="al_get_keyboard_event_source"><a href="#al_get_keyboard_event_source">al_get_keyboard_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_keyboard_event_source(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/keybdnu.c#L266">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/keybdnu.c#L266">Source Code</a></p>
 <p>Retrieve the keyboard event source. All <a href="events.html#allegro_event_key_down">keyboard events</a> are generated by this event source.</p>
 <p>Returns NULL if the keyboard subsystem was not installed.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:41 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:58 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/main.html b/docs/html/refman/main.html
index 06a5956..ad4e219 100644
--- a/docs/html/refman/main.html
+++ b/docs/html/refman/main.html
@@ -122,8 +122,8 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>This addon does nothing on platforms that don't require its functionality, but you should keep it in mind in case you need to port to platforms that do require it.</p>
 <p>Link with allegro_main.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:45 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:02 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/memfile.html b/docs/html/refman/memfile.html
index b238129..4263d49 100644
--- a/docs/html/refman/memfile.html
+++ b/docs/html/refman/memfile.html
@@ -126,17 +126,17 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_memfile.h></span></code></pre>
 <h1 id="al_open_memfile"><a href="#al_open_memfile">al_open_memfile</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_FILE *al_open_memfile(<span class="dt">void</span> *mem, <span class="dt">int64_t</span> size, <span class="dt">const</span> <span class="dt">char</span> *mode)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/memfile/memfile.c#L169">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/memfile/memfile.c#L169">Source Code</a></p>
 <p>Returns a file handle to the block of memory. All read and write operations act upon the memory directly, so it must not be freed while the file remains open.</p>
 <p>The mode can be any combination of "r" (readable) and "w" (writable). Regardless of the mode, the file always opens at position 0. The file size is fixed and cannot be expanded. The file is always read from/written to in binary mode, which means that no newline translation is performed.</p>
 <p>It should be closed with <a href="file.html#al_fclose">al_fclose</a>. After the file is closed, you are responsible for freeing the memory (if needed).</p>
 <h1 id="al_get_allegro_memfile_version"><a href="#al_get_allegro_memfile_version">al_get_allegro_memfile_version</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_memfile_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/memfile/memfile.c#L201">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/memfile/memfile.c#L201">Source Code</a></p>
 <p>Returns the (compiled) version of the addon, in the same format as <a href="system.html#al_get_allegro_version">al_get_allegro_version</a>.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:45 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:02 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/memory.html b/docs/html/refman/memory.html
index d13488f..47dd15d 100644
--- a/docs/html/refman/memory.html
+++ b/docs/html/refman/memory.html
@@ -134,14 +134,14 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_malloc"><a href="#al_malloc">al_malloc</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define al_malloc(n) \</span>
    (al_malloc_with_context((n), __LINE__, __FILE__, __func__))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/memory.h#L40">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/memory.h#L42">Source Code</a></p>
 <p>Like malloc() in the C standard library, but the implementation may be overridden.</p>
 <p>This is a macro.</p>
 <p>See also: <a href="memory.html#al_free">al_free</a>, <a href="memory.html#al_realloc">al_realloc</a>, <a href="memory.html#al_calloc">al_calloc</a>, <a href="memory.html#al_malloc_with_context">al_malloc_with_context</a>, <a href="memory.html#al_set_memory_interface">al_set_memory_interface</a></p>
 <h1 id="al_free"><a href="#al_free">al_free</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define al_free(p) \</span>
    (al_free_with_context((p), __LINE__, __FILE__, __func__))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/memory.h#L45">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/memory.h#L47">Source Code</a></p>
 <p>Like free() in the C standard library, but the implementation may be overridden.</p>
 <p>Additionally, on Windows, a memory block allocated by one DLL must be freed from the same DLL. In the few places where an Allegro function returns a pointer that must be freed, you must use <a href="memory.html#al_free">al_free</a> for portability to Windows.</p>
 <p>This is a macro.</p>
@@ -149,44 +149,44 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_realloc"><a href="#al_realloc">al_realloc</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define al_realloc(p, n) \</span>
    (al_realloc_with_context((p), (n), __LINE__, __FILE__, __func__))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/memory.h#L50">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/memory.h#L52">Source Code</a></p>
 <p>Like realloc() in the C standard library, but the implementation may be overridden.</p>
 <p>This is a macro.</p>
 <p>See also: <a href="memory.html#al_malloc">al_malloc</a>, <a href="memory.html#al_realloc_with_context">al_realloc_with_context</a></p>
 <h1 id="al_calloc"><a href="#al_calloc">al_calloc</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define al_calloc(c, n) \</span>
    (al_calloc_with_context((c), (n), __LINE__, __FILE__, __func__))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/memory.h#L55">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/memory.h#L57">Source Code</a></p>
 <p>Like calloc() in the C standard library, but the implementation may be overridden.</p>
 <p>This is a macro.</p>
 <p>See also: <a href="memory.html#al_malloc">al_malloc</a>, <a href="memory.html#al_calloc_with_context">al_calloc_with_context</a></p>
 <h1 id="al_malloc_with_context"><a href="#al_malloc_with_context">al_malloc_with_context</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> *al_malloc_with_context(size_t n,
    <span class="dt">int</span> line, <span class="dt">const</span> <span class="dt">char</span> *file, <span class="dt">const</span> <span class="dt">char</span> *func)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/memory.c#L38">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/memory.c#L38">Source Code</a></p>
 <p>This calls malloc() from the Allegro library (this matters on Windows), unless overridden with <a href="memory.html#al_set_memory_interface">al_set_memory_interface</a>,</p>
 <p>Generally you should use the <a href="memory.html#al_malloc">al_malloc</a> macro.</p>
 <h1 id="al_free_with_context"><a href="#al_free_with_context">al_free_with_context</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_free_with_context(<span class="dt">void</span> *ptr,
    <span class="dt">int</span> line, <span class="dt">const</span> <span class="dt">char</span> *file, <span class="dt">const</span> <span class="dt">char</span> *func)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/memory.c#L51">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/memory.c#L51">Source Code</a></p>
 <p>This calls free() from the Allegro library (this matters on Windows), unless overridden with <a href="memory.html#al_set_memory_interface">al_set_memory_interface</a>.</p>
 <p>Generally you should use the <a href="memory.html#al_free">al_free</a> macro.</p>
 <h1 id="al_realloc_with_context"><a href="#al_realloc_with_context">al_realloc_with_context</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> *al_realloc_with_context(<span class="dt">void</span> *ptr, size_t n,
    <span class="dt">int</span> line, <span class="dt">const</span> <span class="dt">char</span> *file, <span class="dt">const</span> <span class="dt">char</span> *func)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/memory.c#L64">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/memory.c#L64">Source Code</a></p>
 <p>This calls realloc() from the Allegro library (this matters on Windows), unless overridden with <a href="memory.html#al_set_memory_interface">al_set_memory_interface</a>,</p>
 <p>Generally you should use the <a href="memory.html#al_realloc">al_realloc</a> macro.</p>
 <h1 id="al_calloc_with_context"><a href="#al_calloc_with_context">al_calloc_with_context</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> *al_calloc_with_context(size_t count, size_t n,
    <span class="dt">int</span> line, <span class="dt">const</span> <span class="dt">char</span> *file, <span class="dt">const</span> <span class="dt">char</span> *func)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/memory.c#L77">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/memory.c#L77">Source Code</a></p>
 <p>This calls calloc() from the Allegro library (this matters on Windows), unless overridden with <a href="memory.html#al_set_memory_interface">al_set_memory_interface</a>,</p>
 <p>Generally you should use the <a href="memory.html#al_calloc">al_calloc</a> macro.</p>
 <h1 id="allegro_memory_interface"><a href="#allegro_memory_interface">ALLEGRO_MEMORY_INTERFACE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_MEMORY_INTERFACE ALLEGRO_MEMORY_INTERFACE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/memory.h#L26">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/memory.h#L28">Source Code</a></p>
 <p>This structure has the following fields.</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> *(*mi_malloc)(size_t n, <span class="dt">int</span> line, <span class="dt">const</span> <span class="dt">char</span> *file, <span class="dt">const</span> <span class="dt">char</span> *func);
 <span class="dt">void</span> (*mi_free)(<span class="dt">void</span> *ptr, <span class="dt">int</span> line, <span class="dt">const</span> <span class="dt">char</span> *file, <span class="dt">const</span> <span class="dt">char</span> *func);
@@ -197,13 +197,13 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="memory.html#al_set_memory_interface">al_set_memory_interface</a></p>
 <h1 id="al_set_memory_interface"><a href="#al_set_memory_interface">al_set_memory_interface</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_memory_interface(ALLEGRO_MEMORY_INTERFACE *memory_interface)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/memory.c#L29">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/memory.c#L29">Source Code</a></p>
 <p>Override the memory management functions with implementations of <a href="memory.html#al_malloc_with_context">al_malloc_with_context</a>, <a href="memory.html#al_free_with_context">al_free_with_context</a>, <a href="memory.html#al_realloc_with_context">al_realloc_with_context</a> and <a href="memory.html#al_calloc_with_context">al_calloc_with_context</a>. The context arguments may be used for debugging. The new functions should be thread safe.</p>
 <p>If the pointer is NULL, the default behaviour will be restored.</p>
 <p>See also: <a href="memory.html#allegro_memory_interface">ALLEGRO_MEMORY_INTERFACE</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:41 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:58 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/misc.html b/docs/html/refman/misc.html
index 3c56a2c..41d18c2 100644
--- a/docs/html/refman/misc.html
+++ b/docs/html/refman/misc.html
@@ -125,16 +125,16 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="allegro_pi"><a href="#allegro_pi">ALLEGRO_PI</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_PI        3.14159265358979323846</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/base.h#L93">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/base.h#L93">Source Code</a></p>
 <p>C99 compilers have no predefined value like M_PI for the constant π, but you can use this one instead.</p>
 <h1 id="al_run_main"><a href="#al_run_main">al_run_main</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_run_main(<span class="dt">int</span> argc, <span class="dt">char</span> **argv, <span class="dt">int</span> (*user_main)(<span class="dt">int</span>, <span class="dt">char</span> **))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/allegro.c#L36">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/allegro.c#L36">Source Code</a></p>
 <p>This function is useful in cases where you don't have a main() function but want to run Allegro (mostly useful in a wrapper library). Under Windows and Linux this is no problem because you simply can call <a href="system.html#al_install_system">al_install_system</a>. But some other system (like OSX) don't allow calling <a href="system.html#al_install_system">al_install_system</a> in the main thread. al_run_main will know what to do in that case.</p>
 <p>The passed argc and argv will simply be passed on to user_main and the return value of user_main will be returned.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:41 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:59 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/monitor.html b/docs/html/refman/monitor.html
index bff4ee1..84ad6f3 100644
--- a/docs/html/refman/monitor.html
+++ b/docs/html/refman/monitor.html
@@ -128,7 +128,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="allegro_monitor_info"><a href="#allegro_monitor_info">ALLEGRO_MONITOR_INFO</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_MONITOR_INFO</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/monitor.h#L11">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/monitor.h#L13">Source Code</a></p>
 <p>Describes a monitor's size and position relative to other monitors. x1, y1 will be 0, 0 on the primary display. Other monitors can have negative values if they are to the left or above the primary display. x2, y2 are the coordinates one beyond the bottom right pixel, so that x2-x1 gives the width and y2-y1 gives the height of the display.</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_MONITOR_INFO
 {
@@ -140,31 +140,31 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="monitor.html#al_get_monitor_info">al_get_monitor_info</a></p>
 <h1 id="al_get_new_display_adapter"><a href="#al_get_new_display_adapter">al_get_new_display_adapter</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_new_display_adapter(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L302">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L304">Source Code</a></p>
 <p>Gets the video adapter index where new displays will be created by the calling thread, if previously set with <a href="monitor.html#al_set_new_display_adapter">al_set_new_display_adapter</a>. Otherwise returns <code>ALLEGRO_DEFAULT_DISPLAY_ADAPTER</code>.</p>
 <p>See also: <a href="monitor.html#al_set_new_display_adapter">al_set_new_display_adapter</a></p>
 <h1 id="al_set_new_display_adapter"><a href="#al_set_new_display_adapter">al_set_new_display_adapter</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_new_display_adapter(<span class="dt">int</span> adapter)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L285">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L287">Source Code</a></p>
 <p>Sets the adapter to use for new displays created by the calling thread. The adapter has a monitor attached to it. Information about the monitor can be gotten using <a href="monitor.html#al_get_num_video_adapters">al_get_num_video_adapters</a> and <a href="monitor.html#al_get_monitor_info">al_get_monitor_info</a>.</p>
 <p>To return to the default behaviour, pass <code>ALLEGRO_DEFAULT_DISPLAY_ADAPTER</code>.</p>
 <p>See also: <a href="monitor.html#al_get_num_video_adapters">al_get_num_video_adapters</a>, <a href="monitor.html#al_get_monitor_info">al_get_monitor_info</a></p>
 <h1 id="al_get_monitor_info"><a href="#al_get_monitor_info">al_get_monitor_info</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_monitor_info(<span class="dt">int</span> adapter, ALLEGRO_MONITOR_INFO *info)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/monitor.c#L37">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/monitor.c#L37">Source Code</a></p>
 <p>Get information about a monitor's position on the desktop. adapter is a number from 0 to al_get_num_video_adapters()-1.</p>
 <p>On Windows, use <a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a> to switch between Direct3D and OpenGL backends, which will often have different adapters available.</p>
 <p>Returns <code>true</code> on success, <code>false</code> on failure.</p>
 <p>See also: <a href="monitor.html#allegro_monitor_info">ALLEGRO_MONITOR_INFO</a>, <a href="monitor.html#al_get_num_video_adapters">al_get_num_video_adapters</a></p>
 <h1 id="al_get_num_video_adapters"><a href="#al_get_num_video_adapters">al_get_num_video_adapters</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_num_video_adapters(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/monitor.c#L23">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/monitor.c#L23">Source Code</a></p>
 <p>Get the number of video "adapters" attached to the computer. Each video card attached to the computer counts as one or more adapters. An adapter is thus really a video port that can have a monitor connected to it.</p>
 <p>On Windows, use <a href="display.html#al_set_new_display_flags">al_set_new_display_flags</a> to switch between Direct3D and OpenGL backends, which will often have different adapters available.</p>
 <p>See also: <a href="monitor.html#al_get_monitor_info">al_get_monitor_info</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:41 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:59 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/mouse.html b/docs/html/refman/mouse.html
index d9892b6..2b14e60 100644
--- a/docs/html/refman/mouse.html
+++ b/docs/html/refman/mouse.html
@@ -150,7 +150,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="allegro_mouse_state"><a href="#allegro_mouse_state">ALLEGRO_MOUSE_STATE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_MOUSE_STATE ALLEGRO_MOUSE_STATE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/mouse.h#L35">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/mouse.h#L35">Source Code</a></p>
 <p>Public fields (read only):</p>
 <ul>
 <li>x - mouse x position</li>
@@ -163,31 +163,31 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="mouse.html#al_get_mouse_state">al_get_mouse_state</a>, <a href="mouse.html#al_get_mouse_state_axis">al_get_mouse_state_axis</a>, <a href="mouse.html#al_mouse_button_down">al_mouse_button_down</a></p>
 <h1 id="al_install_mouse"><a href="#al_install_mouse">al_install_mouse</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_install_mouse(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L49">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L49">Source Code</a></p>
 <p>Install a mouse driver.</p>
 <p>Returns true if successful. If a driver was already installed, nothing happens and true is returned.</p>
 <h1 id="al_is_mouse_installed"><a href="#al_is_mouse_installed">al_is_mouse_installed</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_mouse_installed(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L40">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L40">Source Code</a></p>
 <p>Returns true if <a href="mouse.html#al_install_mouse">al_install_mouse</a> was called successfully.</p>
 <h1 id="al_uninstall_mouse"><a href="#al_uninstall_mouse">al_uninstall_mouse</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_uninstall_mouse(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L104">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L104">Source Code</a></p>
 <p>Uninstalls the active mouse driver, if any. This will automatically unregister the mouse event source with any event queues.</p>
 <p>This function is automatically called when Allegro is shut down.</p>
 <h1 id="al_get_mouse_num_axes"><a href="#al_get_mouse_num_axes">al_get_mouse_num_axes</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_mouse_num_axes(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L145">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L145">Source Code</a></p>
 <p>Return the number of axes on the mouse. The first axis is 0.</p>
 <p>See also: <a href="mouse.html#al_get_mouse_num_buttons">al_get_mouse_num_buttons</a></p>
 <h1 id="al_get_mouse_num_buttons"><a href="#al_get_mouse_num_buttons">al_get_mouse_num_buttons</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">unsigned</span> <span class="dt">int</span> al_get_mouse_num_buttons(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L134">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L134">Source Code</a></p>
 <p>Return the number of buttons on the mouse. The first button is 1.</p>
 <p>See also: <a href="mouse.html#al_get_mouse_num_axes">al_get_mouse_num_axes</a></p>
 <h1 id="al_get_mouse_state"><a href="#al_get_mouse_state">al_get_mouse_state</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_mouse_state(ALLEGRO_MOUSE_STATE *ret_state)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L209">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L209">Source Code</a></p>
 <p>Save the state of the mouse specified at the time the function is called into the given structure.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MOUSE_STATE state;
@@ -206,47 +206,47 @@ al_get_mouse_state(&state);
 <p>See also: <a href="mouse.html#allegro_mouse_state">ALLEGRO_MOUSE_STATE</a>, <a href="mouse.html#al_get_mouse_state_axis">al_get_mouse_state_axis</a>, <a href="mouse.html#al_mouse_button_down">al_mouse_button_down</a></p>
 <h1 id="al_get_mouse_state_axis"><a href="#al_get_mouse_state_axis">al_get_mouse_state_axis</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_mouse_state_axis(<span class="dt">const</span> ALLEGRO_MOUSE_STATE *state, <span class="dt">int</span> axis)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L221">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L221">Source Code</a></p>
 <p>Extract the mouse axis value from the saved state. The axes are numbered from 0, in this order: x-axis, y-axis, z-axis, w-axis.</p>
 <p>See also: <a href="mouse.html#allegro_mouse_state">ALLEGRO_MOUSE_STATE</a>, <a href="mouse.html#al_get_mouse_state">al_get_mouse_state</a>, <a href="mouse.html#al_mouse_button_down">al_mouse_button_down</a></p>
 <h1 id="al_mouse_button_down"><a href="#al_mouse_button_down">al_mouse_button_down</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_mouse_button_down(<span class="dt">const</span> ALLEGRO_MOUSE_STATE *state, <span class="dt">int</span> button)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L245">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L245">Source Code</a></p>
 <p>Return true if the mouse button specified was held down in the state specified. Unlike most things, the first mouse button is numbered 1.</p>
 <p>See also: <a href="mouse.html#allegro_mouse_state">ALLEGRO_MOUSE_STATE</a>, <a href="mouse.html#al_get_mouse_state">al_get_mouse_state</a>, <a href="mouse.html#al_get_mouse_state_axis">al_get_mouse_state_axis</a></p>
 <h1 id="al_set_mouse_xy"><a href="#al_set_mouse_xy">al_set_mouse_xy</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_mouse_xy(ALLEGRO_DISPLAY *display, <span class="dt">int</span> x, <span class="dt">int</span> y)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L156">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L156">Source Code</a></p>
 <p>Try to position the mouse at the given coordinates on the given display. The mouse movement resulting from a successful move will generate an <a href="events.html#allegro_event_mouse_warped">ALLEGRO_EVENT_MOUSE_WARPED</a> event.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="mouse.html#al_set_mouse_z">al_set_mouse_z</a>, <a href="mouse.html#al_set_mouse_w">al_set_mouse_w</a></p>
 <h1 id="al_set_mouse_z"><a href="#al_set_mouse_z">al_set_mouse_z</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_mouse_z(<span class="dt">int</span> z)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L168">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L168">Source Code</a></p>
 <p>Set the mouse wheel position to the given value.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="mouse.html#al_set_mouse_w">al_set_mouse_w</a></p>
 <h1 id="al_set_mouse_w"><a href="#al_set_mouse_w">al_set_mouse_w</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_mouse_w(<span class="dt">int</span> w)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L180">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L180">Source Code</a></p>
 <p>Set the second mouse wheel position to the given value.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="mouse.html#al_set_mouse_z">al_set_mouse_z</a></p>
 <h1 id="al_set_mouse_axis"><a href="#al_set_mouse_axis">al_set_mouse_axis</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_mouse_axis(<span class="dt">int</span> which, <span class="dt">int</span> value)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L192">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L192">Source Code</a></p>
 <p>Set the given mouse axis to the given value.</p>
 <p>The axis number must not be 0 or 1, which are the X and Y axes. Use <a href="mouse.html#al_set_mouse_xy">al_set_mouse_xy</a> for that.</p>
 <p>Returns true on success, false on failure.</p>
 <p>See also: <a href="mouse.html#al_set_mouse_xy">al_set_mouse_xy</a>, <a href="mouse.html#al_set_mouse_z">al_set_mouse_z</a>, <a href="mouse.html#al_set_mouse_w">al_set_mouse_w</a></p>
 <h1 id="al_get_mouse_event_source"><a href="#al_get_mouse_event_source">al_get_mouse_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_mouse_event_source(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L305">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L305">Source Code</a></p>
 <p>Retrieve the mouse event source. All <a href="events.html#allegro_event_mouse_axes">mouse events</a> are generated by this event source.</p>
 <p>Returns NULL if the mouse subsystem was not installed.</p>
 <h1 id="al_set_mouse_wheel_precision"><a href="#al_set_mouse_wheel_precision">al_set_mouse_wheel_precision</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_mouse_wheel_precision(<span class="dt">int</span> precision)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L316">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L316">Source Code</a></p>
 <p>Sets the precision of the mouse wheel (the z and w coordinates). This precision manifests itself as a multiplier on the <code>dz</code> and <code>dw</code> fields in mouse events. It also affects the <code>z</code> and <code>w</code> fields of events and <a href="mouse.html#allegro_mouse_state">ALLEGRO_MOUSE_STATE</a>, but not in a simple way if you alter the precision often, so it is suggested to reset those axes to 0 when you change precision. Setting this to a high value allows you [...]
 <pre class="sourceCode c"><code class="sourceCode c">al_set_mouse_wheel_precision(<span class="dv">120</span>);
 
@@ -261,7 +261,7 @@ al_wait_for_event(event_queue, &event);
 <p>See also: <a href="mouse.html#al_get_mouse_wheel_precision">al_get_mouse_wheel_precision</a></p>
 <h1 id="al_get_mouse_wheel_precision"><a href="#al_get_mouse_wheel_precision">al_get_mouse_wheel_precision</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_mouse_wheel_precision(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L329">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L329">Source Code</a></p>
 <p>Gets the precision of the mouse wheel (the z and w coordinates).</p>
 <p>Since: 5.1.10</p>
 <p>See also: <a href="mouse.html#al_set_mouse_wheel_precision">al_set_mouse_wheel_precision</a></p>
@@ -269,19 +269,19 @@ al_wait_for_event(event_queue, &event);
 <h2 id="al_create_mouse_cursor"><a href="#al_create_mouse_cursor">al_create_mouse_cursor</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MOUSE_CURSOR *al_create_mouse_cursor(ALLEGRO_BITMAP *bmp,
    <span class="dt">int</span> x_focus, <span class="dt">int</span> y_focus)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mouse_cursor.c#L24">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mouse_cursor.c#L24">Source Code</a></p>
 <p>Create a mouse cursor from the bitmap provided. <code>x_focus</code> and <code>y_focus</code> describe the bit of the cursor that will represent the actual mouse position.</p>
 <p>Returns a pointer to the cursor on success, or NULL on failure.</p>
 <p>See also: <a href="mouse.html#al_set_mouse_cursor">al_set_mouse_cursor</a>, <a href="mouse.html#al_destroy_mouse_cursor">al_destroy_mouse_cursor</a></p>
 <h2 id="al_destroy_mouse_cursor"><a href="#al_destroy_mouse_cursor">al_destroy_mouse_cursor</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_mouse_cursor(ALLEGRO_MOUSE_CURSOR *cursor)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mouse_cursor.c#L37">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mouse_cursor.c#L37">Source Code</a></p>
 <p>Free the memory used by the given cursor.</p>
 <p>Has no effect if <code>cursor</code> is NULL.</p>
 <p>See also: <a href="mouse.html#al_create_mouse_cursor">al_create_mouse_cursor</a></p>
 <h2 id="al_set_mouse_cursor"><a href="#al_set_mouse_cursor">al_set_mouse_cursor</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_mouse_cursor(ALLEGRO_DISPLAY *display, ALLEGRO_MOUSE_CURSOR *cursor)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mouse_cursor.c#L54">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mouse_cursor.c#L54">Source Code</a></p>
 <p>Set the given mouse cursor to be the current mouse cursor for the given display.</p>
 <p>If the cursor is currently 'shown' (as opposed to 'hidden') the change is immediately visible.</p>
 <p>Returns true on success, false on failure.</p>
@@ -289,7 +289,7 @@ al_wait_for_event(event_queue, &event);
 <h2 id="al_set_system_mouse_cursor"><a href="#al_set_system_mouse_cursor">al_set_system_mouse_cursor</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_system_mouse_cursor(ALLEGRO_DISPLAY *display,
    ALLEGRO_SYSTEM_MOUSE_CURSOR cursor_id)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mouse_cursor.c#L71">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mouse_cursor.c#L71">Source Code</a></p>
 <p>Set the given system mouse cursor to be the current mouse cursor for the given display. If the cursor is currently 'shown' (as opposed to 'hidden') the change is immediately visible.</p>
 <p>If the cursor doesn't exist on the current platform another cursor will be silently be substituted.</p>
 <p>The cursors are:</p>
@@ -318,24 +318,24 @@ al_wait_for_event(event_queue, &event);
 <p>See also: <a href="mouse.html#al_set_mouse_cursor">al_set_mouse_cursor</a>, <a href="mouse.html#al_show_mouse_cursor">al_show_mouse_cursor</a>, <a href="mouse.html#al_hide_mouse_cursor">al_hide_mouse_cursor</a></p>
 <h2 id="al_get_mouse_cursor_position"><a href="#al_get_mouse_cursor_position">al_get_mouse_cursor_position</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_mouse_cursor_position(<span class="dt">int</span> *ret_x, <span class="dt">int</span> *ret_y)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L257">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L257">Source Code</a></p>
 <p>On platforms where this information is available, this function returns the global location of the mouse cursor, relative to the desktop. You should not normally use this function, as the information is not useful except for special scenarios as moving a window.</p>
 <p>Returns true on success, false on failure.</p>
 <h2 id="al_hide_mouse_cursor"><a href="#al_hide_mouse_cursor">al_hide_mouse_cursor</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_hide_mouse_cursor(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mouse_cursor.c#L109">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mouse_cursor.c#L109">Source Code</a></p>
 <p>Hide the mouse cursor in the given display. This has no effect on what the current mouse cursor looks like; it just makes it disappear.</p>
 <p>Returns true on success (or if the cursor already was hidden), false otherwise.</p>
 <p>See also: <a href="mouse.html#al_show_mouse_cursor">al_show_mouse_cursor</a></p>
 <h2 id="al_show_mouse_cursor"><a href="#al_show_mouse_cursor">al_show_mouse_cursor</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_show_mouse_cursor(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mouse_cursor.c#L96">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mouse_cursor.c#L96">Source Code</a></p>
 <p>Make a mouse cursor visible in the given display.</p>
 <p>Returns true if a mouse cursor is shown as a result of the call (or one already was visible), false otherwise.</p>
 <p>See also: <a href="mouse.html#al_hide_mouse_cursor">al_hide_mouse_cursor</a></p>
 <h2 id="al_grab_mouse"><a href="#al_grab_mouse">al_grab_mouse</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_grab_mouse(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L277">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L277">Source Code</a></p>
 <p>Confine the mouse cursor to the given display. The mouse cursor can only be confined to one display at a time.</p>
 <p>Returns true if successful, otherwise returns false. Do not assume that the cursor will remain confined until you call <a href="mouse.html#al_ungrab_mouse">al_ungrab_mouse</a>. It may lose the confined status at any time for other reasons.</p>
 <blockquote>
@@ -344,15 +344,15 @@ al_wait_for_event(event_queue, &event);
 <p>See also: <a href="mouse.html#al_ungrab_mouse">al_ungrab_mouse</a></p>
 <h2 id="al_ungrab_mouse"><a href="#al_ungrab_mouse">al_ungrab_mouse</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ungrab_mouse(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/mousenu.c#L291">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/mousenu.c#L291">Source Code</a></p>
 <p>Stop confining the mouse cursor to any display belonging to the program.</p>
 <blockquote>
 <p><em>Note:</em> not yet implemented on Mac OS X.</p>
 </blockquote>
 <p>See also: <a href="mouse.html#al_grab_mouse">al_grab_mouse</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:41 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:59 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/native_dialog.html b/docs/html/refman/native_dialog.html
index ba9c65d..54eb789 100644
--- a/docs/html/refman/native_dialog.html
+++ b/docs/html/refman/native_dialog.html
@@ -167,15 +167,15 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_native_dialog.h></span></code></pre>
 <h1 id="allegro_filechooser"><a href="#allegro_filechooser">ALLEGRO_FILECHOOSER</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_FILECHOOSER ALLEGRO_FILECHOOSER;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/allegro5/allegro_native_dialog.h#L38">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/allegro5/allegro_native_dialog.h#L38">Source Code</a></p>
 <p>Opaque handle to a native file dialog.</p>
 <h1 id="allegro_textlog"><a href="#allegro_textlog">ALLEGRO_TEXTLOG</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_TEXTLOG ALLEGRO_TEXTLOG;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/allegro5/allegro_native_dialog.h#L42">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/allegro5/allegro_native_dialog.h#L42">Source Code</a></p>
 <p>Opaque handle to a text log window.</p>
 <h1 id="al_init_native_dialog_addon"><a href="#al_init_native_dialog_addon">al_init_native_dialog_addon</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_init_native_dialog_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/dialog.c#L15">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/dialog.c#L15">Source Code</a></p>
 <p>Initialise the native dialog addon.</p>
 <p>Returns true on success, false on error.</p>
 <p>Since: 5.0.9, 5.1.0</p>
@@ -185,7 +185,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="native_dialog.html#al_shutdown_native_dialog_addon">al_shutdown_native_dialog_addon</a></p>
 <h1 id="al_shutdown_native_dialog_addon"><a href="#al_shutdown_native_dialog_addon">al_shutdown_native_dialog_addon</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_shutdown_native_dialog_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/dialog.c#L32">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/dialog.c#L32">Source Code</a></p>
 <p>Shut down the native dialog addon.</p>
 <p>Since: 5.0.9, 5.1.5</p>
 <p>See also: <a href="native_dialog.html#al_init_native_dialog_addon">al_init_native_dialog_addon</a></p>
@@ -195,7 +195,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
    <span class="dt">char</span> <span class="dt">const</span> *title,
    <span class="dt">char</span> <span class="dt">const</span> *patterns,
    <span class="dt">int</span> mode)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/dialog.c#L43">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/dialog.c#L43">Source Code</a></p>
 <p>Creates a new native file dialog. You should only have one such dialog opened at a time.</p>
 <p>Parameters:</p>
 <ul>
@@ -230,28 +230,28 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_show_native_file_dialog"><a href="#al_show_native_file_dialog">al_show_native_file_dialog</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_show_native_file_dialog(ALLEGRO_DISPLAY *display,
    ALLEGRO_FILECHOOSER *dialog)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/dialog.c#L67">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/dialog.c#L67">Source Code</a></p>
 <p>Show the dialog window. The display may be NULL, otherwise the given display is treated as the parent if possible.</p>
 <p>This function blocks the calling thread until it returns, so you may want to spawn a thread with <a href="threads.html#al_create_thread">al_create_thread</a> and call it from inside that thread.</p>
 <p>Returns true on success, false on failure.</p>
 <h1 id="al_get_native_file_dialog_count"><a href="#al_get_native_file_dialog_count">al_get_native_file_dialog_count</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_native_file_dialog_count(<span class="dt">const</span> ALLEGRO_FILECHOOSER *dialog)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/dialog.c#L76">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/dialog.c#L76">Source Code</a></p>
 <p>Returns the number of files selected, or 0 if the dialog was cancelled.</p>
 <h1 id="al_get_native_file_dialog_path"><a href="#al_get_native_file_dialog_path">al_get_native_file_dialog_path</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_native_file_dialog_path(
    <span class="dt">const</span> ALLEGRO_FILECHOOSER *dialog, size_t i)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/dialog.c#L84">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/dialog.c#L84">Source Code</a></p>
 <p>Returns one of the selected paths with index <code>i</code>. The index should range from <code>0</code> to the return value of <a href="native_dialog.html#al_get_native_file_dialog_count">al_get_native_file_dialog_count</a> <code>-1</code>.</p>
 <h1 id="al_destroy_native_file_dialog"><a href="#al_destroy_native_file_dialog">al_destroy_native_file_dialog</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_native_file_dialog(ALLEGRO_FILECHOOSER *dialog)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/dialog.c#L95">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/dialog.c#L95">Source Code</a></p>
 <p>Frees up all resources used by the file dialog.</p>
 <h1 id="al_show_native_message_box"><a href="#al_show_native_message_box">al_show_native_message_box</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_show_native_message_box(ALLEGRO_DISPLAY *display,
    <span class="dt">char</span> <span class="dt">const</span> *title, <span class="dt">char</span> <span class="dt">const</span> *heading, <span class="dt">char</span> <span class="dt">const</span> *text,
    <span class="dt">char</span> <span class="dt">const</span> *buttons, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/dialog.c#L117">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/dialog.c#L117">Source Code</a></p>
 <p>Show a native GUI message box. This can be used for example to display an error message if creation of an initial display fails. The display may be NULL, otherwise the given display is treated as the parent if possible.</p>
 <p>The message box will have a single "OK" button and use the style informative dialog boxes usually have on the native system. If the <code>buttons</code> parameter is not NULL, you can instead specify the button text in a string, with buttons separated by a vertical bar (|).</p>
 <p>The flags available are:</p>
@@ -296,7 +296,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 );</code></pre>
 <h1 id="al_open_native_text_log"><a href="#al_open_native_text_log">al_open_native_text_log</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_TEXTLOG *al_open_native_text_log(<span class="dt">char</span> <span class="dt">const</span> *title, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/textlog.c#L39">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/textlog.c#L39">Source Code</a></p>
 <p>Opens a window to which you can append log messages with <a href="native_dialog.html#al_append_native_text_log">al_append_native_text_log</a>. This can be useful for debugging if you don't want to depend on a console being available.</p>
 <p>Use <a href="native_dialog.html#al_close_native_text_log">al_close_native_text_log</a> to close the window again.</p>
 <p>The flags available are:</p>
@@ -312,20 +312,20 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="native_dialog.html#al_append_native_text_log">al_append_native_text_log</a>, <a href="native_dialog.html#al_close_native_text_log">al_close_native_text_log</a></p>
 <h1 id="al_close_native_text_log"><a href="#al_close_native_text_log">al_close_native_text_log</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_close_native_text_log(ALLEGRO_TEXTLOG *textlog)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/textlog.c#L92">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/textlog.c#L92">Source Code</a></p>
 <p>Closes a message log window opened with <a href="native_dialog.html#al_open_native_text_log">al_open_native_text_log</a> earlier.</p>
 <p>Does nothing if passed NULL.</p>
 <p>See also: <a href="native_dialog.html#al_open_native_text_log">al_open_native_text_log</a></p>
 <h1 id="al_append_native_text_log"><a href="#al_append_native_text_log">al_append_native_text_log</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_append_native_text_log(ALLEGRO_TEXTLOG *textlog,
    <span class="dt">char</span> <span class="dt">const</span> *format, ...)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/textlog.c#L135">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/textlog.c#L135">Source Code</a></p>
 <p>Appends a line of text to the message log window and scrolls to the bottom (if the line would not be visible otherwise). This works like printf. A line is continued until you add a newline character.</p>
 <p>If the window is NULL then this function will fall back to calling printf. This makes it convenient to support logging to a window or a terminal.</p>
 <h1 id="al_get_native_text_log_event_source"><a href="#al_get_native_text_log_event_source">al_get_native_text_log_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_native_text_log_event_source(
    ALLEGRO_TEXTLOG *textlog)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/textlog.c#L164">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/textlog.c#L164">Source Code</a></p>
 <p>Get an event source for a text log window. The possible events are:</p>
 <dl>
 <dt>ALLEGRO_EVENT_NATIVE_DIALOG_CLOSE</dt>
@@ -334,7 +334,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </dl>
 <h1 id="al_get_allegro_native_dialog_version"><a href="#al_get_allegro_native_dialog_version">al_get_allegro_native_dialog_version</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_native_dialog_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/dialog.c#L155">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/dialog.c#L155">Source Code</a></p>
 <p>Returns the (compiled) version of the addon, in the same format as <a href="system.html#al_get_allegro_version">al_get_allegro_version</a>.</p>
 <h1 id="menus"><a href="#menus">Menus</a></h1>
 <p>Menus are implemented on Windows, X and OS X. Menus on X are implemented with GTK, and have a special requirement: you must set the ALLEGRO_GTK_TOPLEVEL display flag prior to creating the display which will have menus attached.</p>
@@ -367,11 +367,11 @@ al_wait_for_event(queue, &event);
 <p>Because there is no "DISPLAY_DESTROYED" event, you must call al_set_display_menu(display, NULL) before destroying any display with a menu attached, to avoid leaking resources.</p>
 <h2 id="allegro_menu"><a href="#allegro_menu">ALLEGRO_MENU</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_MENU ALLEGRO_MENU;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/allegro5/allegro_native_dialog.h#L46">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/allegro5/allegro_native_dialog.h#L46">Source Code</a></p>
 <p>An opaque data type that represents a menu that contains menu items. Each of the menu items may optionally include a sub-menu.</p>
 <h2 id="allegro_menu_info"><a href="#allegro_menu_info">ALLEGRO_MENU_INFO</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_MENU_INFO {</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/allegro5/allegro_native_dialog.h#L50">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/allegro5/allegro_native_dialog.h#L50">Source Code</a></p>
 <p>A structure that defines how to create a complete menu system. For standard menu items, the following format is used:</p>
 <pre><code>   { caption, id, flags, icon }</code></pre>
 <p>For special items, these macros are helpful:</p>
@@ -400,21 +400,21 @@ ALLEGRO_MENU *menu = al_build_menu(menu_info);</code></pre>
 <p>See also: <a href="native_dialog.html#al_build_menu">al_build_menu</a></p>
 <h2 id="al_create_menu"><a href="#al_create_menu">al_create_menu</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MENU *al_create_menu(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L292">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L292">Source Code</a></p>
 <p>Creates a menu container that can hold menu items.</p>
 <p>Returns <code>NULL</code> on failure.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_create_popup_menu">al_create_popup_menu</a>, <a href="native_dialog.html#al_build_menu">al_build_menu</a></p>
 <h2 id="al_create_popup_menu"><a href="#al_create_popup_menu">al_create_popup_menu</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MENU *al_create_popup_menu(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L311">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L311">Source Code</a></p>
 <p>Creates a menu container for popup menus. Only the root (outermost) menu should be created with this function. Sub menus of popups should be created with <a href="native_dialog.html#al_create_menu">al_create_menu</a>.</p>
 <p>Returns <code>NULL</code> on failure.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_create_menu">al_create_menu</a>, <a href="native_dialog.html#al_build_menu">al_build_menu</a></p>
 <h2 id="al_build_menu"><a href="#al_build_menu">al_build_menu</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MENU *al_build_menu(ALLEGRO_MENU_INFO *info)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L349">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L349">Source Code</a></p>
 <p>Builds a menu based on the specifications of a sequence of <code>ALLEGRO_MENU_INFO</code> elements.</p>
 <p>Returns a pointer to the root <code>ALLEGRO_MENU</code>, or <code>NULL</code> on failure. To gain access to the other menus and items, you will need to search for them using <a href="native_dialog.html#al_find_menu_item">al_find_menu_item</a>.</p>
 <p>Since: 5.1.0</p>
@@ -422,14 +422,14 @@ ALLEGRO_MENU *menu = al_build_menu(menu_info);</code></pre>
 <h2 id="al_append_menu_item"><a href="#al_append_menu_item">al_append_menu_item</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_append_menu_item(ALLEGRO_MENU *parent, <span class="dt">char</span> <span class="dt">const</span> *title, <span class="dt">uint16_t</span> id,
    <span class="dt">int</span> flags, ALLEGRO_BITMAP *icon, ALLEGRO_MENU *submenu)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L361">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L361">Source Code</a></p>
 <p>Appends a menu item to the end of the menu. See <a href="native_dialog.html#al_insert_menu_item">al_insert_menu_item</a> for more information.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_insert_menu_item">al_insert_menu_item</a>, <a href="native_dialog.html#al_remove_menu_item">al_remove_menu_item</a></p>
 <h2 id="al_insert_menu_item"><a href="#al_insert_menu_item">al_insert_menu_item</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_insert_menu_item(ALLEGRO_MENU *parent, <span class="dt">int</span> pos, <span class="dt">char</span> <span class="dt">const</span> *title,
    <span class="dt">uint16_t</span> id, <span class="dt">int</span> flags, ALLEGRO_BITMAP *icon, ALLEGRO_MENU *submenu)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L373">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L373">Source Code</a></p>
 <p>Inserts a menu item at the spot specified. See the introductory text for a detailed explanation of how the <code>pos</code> parameter is interpreted.</p>
 <p>The <code>parent</code> menu can be a popup menu or a regular menu. To underline one character in the <code>title</code>, prefix it with an ampersand.</p>
 <p>The <code>flags</code> can be any combination of:</p>
@@ -451,7 +451,7 @@ ALLEGRO_MENU *menu = al_build_menu(menu_info);</code></pre>
 <p>See also: <a href="native_dialog.html#al_append_menu_item">al_append_menu_item</a>, <a href="native_dialog.html#al_remove_menu_item">al_remove_menu_item</a></p>
 <h2 id="al_remove_menu_item"><a href="#al_remove_menu_item">al_remove_menu_item</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_remove_menu_item(ALLEGRO_MENU *menu, <span class="dt">int</span> pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L439">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L439">Source Code</a></p>
 <p>Removes the specified item from the menu and destroys it. If the item contains a sub-menu, it too is destroyed. Any references to it are invalidated. If you want to preserve that sub-menu, you should first make a copy with <a href="native_dialog.html#al_clone_menu">al_clone_menu</a>.</p>
 <p>This is safe to call on a menu that is currently being displayed.</p>
 <p>Returns <code>true</code> if an item was removed.</p>
@@ -459,52 +459,52 @@ ALLEGRO_MENU *menu = al_build_menu(menu_info);</code></pre>
 <p>See also: <a href="native_dialog.html#al_append_menu_item">al_append_menu_item</a>, <a href="native_dialog.html#al_insert_menu_item">al_insert_menu_item</a>, <a href="native_dialog.html#al_destroy_menu">al_destroy_menu</a></p>
 <h2 id="al_clone_menu"><a href="#al_clone_menu">al_clone_menu</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MENU *al_clone_menu(ALLEGRO_MENU *menu)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L335">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L335">Source Code</a></p>
 <p>Makes a copy of a menu so that it can be reused on another display. The menu being cloned can be anything: a regular menu, a popup menu, or a sub-menu.</p>
 <p>Returns the cloned menu.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_clone_menu_for_popup">al_clone_menu_for_popup</a></p>
 <h2 id="al_clone_menu_for_popup"><a href="#al_clone_menu_for_popup">al_clone_menu_for_popup</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MENU *al_clone_menu_for_popup(ALLEGRO_MENU *menu)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L342">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L342">Source Code</a></p>
 <p>Exactly like <a href="native_dialog.html#al_clone_menu">al_clone_menu</a>, except that the copy is for a popup menu.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_clone_menu">al_clone_menu</a></p>
 <h2 id="al_destroy_menu"><a href="#al_destroy_menu">al_destroy_menu</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_menu(ALLEGRO_MENU *menu)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L620">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L620">Source Code</a></p>
 <p>Destroys an entire menu, including its sub-menus. Any references to it or a sub-menu are no longer valid. It is safe to call this on a menu that is currently being displayed.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_remove_menu_item">al_remove_menu_item</a></p>
 <h2 id="al_get_menu_item_caption"><a href="#al_get_menu_item_caption">al_get_menu_item_caption</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_menu_item_caption(ALLEGRO_MENU *menu, <span class="dt">int</span> pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L493">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L493">Source Code</a></p>
 <p>Returns the caption associated with the menu item. It is valid as long as the caption is not modified.</p>
 <p>Returns <code>NULL</code> if the item was not found.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_set_menu_item_caption">al_set_menu_item_caption</a></p>
 <h2 id="al_set_menu_item_caption"><a href="#al_set_menu_item_caption">al_set_menu_item_caption</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_menu_item_caption(ALLEGRO_MENU *menu, <span class="dt">int</span> pos, <span class="dt">const</span> <span class="dt">char</span> *caption)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L506">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L506">Source Code</a></p>
 <p>Updates the menu item caption with the new <code>caption</code>. This will invalidate any previous calls to <a href="native_dialog.html#al_get_menu_item_caption">al_get_menu_item_caption</a>.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_get_menu_item_caption">al_get_menu_item_caption</a></p>
 <h2 id="al_get_menu_item_flags"><a href="#al_get_menu_item_flags">al_get_menu_item_flags</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_menu_item_flags(ALLEGRO_MENU *menu, <span class="dt">int</span> pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L523">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L523">Source Code</a></p>
 <p>Returns the currently set flags. See <a href="native_dialog.html#al_insert_menu_item">al_insert_menu_item</a> for a description of the available flags.</p>
 <p>Returns -1 if the item was not found.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_set_menu_item_flags">al_set_menu_item_flags</a>, <a href="native_dialog.html#al_toggle_menu_item_flags">al_toggle_menu_item_flags</a></p>
 <h2 id="al_set_menu_item_flags"><a href="#al_set_menu_item_flags">al_set_menu_item_flags</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_menu_item_flags(ALLEGRO_MENU *menu, <span class="dt">int</span> pos, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L535">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L535">Source Code</a></p>
 <p>Updates the menu item's flags. See <a href="native_dialog.html#al_insert_menu_item">al_insert_menu_item</a> for a description of the available flags.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_get_menu_item_flags">al_get_menu_item_flags</a>, <a href="native_dialog.html#al_toggle_menu_item_flags">al_toggle_menu_item_flags</a></p>
 <h2 id="al_toggle_menu_item_flags"><a href="#al_toggle_menu_item_flags">al_toggle_menu_item_flags</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_toggle_menu_item_flags(ALLEGRO_MENU *menu, <span class="dt">int</span> pos, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L561">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L561">Source Code</a></p>
 <p>Toggles the specified menu item's flags. See <a href="native_dialog.html#al_insert_menu_item">al_insert_menu_item</a> for a description of the available flags.</p>
 <p>Returns a bitfield of only the specified flags that are set after the toggle. A flag that was not toggled will not be returned, even if it is set. Returns -1 if the id is invalid.</p>
 <p>Since: 5.1.0</p>
@@ -514,21 +514,21 @@ ALLEGRO_MENU *menu = al_build_menu(menu_info);</code></pre>
 <p>See also: <a href="native_dialog.html#al_get_menu_item_flags">al_get_menu_item_flags</a>, <a href="native_dialog.html#al_set_menu_item_flags">al_set_menu_item_flags</a></p>
 <h2 id="al_get_menu_item_icon"><a href="#al_get_menu_item_icon">al_get_menu_item_icon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_get_menu_item_icon(ALLEGRO_MENU *menu, <span class="dt">int</span> pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L588">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L588">Source Code</a></p>
 <p>Returns the icon associated with the menu. It is safe to draw to the returned bitmap, but you must call <a href="native_dialog.html#al_set_menu_item_icon">al_set_menu_item_icon</a> in order for the changes to be applied.</p>
 <p>Returns <code>NULL</code> if the item was not found or if it has no icon.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_set_menu_item_icon">al_set_menu_item_icon</a></p>
 <h2 id="al_set_menu_item_icon"><a href="#al_set_menu_item_icon">al_set_menu_item_icon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_menu_item_icon(ALLEGRO_MENU *menu, <span class="dt">int</span> pos, ALLEGRO_BITMAP *icon)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L601">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L601">Source Code</a></p>
 <p>Sets the icon for the specified menu item. The menu assumes ownership of the <code>ALLEGRO_BITMAP</code> and may invalidate the pointer, so you must clone it if you wish to continue using it.</p>
 <p>If a video bitmap is passed, it will automatically be converted to a memory bitmap, so it is preferrable to pass a memory bitmap.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_get_menu_item_icon">al_get_menu_item_icon</a>, <a href="graphics.html#al_clone_bitmap">al_clone_bitmap</a></p>
 <h2 id="al_find_menu"><a href="#al_find_menu">al_find_menu</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MENU *al_find_menu(ALLEGRO_MENU *haystack, <span class="dt">uint16_t</span> id)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L456">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L456">Source Code</a></p>
 <p>Searches in the <code>haystack</code> menu for any submenu with the given <code>id</code>. (Note that this only represents a literal ID, and cannot be used as an index.)</p>
 <p>Returns the menu, if found. Otherwise returns <code>NULL</code>.</p>
 <p>Since: 5.1.0</p>
@@ -536,7 +536,7 @@ ALLEGRO_MENU *menu = al_build_menu(menu_info);</code></pre>
 <h2 id="al_find_menu_item"><a href="#al_find_menu_item">al_find_menu_item</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_find_menu_item(ALLEGRO_MENU *haystack, <span class="dt">uint16_t</span> id, ALLEGRO_MENU **menu,
    <span class="dt">int</span> *index)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L466">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L466">Source Code</a></p>
 <p>Searches in the <code>haystack</code> menu for an item with the given <code>id</code>. (Note that this only represents a literal ID, and cannot be used as an index.)</p>
 <p>If <code>menu</code> and <code>index</code> are not <code>NULL</code>, they will be set as the parent menu containing the item and the zero-based (positive) index of the item. (If the menu item was not found, then their values are undefined.)</p>
 <p>Returns true if the menu item was found.</p>
@@ -544,32 +544,32 @@ ALLEGRO_MENU *menu = al_build_menu(menu_info);</code></pre>
 <p>See also: <a href="native_dialog.html#al_find_menu">al_find_menu</a></p>
 <h2 id="al_get_default_menu_event_source"><a href="#al_get_default_menu_event_source">al_get_default_menu_event_source</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_default_menu_event_source(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L663">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L663">Source Code</a></p>
 <p>Returns the default event source used for menu clicks. If a menu was not given its own event source via <a href="native_dialog.html#al_enable_menu_event_source">al_enable_menu_event_source</a>, then it will use this default source.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="events.html#al_register_event_source">al_register_event_source</a>, <a href="native_dialog.html#al_enable_menu_event_source">al_enable_menu_event_source</a>, <a href="native_dialog.html#al_disable_menu_event_source">al_disable_menu_event_source</a></p>
 <h2 id="al_enable_menu_event_source"><a href="#al_enable_menu_event_source">al_enable_menu_event_source</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_enable_menu_event_source(ALLEGRO_MENU *menu)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L670">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L670">Source Code</a></p>
 <p>Enables a unique event source for this menu. It and all of its sub-menus will use this event source. (It is safe to call this multiple times on the same menu.)</p>
 <p>Returns the event source.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="events.html#al_register_event_source">al_register_event_source</a>, <a href="native_dialog.html#al_get_default_menu_event_source">al_get_default_menu_event_source</a>, <a href="native_dialog.html#al_disable_menu_event_source">al_disable_menu_event_source</a></p>
 <h2 id="al_disable_menu_event_source"><a href="#al_disable_menu_event_source">al_disable_menu_event_source</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_disable_menu_event_source(ALLEGRO_MENU *menu)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L684">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L684">Source Code</a></p>
 <p>Disables a unique event source for the menu, causing it to use the default event source.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_get_default_menu_event_source">al_get_default_menu_event_source</a>, <a href="native_dialog.html#al_enable_menu_event_source">al_enable_menu_event_source</a></p>
 <h2 id="al_get_display_menu"><a href="#al_get_display_menu">al_get_display_menu</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MENU *al_get_display_menu(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L696">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L696">Source Code</a></p>
 <p>Returns the menu associated with the <code>display</code>, or <code>NULL</code> if it does not have a menu.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_set_display_menu">al_set_display_menu</a></p>
 <h2 id="al_set_display_menu"><a href="#al_set_display_menu">al_set_display_menu</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_display_menu(ALLEGRO_DISPLAY *display, ALLEGRO_MENU *menu)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L714">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L714">Source Code</a></p>
 <p>Associates the <code>menu</code> with the <code>display</code> and shows it. If there was a previous menu associated with the display, it will be destroyed. If you don't want that to happen, you should first remove the menu with <a href="native_dialog.html#al_remove_display_menu">al_remove_display_menu</a>.</p>
 <p>If the menu is already attached to a display, it will not be attached to the new display. If <code>menu</code> is <code>NULL</code>, the current menu will still be destroyed.</p>
 <blockquote>
@@ -580,7 +580,7 @@ ALLEGRO_MENU *menu = al_build_menu(menu_info);</code></pre>
 <p>See also: <a href="native_dialog.html#al_create_menu">al_create_menu</a>, <a href="native_dialog.html#al_remove_display_menu">al_remove_display_menu</a></p>
 <h2 id="al_popup_menu"><a href="#al_popup_menu">al_popup_menu</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_popup_menu(ALLEGRO_MENU *popup, ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L777">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L777">Source Code</a></p>
 <p>Displays a context menu next to the mouse cursor. The menu must have been created with <a href="native_dialog.html#al_create_popup_menu">al_create_popup_menu</a>. It generates events just like a regular display menu does. It is possible that the menu will be canceled without any selection being made.</p>
 <p>The <code>display</code> parameter indicates which window the menu is associated with (when you process the menu click event), but does not actually affect where the menu is located on the screen.</p>
 <p>Returns <code>true</code> if the context menu was displayed.</p>
@@ -588,14 +588,14 @@ ALLEGRO_MENU *menu = al_build_menu(menu_info);</code></pre>
 <p>See also: <a href="native_dialog.html#al_create_popup_menu">al_create_popup_menu</a></p>
 <h2 id="al_remove_display_menu"><a href="#al_remove_display_menu">al_remove_display_menu</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MENU *al_remove_display_menu(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/native_dialog/menu.c#L795">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/native_dialog/menu.c#L795">Source Code</a></p>
 <p>Detaches the menu associated with the display and returns it. The menu can then be used on a different display.</p>
 <p>If you simply want to destroy the active menu, you can call <a href="native_dialog.html#al_set_display_menu">al_set_display_menu</a> with a <code>NULL</code> menu.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="native_dialog.html#al_set_display_menu">al_set_display_menu</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:45 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:02 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/opengl.html b/docs/html/refman/opengl.html
index 8694f26..cf62f61 100644
--- a/docs/html/refman/opengl.html
+++ b/docs/html/refman/opengl.html
@@ -136,7 +136,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_opengl.h></span></code></pre>
 <h1 id="al_get_opengl_extension_list"><a href="#al_get_opengl_extension_list">al_get_opengl_extension_list</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_OGL_EXT_LIST *al_get_opengl_extension_list(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/extensions.c#L932">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/extensions.c#L924">Source Code</a></p>
 <p>Returns the list of OpenGL extensions supported by Allegro, for the given display.</p>
 <p>Allegro will keep information about all extensions it knows about in a structure returned by <code>al_get_opengl_extension_list</code>.</p>
 <p>For example:</p>
@@ -146,9 +146,12 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>The extension will be set to true if available for the given display and false otherwise. This means to use the definitions and functions from an OpenGL extension, all you need to do is to check for it as above at run time, after acquiring the OpenGL display from Allegro.</p>
 <p>Under Windows, this will also work with WGL extensions, and under Unix with GLX extensions.</p>
 <p>In case you want to manually check for extensions and load function pointers yourself (say, in case the Allegro developers did not include it yet), you can use the <a href="opengl.html#al_have_opengl_extension">al_have_opengl_extension</a> and <a href="opengl.html#al_get_opengl_proc_address">al_get_opengl_proc_address</a> functions instead.</p>
+<blockquote>
+<p><em>Note:</em> the exact extensions exposed depend on how Allegro was compiled. It is recommended to use <a href="opengl.html#al_have_opengl_extension">al_have_opengl_extension</a> and <a href="opengl.html#al_get_opengl_proc_address">al_get_opengl_proc_address</a> for the most stable experience.</p>
+</blockquote>
 <h1 id="al_get_opengl_proc_address"><a href="#al_get_opengl_proc_address">al_get_opengl_proc_address</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> *al_get_opengl_proc_address(<span class="dt">const</span> <span class="dt">char</span> *name)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/extensions.c#L583">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/extensions.c#L586">Source Code</a></p>
 <p>Helper to get the address of an OpenGL symbol</p>
 <p>Example:</p>
 <p>How to get the function <em>glMultiTexCoord3fARB</em> that comes with ARB's Multitexture extension:</p>
@@ -170,7 +173,7 @@ glMultiTexCoord3fARB = (MULTI_TEX_FUNC) al_get_opengl_proc_address(
 <p>A pointer to the symbol if available or NULL otherwise.</p>
 <h1 id="al_get_opengl_texture"><a href="#al_get_opengl_texture">al_get_opengl_texture</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">GLuint al_get_opengl_texture(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/ogl_bitmap.c#L1089">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/ogl_bitmap.c#L1127">Source Code</a></p>
 <p>Returns the OpenGL texture id internally used by the given bitmap if it uses one, else 0.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">bitmap = al_load_bitmap(<span class="st">"my_texture.png"</span>);
@@ -179,22 +182,22 @@ texture = al_get_opengl_texture(bitmap);
     glBindTexture(GL_TEXTURE_2D, texture);</code></pre>
 <h1 id="al_get_opengl_texture_size"><a href="#al_get_opengl_texture_size">al_get_opengl_texture_size</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_opengl_texture_size(ALLEGRO_BITMAP *bitmap, <span class="dt">int</span> *w, <span class="dt">int</span> *h)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/ogl_bitmap.c#L1162">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/ogl_bitmap.c#L1193">Source Code</a></p>
 <p>Retrieves the size of the texture used for the bitmap. This can be different from the bitmap size if OpenGL only supports power-of-two sizes or if it is a sub-bitmap.</p>
 <p>Returns true on success, false on failure. Zero width and height are returned if the bitmap is not an OpenGL bitmap.</p>
 <p>See also: <a href="opengl.html#al_get_opengl_texture_position">al_get_opengl_texture_position</a></p>
 <h1 id="al_get_opengl_texture_position"><a href="#al_get_opengl_texture_position">al_get_opengl_texture_position</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_opengl_texture_position(ALLEGRO_BITMAP *bitmap, <span class="dt">int</span> *u, <span class="dt">int</span> *v)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/ogl_bitmap.c#L1186">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/ogl_bitmap.c#L1217">Source Code</a></p>
 <p>Returns the u/v coordinates for the top/left corner of the bitmap within the used texture, in pixels.</p>
 <p>See also: <a href="opengl.html#al_get_opengl_texture_size">al_get_opengl_texture_size</a></p>
 <h1 id="al_get_opengl_program_object"><a href="#al_get_opengl_program_object">al_get_opengl_program_object</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">GLuint al_get_opengl_program_object(ALLEGRO_SHADER *shader)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/ogl_shader.c#L503">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/ogl_shader.c#L503">Source Code</a></p>
 <p>Returns the OpenGL program object associated with this shader, if the platform is <code>ALLEGRO_SHADER_GLSL</code>. Otherwise, returns 0.</p>
 <h1 id="al_get_opengl_fbo"><a href="#al_get_opengl_fbo">al_get_opengl_fbo</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">GLuint al_get_opengl_fbo(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/ogl_bitmap.c#L1136">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/ogl_bitmap.c#L1167">Source Code</a></p>
 <p>Returns the OpenGL FBO id internally used by the given bitmap if it uses one, otherwise returns zero. No attempt will be made to create an FBO if the bitmap is not owned by the current display.</p>
 <p>The FBO returned by this function will only be freed when the bitmap is destroyed, or if you call <a href="opengl.html#al_remove_opengl_fbo">al_remove_opengl_fbo</a> on the bitmap.</p>
 <blockquote>
@@ -203,12 +206,12 @@ texture = al_get_opengl_texture(bitmap);
 <p>See also: <a href="opengl.html#al_remove_opengl_fbo">al_remove_opengl_fbo</a>, <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a></p>
 <h1 id="al_remove_opengl_fbo"><a href="#al_remove_opengl_fbo">al_remove_opengl_fbo</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_remove_opengl_fbo(ALLEGRO_BITMAP *bitmap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/ogl_bitmap.c#L1102">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/ogl_bitmap.c#L1140">Source Code</a></p>
 <p>Explicitly free an OpenGL FBO created for a bitmap, if it has one. Usually you do not need to worry about freeing FBOs, unless you use <a href="opengl.html#al_get_opengl_fbo">al_get_opengl_fbo</a>.</p>
 <p>See also: <a href="opengl.html#al_get_opengl_fbo">al_get_opengl_fbo</a>, <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a></p>
 <h1 id="al_have_opengl_extension"><a href="#al_have_opengl_extension">al_have_opengl_extension</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_have_opengl_extension(<span class="dt">const</span> <span class="dt">char</span> *extension)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/extensions.c#L565">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/extensions.c#L568">Source Code</a></p>
 <p>This function is a helper to determine whether an OpenGL extension is available on the given display or not.</p>
 <p>Example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">bool packedpixels = al_have_opengl_extension(<span class="st">"GL_EXT_packed_pixels"</span>);</code></pre>
@@ -216,13 +219,13 @@ texture = al_get_opengl_texture(bitmap);
 <p>Returns true if the extension is available; false otherwise.</p>
 <h1 id="al_get_opengl_version"><a href="#al_get_opengl_version">al_get_opengl_version</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_opengl_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/extensions.c#L221">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/extensions.c#L224">Source Code</a></p>
 <p>Returns the OpenGL or OpenGL ES version number of the client (the computer the program is running on), for the current display. "1.0" is returned as 0x01000000, "1.2.1" is returned as 0x01020100, and "1.2.2" as 0x01020200, etc.</p>
 <p>A valid OpenGL context must exist for this function to work, which means you may <em>not</em> call it before <a href="display.html#al_create_display">al_create_display</a>.</p>
 <p>See also: <a href="opengl.html#al_get_opengl_variant">al_get_opengl_variant</a></p>
 <h1 id="al_get_opengl_variant"><a href="#al_get_opengl_variant">al_get_opengl_variant</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_opengl_variant(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/extensions.c#L239">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/extensions.c#L242">Source Code</a></p>
 <p>Returns the variant or type of OpenGL used on the running platform. This function can be called before creating a display or setting properties for new displays. Possible values are:</p>
 <dl>
 <dt>ALLEGRO_DESKTOP_OPENGL</dt>
@@ -235,7 +238,7 @@ texture = al_get_opengl_texture(bitmap);
 <p>See also: <a href="opengl.html#al_get_opengl_version">al_get_opengl_version</a></p>
 <h1 id="al_set_current_opengl_context"><a href="#al_set_current_opengl_context">al_set_current_opengl_context</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_current_opengl_context(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/opengl/ogl_display.c#L81">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/opengl/ogl_display.c#L90">Source Code</a></p>
 <p>Make the OpenGL context associated with the given display current for the calling thread. If there is a current target bitmap which belongs to a different OpenGL context, the target bitmap will be changed to NULL.</p>
 <p>Normally you do not need to use this function, as the context will be made current when you call <a href="graphics.html#al_set_target_bitmap">al_set_target_bitmap</a> or <a href="graphics.html#al_set_target_backbuffer">al_set_target_backbuffer</a>. You might need it if you created an OpenGL "forward compatible" context. Then <a href="display.html#al_get_backbuffer">al_get_backbuffer</a> only returns NULL, so it would not work to pass that to <a href="graphics.html#al_set_tar [...]
 <h1 id="opengl-configuration"><a href="#opengl-configuration">OpenGL configuration</a></h1>
@@ -245,8 +248,8 @@ texture = al_get_opengl_texture(bitmap);
 <span class="dt">GL_EXT_framebuffer_object</span><span class="ot">=</span><span class="dv">0</span></code></pre>
 <p>Any extension which appears in the section is treated as not available (it does not matter if you set it to 0 or any other value).</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:43 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:01 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/path.html b/docs/html/refman/path.html
index 5f4cc31..46c4802 100644
--- a/docs/html/refman/path.html
+++ b/docs/html/refman/path.html
@@ -147,27 +147,27 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>We define a path as an optional <em>drive</em>, followed by zero or more <em>directory components</em>, followed by an optional <em>filename</em>. The filename may be broken up into a <em>basename</em> and an <em>extension</em>, where the basename includes the start of the filename up to, but not including, the last dot (.) character. If no dot character exists the basename is the whole filename. The extension is everything from the last dot character to the end of the filename.</p>
 <h1 id="al_create_path"><a href="#al_create_path">al_create_path</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_PATH *al_create_path(<span class="dt">const</span> <span class="dt">char</span> *str)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L156">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L156">Source Code</a></p>
 <p>Create a path structure from a string. The last component, if it is followed by a directory separator and is neither "." nor "..", is treated as the last directory name in the path. Otherwise the last component is treated as the filename. The string may be NULL for an empty path.</p>
 <p>See also: <a href="path.html#al_create_path_for_directory">al_create_path_for_directory</a>, <a href="path.html#al_destroy_path">al_destroy_path</a></p>
 <h1 id="al_create_path_for_directory"><a href="#al_create_path_for_directory">al_create_path_for_directory</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_PATH *al_create_path_for_directory(<span class="dt">const</span> <span class="dt">char</span> *str)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L188">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L188">Source Code</a></p>
 <p>This is the same as <a href="path.html#al_create_path">al_create_path</a>, but interprets the passed string as a directory path. The filename component of the returned path will always be empty.</p>
 <p>See also: <a href="path.html#al_create_path">al_create_path</a>, <a href="path.html#al_destroy_path">al_destroy_path</a></p>
 <h1 id="al_destroy_path"><a href="#al_destroy_path">al_destroy_path</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_path(ALLEGRO_PATH *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L422">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L422">Source Code</a></p>
 <p>Free a path structure. Does nothing if passed NULL.</p>
 <p>See also: <a href="path.html#al_create_path">al_create_path</a>, <a href="path.html#al_create_path_for_directory">al_create_path_for_directory</a></p>
 <h1 id="al_clone_path"><a href="#al_clone_path">al_clone_path</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_PATH *al_clone_path(<span class="dt">const</span> ALLEGRO_PATH *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L203">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L203">Source Code</a></p>
 <p>Clones an ALLEGRO_PATH structure. Returns NULL on failure.</p>
 <p>See also: <a href="path.html#al_destroy_path">al_destroy_path</a></p>
 <h1 id="al_join_paths"><a href="#al_join_paths">al_join_paths</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_join_paths(ALLEGRO_PATH *path, <span class="dt">const</span> ALLEGRO_PATH *tail)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L347">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L347">Source Code</a></p>
 <p>Concatenate two path structures. The first path structure is modified. If 'tail' is an absolute path, this function does nothing.</p>
 <p>If 'tail' is a relative path, all of its directory components will be appended to 'path'. tail's filename will also overwrite path's filename, even if it is just the empty string.</p>
 <p>Tail's drive is ignored.</p>
@@ -175,104 +175,104 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="path.html#al_rebase_path">al_rebase_path</a></p>
 <h1 id="al_rebase_path"><a href="#al_rebase_path">al_rebase_path</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_rebase_path(<span class="dt">const</span> ALLEGRO_PATH *head, ALLEGRO_PATH *tail)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L374">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L374">Source Code</a></p>
 <p>Concatenate two path structures, modifying the second path structure. If <em>tail</em> is an absolute path, this function does nothing. Otherwise, the drive and path components in <em>head</em> are inserted at the start of <em>tail</em>.</p>
 <p>For example, if <em>head</em> is "/anchor/" and <em>tail</em> is "data/file.ext", then after the call <em>tail</em> becomes "/anchor/data/file.ext".</p>
 <p>See also: <a href="path.html#al_join_paths">al_join_paths</a></p>
 <h1 id="al_get_path_drive"><a href="#al_get_path_drive">al_get_path_drive</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_path_drive(<span class="dt">const</span> ALLEGRO_PATH *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L474">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L474">Source Code</a></p>
 <p>Return the drive letter on a path, or the empty string if there is none.</p>
 <p>The "drive letter" is only used on Windows, and is usually a string like "c:", but may be something like "\\Computer Name" in the case of UNC (Uniform Naming Convention) syntax.</p>
 <h1 id="al_get_path_num_components"><a href="#al_get_path_num_components">al_get_path_num_components</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_path_num_components(<span class="dt">const</span> ALLEGRO_PATH *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L229">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L229">Source Code</a></p>
 <p>Return the number of directory components in a path.</p>
 <p>The directory components do not include the final part of a path (the filename).</p>
 <p>See also: <a href="path.html#al_get_path_component">al_get_path_component</a></p>
 <h1 id="al_get_path_component"><a href="#al_get_path_component">al_get_path_component</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_path_component(<span class="dt">const</span> ALLEGRO_PATH *path, <span class="dt">int</span> i)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L239">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L239">Source Code</a></p>
 <p>Return the i'th directory component of a path, counting from zero. If the index is negative then count from the right, i.e. -1 refers to the last path component. It is an error to pass an index which is out of bounds.</p>
 <p>See also: <a href="path.html#al_get_path_num_components">al_get_path_num_components</a>, <a href="path.html#al_get_path_tail">al_get_path_tail</a></p>
 <h1 id="al_get_path_tail"><a href="#al_get_path_tail">al_get_path_tail</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_path_tail(<span class="dt">const</span> ALLEGRO_PATH *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L307">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L307">Source Code</a></p>
 <p>Returns the last directory component, or NULL if there are no directory components.</p>
 <h1 id="al_get_path_filename"><a href="#al_get_path_filename">al_get_path_filename</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_path_filename(<span class="dt">const</span> ALLEGRO_PATH *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L497">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L497">Source Code</a></p>
 <p>Return the filename part of the path, or the empty string if there is none.</p>
 <p>The returned pointer is valid only until the filename part of the path is modified in any way, or until the path is destroyed.</p>
 <p>See also: <a href="path.html#al_get_path_basename">al_get_path_basename</a>, <a href="path.html#al_get_path_extension">al_get_path_extension</a>, <a href="path.html#al_get_path_component">al_get_path_component</a></p>
 <h1 id="al_get_path_basename"><a href="#al_get_path_basename">al_get_path_basename</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_path_basename(<span class="dt">const</span> ALLEGRO_PATH *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L542">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L542">Source Code</a></p>
 <p>Return the basename, i.e. filename with the extension removed. If the filename doesn't have an extension, the whole filename is the basename. If there is no filename part then the empty string is returned.</p>
 <p>The returned pointer is valid only until the filename part of the path is modified in any way, or until the path is destroyed.</p>
 <p>See also: <a href="path.html#al_get_path_filename">al_get_path_filename</a>, <a href="path.html#al_get_path_extension">al_get_path_extension</a></p>
 <h1 id="al_get_path_extension"><a href="#al_get_path_extension">al_get_path_extension</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_path_extension(<span class="dt">const</span> ALLEGRO_PATH *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L507">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L507">Source Code</a></p>
 <p>Return a pointer to the start of the extension of the filename, i.e. everything from the final dot ('.') character onwards. If no dot exists, returns an empty string.</p>
 <p>The returned pointer is valid only until the filename part of the path is modified in any way, or until the path is destroyed.</p>
 <p>See also: <a href="path.html#al_get_path_filename">al_get_path_filename</a>, <a href="path.html#al_get_path_basename">al_get_path_basename</a></p>
 <h1 id="al_set_path_drive"><a href="#al_set_path_drive">al_set_path_drive</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_path_drive(ALLEGRO_PATH *path, <span class="dt">const</span> <span class="dt">char</span> *drive)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L461">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L461">Source Code</a></p>
 <p>Set the drive string on a path. The drive may be NULL, which is equivalent to setting the drive string to the empty string.</p>
 <p>See also: <a href="path.html#al_get_path_drive">al_get_path_drive</a></p>
 <h1 id="al_append_path_component"><a href="#al_append_path_component">al_append_path_component</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_append_path_component(ALLEGRO_PATH *path, <span class="dt">const</span> <span class="dt">char</span> *s)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L330">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L330">Source Code</a></p>
 <p>Append a directory component.</p>
 <p>See also: <a href="path.html#al_insert_path_component">al_insert_path_component</a></p>
 <h1 id="al_insert_path_component"><a href="#al_insert_path_component">al_insert_path_component</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_insert_path_component(ALLEGRO_PATH *path, <span class="dt">int</span> i, <span class="dt">const</span> <span class="dt">char</span> *s)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L289">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L289">Source Code</a></p>
 <p>Insert a directory component at index i. If the index is negative then count from the right, i.e. -1 refers to the last path component.</p>
 <p>It is an error to pass an index i which is not within these bounds: 0 <= i <= al_get_path_num_components(path).</p>
 <p>See also: <a href="path.html#al_append_path_component">al_append_path_component</a>, <a href="path.html#al_replace_path_component">al_replace_path_component</a>, <a href="path.html#al_remove_path_component">al_remove_path_component</a></p>
 <h1 id="al_replace_path_component"><a href="#al_replace_path_component">al_replace_path_component</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_replace_path_component(ALLEGRO_PATH *path, <span class="dt">int</span> i, <span class="dt">const</span> <span class="dt">char</span> *s)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L255">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L255">Source Code</a></p>
 <p>Replace the i'th directory component by another string. If the index is negative then count from the right, i.e. -1 refers to the last path component. It is an error to pass an index which is out of bounds.</p>
 <p>See also: <a href="path.html#al_insert_path_component">al_insert_path_component</a>, <a href="path.html#al_remove_path_component">al_remove_path_component</a></p>
 <h1 id="al_remove_path_component"><a href="#al_remove_path_component">al_remove_path_component</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_remove_path_component(ALLEGRO_PATH *path, <span class="dt">int</span> i)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L272">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L272">Source Code</a></p>
 <p>Delete the i'th directory component. If the index is negative then count from the right, i.e. -1 refers to the last path component. It is an error to pass an index which is out of bounds.</p>
 <p>See also: <a href="path.html#al_insert_path_component">al_insert_path_component</a>, <a href="path.html#al_replace_path_component">al_replace_path_component</a>, <a href="path.html#al_drop_path_tail">al_drop_path_tail</a></p>
 <h1 id="al_drop_path_tail"><a href="#al_drop_path_tail">al_drop_path_tail</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_drop_path_tail(ALLEGRO_PATH *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L320">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L320">Source Code</a></p>
 <p>Remove the last directory component, if any.</p>
 <p>See also: <a href="path.html#al_remove_path_component">al_remove_path_component</a></p>
 <h1 id="al_set_path_filename"><a href="#al_set_path_filename">al_set_path_filename</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_path_filename(ALLEGRO_PATH *path, <span class="dt">const</span> <span class="dt">char</span> *filename)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L484">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L484">Source Code</a></p>
 <p>Set the optional filename part of the path. The filename may be NULL, which is equivalent to setting the filename to the empty string.</p>
 <p>See also: <a href="path.html#al_set_path_extension">al_set_path_extension</a>, <a href="path.html#al_get_path_filename">al_get_path_filename</a></p>
 <h1 id="al_set_path_extension"><a href="#al_set_path_extension">al_set_path_extension</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_path_extension(ALLEGRO_PATH *path, <span class="dt">char</span> <span class="dt">const</span> *extension)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L522">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L522">Source Code</a></p>
 <p>Replaces the extension of the path with the given one, i.e. replaces everything from the final dot ('.') character onwards, including the dot. If the filename of the path has no extension, the given one is appended. Usually the new extension you supply should include a leading dot.</p>
 <p>Returns false if the path contains no filename part, i.e. the filename part is the empty string.</p>
 <p>See also: <a href="path.html#al_set_path_filename">al_set_path_filename</a>, <a href="path.html#al_get_path_extension">al_get_path_extension</a></p>
 <h1 id="al_path_cstr"><a href="#al_path_cstr">al_path_cstr</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_path_cstr(<span class="dt">const</span> ALLEGRO_PATH *path, <span class="dt">char</span> delim)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L413">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L413">Source Code</a></p>
 <p>Convert a path to its string representation, i.e. optional drive, followed by directory components separated by 'delim', followed by an optional filename.</p>
 <p>To use the current native path separator, use ALLEGRO_NATIVE_PATH_SEP for 'delim'.</p>
 <p>The returned pointer is valid only until the path is modified in any way, or until the path is destroyed.</p>
 <h1 id="al_make_path_canonical"><a href="#al_make_path_canonical">al_make_path_canonical</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_make_path_canonical(ALLEGRO_PATH *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/path.c#L559">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/path.c#L559">Source Code</a></p>
 <p>Removes any leading '..' directory components in absolute paths. Removes all '.' directory components.</p>
 <p>Note that this does <em>not</em> collapse "x/../y" sections into "y". This is by design. If "/foo" on your system is a symlink to "/bar/baz", then "/foo/../quux" is actually "/bar/quux", not "/quux" as a naive removal of ".." components would give you.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:41 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:59 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/physfs.html b/docs/html/refman/physfs.html
index 9aafbeb..01372e6 100644
--- a/docs/html/refman/physfs.html
+++ b/docs/html/refman/physfs.html
@@ -128,7 +128,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_physfs.h></span></code></pre>
 <h1 id="al_set_physfs_file_interface"><a href="#al_set_physfs_file_interface">al_set_physfs_file_interface</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_physfs_file_interface(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/physfs/a5_physfs.c#L295">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/physfs/a5_physfs.c#L295">Source Code</a></p>
 <p>This function sets <em>both</em> the <a href="file.html#allegro_file_interface">ALLEGRO_FILE_INTERFACE</a> and <a href="fshook.html#allegro_fs_interface">ALLEGRO_FS_INTERFACE</a> for the calling thread.</p>
 <p>Subsequent calls to <a href="file.html#al_fopen">al_fopen</a> on the calling thread will be handled by PHYSFS_open(). Operations on the files returned by <a href="file.html#al_fopen">al_fopen</a> will then be performed through PhysicsFS. Calls to the Allegro filesystem functions, such as <a href="fshook.html#al_read_directory">al_read_directory</a> or <a href="fshook.html#al_create_fs_entry">al_create_fs_entry</a>, on the calling thread will be diverted to PhysicsFS.</p>
 <p>To remember and restore another file I/O backend, you can use <a href="state.html#al_store_state">al_store_state</a>/<a href="state.html#al_restore_state">al_restore_state</a>.</p>
@@ -141,11 +141,11 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="file.html#al_set_new_file_interface">al_set_new_file_interface</a>.</p>
 <h1 id="al_get_allegro_physfs_version"><a href="#al_get_allegro_physfs_version">al_get_allegro_physfs_version</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_physfs_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/physfs/a5_physfs.c#L304">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/physfs/a5_physfs.c#L304">Source Code</a></p>
 <p>Returns the (compiled) version of the addon, in the same format as <a href="system.html#al_get_allegro_version">al_get_allegro_version</a>.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:45 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:02 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/platform.html b/docs/html/refman/platform.html
index 62f4bbc..65fd25e 100644
--- a/docs/html/refman/platform.html
+++ b/docs/html/refman/platform.html
@@ -134,6 +134,8 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <li><a href="#al_android_set_apk_file_interface">al_android_set_apk_file_interface</a></li>
 <li><a href="#al_android_set_apk_fs_interface">al_android_set_apk_fs_interface</a></li>
 <li><a href="#al_android_get_os_version">al_android_get_os_version</a></li>
+<li><a href="#al_android_get_jni_env">al_android_get_jni_env</a></li>
+<li><a href="#al_android_get_activity">al_android_get_activity</a></li>
 </ul></li>
 <li><a href="#x11">X11</a><ul>
 <li><a href="#al_get_x_window_id">al_get_x_window_id</a></li>
@@ -145,13 +147,13 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_windows.h></span></code></pre>
 <h2 id="al_get_win_window_handle"><a href="#al_get_win_window_handle">al_get_win_window_handle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">HWND al_get_win_window_handle(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/wwindow.c#L1315">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/wwindow.c#L1337">Source Code</a></p>
 <p>Returns the handle to the window that the passed display is using.</p>
 <h2 id="al_win_add_window_callback"><a href="#al_win_add_window_callback">al_win_add_window_callback</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_win_add_window_callback(ALLEGRO_DISPLAY *display,
    bool (*callback)(ALLEGRO_DISPLAY *display, UINT message, WPARAM wparam,
    LPARAM lparam, LRESULT *result, <span class="dt">void</span> *userdata), <span class="dt">void</span> *userdata)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/wwindow.c#L1343">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/wwindow.c#L1365">Source Code</a></p>
 <p>The specified callback function will intercept the window's message before Allegro processes it. If the callback function consumes the event, then it should return true. In that case, Allegro will not do anything with the event.</p>
 <p>Optionally, you may use <code>result</code> to customize what Allegro will return return in response to this event. By default, Allegro returns <code>TRUE</code>.</p>
 <p>The <code>userdata</code> pointer can be used to supply additional context to the callback function.</p>
@@ -162,7 +164,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c">bool al_win_remove_window_callback(ALLEGRO_DISPLAY *display,
    bool (*callback)(ALLEGRO_DISPLAY *display, UINT message, WPARAM wparam,
    LPARAM lparam, LRESULT *result, <span class="dt">void</span> *userdata), <span class="dt">void</span> *userdata)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/win/wwindow.c#L1372">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/win/wwindow.c#L1394">Source Code</a></p>
 <p>Removes the callback that was previously registered with <a href="platform.html#al_win_add_window_callback">al_win_add_window_callback</a>. The <code>userdata</code> pointer must be the same as what was used during the registration of the callback.</p>
 <p>Returns true if the callback was removed.</p>
 <p>Since: 5.1.2</p>
@@ -171,7 +173,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_osx.h></span></code></pre>
 <h2 id="al_osx_get_window"><a href="#al_osx_get_window">al_osx_get_window</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">NSWindow* al_osx_get_window(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/macosx/osxgl.m#L2352">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/macosx/osxgl.m#L2362">Source Code</a></p>
 <p>Retrieves the NSWindow handle associated with the Allegro display.</p>
 <p>Since: 5.0.8, 5.1.3</p>
 <h1 id="iphone"><a href="#iphone">iPhone</a></h1>
@@ -179,7 +181,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_iphone.h></span></code></pre>
 <h2 id="al_iphone_set_statusbar_orientation"><a href="#al_iphone_set_statusbar_orientation">al_iphone_set_statusbar_orientation</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_iphone_set_statusbar_orientation(<span class="dt">int</span> o)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/iphone/allegroAppDelegate.m#L216">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/iphone/allegroAppDelegate.m#L216">Source Code</a></p>
 <p>Sets the orientation of the status bar, which can be one of the following:</p>
 <ul>
 <li>ALLEGRO_IPHONE_STATUSBAR_ORIENTATION_PORTRAIT</li>
@@ -190,12 +192,12 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Since: 5.1.0</p>
 <h2 id="al_iphone_get_view"><a href="#al_iphone_get_view">al_iphone_get_view</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">UIView *al_iphone_get_view(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/iphone/allegroAppDelegate.m#L158">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/iphone/allegroAppDelegate.m#L158">Source Code</a></p>
 <p>Retrieves the UIView* (EAGLView*) associated with the Allegro display.</p>
 <p>Since: 5.1.0</p>
 <h2 id="al_iphone_get_window"><a href="#al_iphone_get_window">al_iphone_get_window</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">UIWindow *al_iphone_get_window(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/iphone/allegroAppDelegate.m#L144">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/iphone/allegroAppDelegate.m#L144">Source Code</a></p>
 <p>Retrieves the UIWindow* associated with the Allegro display.</p>
 <p>Since: 5.1.0</p>
 <h1 id="android"><a href="#android">Android</a></h1>
@@ -203,7 +205,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_android.h></span></code></pre>
 <h2 id="al_android_set_apk_file_interface"><a href="#al_android_set_apk_file_interface">al_android_set_apk_file_interface</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_android_set_apk_file_interface(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/android/android_apk_file.c#L306">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/android/android_apk_file.c#L306">Source Code</a></p>
 <p>This function will set up a custom <a href="file.html#allegro_file_interface">ALLEGRO_FILE_INTERFACE</a> that makes all future calls of <a href="file.html#al_fopen">al_fopen</a> read from the applicatons's APK file.</p>
 <blockquote>
 <p><em>Note:</em> Currently, access to the APK file after calling this function is read only.</p>
@@ -211,7 +213,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Since: 5.1.2</p>
 <h2 id="al_android_set_apk_fs_interface"><a href="#al_android_set_apk_fs_interface">al_android_set_apk_fs_interface</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_android_set_apk_fs_interface(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/android/android_apk_fs.c#L303">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/android/android_apk_fs.c#L303">Source Code</a></p>
 <p>This function will set up a custom <a href="fshook.html#allegro_fs_interface">ALLEGRO_FS_INTERFACE</a> which allows working within the APK filesystem. The filesystem root is your assets directory and there is read-only access to all files within.</p>
 <blockquote>
 <p><em>Note:</em> Some things like querying file size or attributes are not supported by this. You can always use the PhysFS addon to open the APK file (it is just a regular .zip file) and get more complete information.</p>
@@ -219,20 +221,44 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Since: 5.1.13</p>
 <h2 id="al_android_get_os_version"><a href="#al_android_get_os_version">al_android_get_os_version</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_android_get_os_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/android/android_system.c#L599">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/android/android_system.c#L600">Source Code</a></p>
 <p>Returns a pointer to a static buffer that contains the version string of the Android platform that the calling Allegro program is running on.</p>
 <p>Since: 5.1.2</p>
+<h2 id="al_android_get_jni_env"><a href="#al_android_get_jni_env">al_android_get_jni_env</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c">JNIEnv *al_android_get_jni_env(<span class="dt">void</span>)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/android/android_system.c#L653">Source Code</a></p>
+<p>Returns the Android JNI environment used by Allegro to call into Java. As a convenience this function provides it to the user so there is no need to obtain it yourself.</p>
+<p>For example if you have a Java method "void send(String message)" in your activity class, you could call it like this from C code:</p>
+<pre class="sourceCode c"><code class="sourceCode c">JNIEnv * env = al_android_get_jni_env();
+jclass class_id = (* env)->GetObjectClass(env, al_android_get_activity());
+jmethodID method_id = (* env)->GetMethodID(env, class_id, <span class="st">"send"</span>,
+    <span class="st">"(Ljava/lang/String;)V"</span>);
+jstring jdata = (* env)->NewStringUTF(env, <span class="st">"Hello Java!"</span>);
+(* env)->CallVoidMethod(env, al_android_get_activity(), method_id, jdata);
+(* env)->DeleteLocalRef(env, jdata);</code></pre>
+<p>Since: 5.2.2</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This API is new and subject to refinement.</p>
+</blockquote>
+<h2 id="al_android_get_activity"><a href="#al_android_get_activity">al_android_get_activity</a></h2>
+<pre class="sourceCode c"><code class="sourceCode c">jobject al_android_get_activity(<span class="dt">void</span>)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/android/android_system.c#L660">Source Code</a></p>
+<p>Returns the Java Android activity used by Allegro. This is the same object created by Android from the class you specify in your manifest and either an instance of AllegroActivity or a derived class.</p>
+<p>Since: 5.2.2</p>
+<blockquote>
+<p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> This API is new and subject to refinement.</p>
+</blockquote>
 <h1 id="x11"><a href="#x11">X11</a></h1>
 <p>These functions are declared in the following header file:</p>
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro_x.h></span></code></pre>
 <h2 id="al_get_x_window_id"><a href="#al_get_x_window_id">al_get_x_window_id</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">XID al_get_x_window_id(ALLEGRO_DISPLAY *display)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/x/xwindow.c#L396">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/x/xwindow.c#L396">Source Code</a></p>
 <p>Retrieves the XID associated with the Allegro display.</p>
 <p>Since: 5.1.12</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:42 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:00 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/primitives.html b/docs/html/refman/primitives.html
index d3c26b6..40c79bf 100644
--- a/docs/html/refman/primitives.html
+++ b/docs/html/refman/primitives.html
@@ -200,17 +200,17 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="general"><a href="#general">General</a></h1>
 <h2 id="al_get_allegro_primitives_version"><a href="#al_get_allegro_primitives_version">al_get_allegro_primitives_version</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_primitives_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L151">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L151">Source Code</a></p>
 <p>Returns the (compiled) version of the addon, in the same format as <a href="system.html#al_get_allegro_version">al_get_allegro_version</a>.</p>
 <h2 id="al_init_primitives_addon"><a href="#al_init_primitives_addon">al_init_primitives_addon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_init_primitives_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L46">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L46">Source Code</a></p>
 <p>Initializes the primitives addon.</p>
 <p><em>Returns:</em> True on success, false on failure.</p>
 <p>See also: <a href="primitives.html#al_shutdown_primitives_addon">al_shutdown_primitives_addon</a></p>
 <h2 id="al_shutdown_primitives_addon"><a href="#al_shutdown_primitives_addon">al_shutdown_primitives_addon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_shutdown_primitives_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L60">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L60">Source Code</a></p>
 <p>Shut down the primitives addon. This is done automatically at program exit, but can be called any time the user wishes as well.</p>
 <p>See also: <a href="primitives.html#al_init_primitives_addon">al_init_primitives_addon</a></p>
 <h1 id="high-level-drawing-routines"><a href="#high-level-drawing-routines">High level drawing routines</a></h1>
@@ -241,7 +241,7 @@ al_draw_rectangle(<span class="fl">2.5</span>, <span class="fl">3.5</span>, <spa
 <h2 id="al_draw_line"><a href="#al_draw_line">al_draw_line</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_line(<span class="dt">float</span> x1, <span class="dt">float</span> y1, <span class="dt">float</span> x2, <span class="dt">float</span> y2,
    ALLEGRO_COLOR color, <span class="dt">float</span> thickness)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L77">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L77">Source Code</a></p>
 <p>Draws a line segment between two points.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -253,7 +253,7 @@ al_draw_rectangle(<span class="fl">2.5</span>, <span class="fl">3.5</span>, <spa
 <h2 id="al_draw_triangle"><a href="#al_draw_triangle">al_draw_triangle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_triangle(<span class="dt">float</span> x1, <span class="dt">float</span> y1, <span class="dt">float</span> x2, <span class="dt">float</span> y2,
    <span class="dt">float</span> x3, <span class="dt">float</span> y3, ALLEGRO_COLOR color, <span class="dt">float</span> thickness)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L122">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L122">Source Code</a></p>
 <p>Draws an outlined triangle.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -265,7 +265,7 @@ al_draw_rectangle(<span class="fl">2.5</span>, <span class="fl">3.5</span>, <spa
 <h2 id="al_draw_filled_triangle"><a href="#al_draw_filled_triangle">al_draw_filled_triangle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_filled_triangle(<span class="dt">float</span> x1, <span class="dt">float</span> y1, <span class="dt">float</span> x2, <span class="dt">float</span> y2,
    <span class="dt">float</span> x3, <span class="dt">float</span> y3, ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L335">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L335">Source Code</a></p>
 <p>Draws a filled triangle.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -276,7 +276,7 @@ al_draw_rectangle(<span class="fl">2.5</span>, <span class="fl">3.5</span>, <spa
 <h2 id="al_draw_rectangle"><a href="#al_draw_rectangle">al_draw_rectangle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_rectangle(<span class="dt">float</span> x1, <span class="dt">float</span> y1, <span class="dt">float</span> x2, <span class="dt">float</span> y2,
    ALLEGRO_COLOR color, <span class="dt">float</span> thickness)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L357">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L357">Source Code</a></p>
 <p>Draws an outlined rectangle.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -288,7 +288,7 @@ al_draw_rectangle(<span class="fl">2.5</span>, <span class="fl">3.5</span>, <spa
 <h2 id="al_draw_filled_rectangle"><a href="#al_draw_filled_rectangle">al_draw_filled_rectangle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_filled_rectangle(<span class="dt">float</span> x1, <span class="dt">float</span> y1, <span class="dt">float</span> x2, <span class="dt">float</span> y2,
    ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L402">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L402">Source Code</a></p>
 <p>Draws a filled rectangle.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -299,7 +299,7 @@ al_draw_rectangle(<span class="fl">2.5</span>, <span class="fl">3.5</span>, <spa
 <h2 id="al_draw_rounded_rectangle"><a href="#al_draw_rounded_rectangle">al_draw_rounded_rectangle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_rounded_rectangle(<span class="dt">float</span> x1, <span class="dt">float</span> y1, <span class="dt">float</span> x2, <span class="dt">float</span> y2,
    <span class="dt">float</span> rx, <span class="dt">float</span> ry, ALLEGRO_COLOR color, <span class="dt">float</span> thickness)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L851">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L851">Source Code</a></p>
 <p>Draws an outlined rounded rectangle.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -312,7 +312,7 @@ al_draw_rectangle(<span class="fl">2.5</span>, <span class="fl">3.5</span>, <spa
 <h2 id="al_draw_filled_rounded_rectangle"><a href="#al_draw_filled_rounded_rectangle">al_draw_filled_rounded_rectangle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_filled_rounded_rectangle(<span class="dt">float</span> x1, <span class="dt">float</span> y1, <span class="dt">float</span> x2, <span class="dt">float</span> y2,
    <span class="dt">float</span> rx, <span class="dt">float</span> ry, ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L949">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L949">Source Code</a></p>
 <p>Draws an filled rounded rectangle.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -325,7 +325,7 @@ al_draw_rectangle(<span class="fl">2.5</span>, <span class="fl">3.5</span>, <spa
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_calculate_arc(<span class="dt">float</span>* dest, <span class="dt">int</span> stride, <span class="dt">float</span> cx, <span class="dt">float</span> cy,
    <span class="dt">float</span> rx, <span class="dt">float</span> ry, <span class="dt">float</span> start_theta, <span class="dt">float</span> delta_theta, <span class="dt">float</span> thickness,
    <span class="dt">int</span> num_points)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L423">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L423">Source Code</a></p>
 <p>When <code>thickness <= 0</code> this function computes positions of <code>num_points</code> regularly spaced points on an elliptical arc. When <code>thickness > 0</code> this function computes two sets of points, obtained as follows: the first set is obtained by taking the points computed in the <code>thickness <= 0</code> case and shifting them by <code>thickness / 2</code> outward, in a direction perpendicular to the arc curve. The second set is the same, but shifted <code [...]
 <p>The destination buffer <code>dest</code> is interpreted as a set of regularly spaced pairs of floats, each pair holding the coordinates of the corresponding point on the arc. The two floats in the pair are adjacent, and the distance (in bytes) between the addresses of the first float in two successive pairs is <code>stride</code>. For example, if you have a tightly packed array of floats with no spaces between pairs, then <code>stride</code> will be exactly <code>2 * sizeof(float)</co [...]
 <p>Example with <code>thickness <= 0</code>:</p>
@@ -367,7 +367,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <h2 id="al_draw_pieslice"><a href="#al_draw_pieslice">al_draw_pieslice</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_pieslice(<span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> r, <span class="dt">float</span> start_theta,
    <span class="dt">float</span> delta_theta, ALLEGRO_COLOR color, <span class="dt">float</span> thickness)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L504">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L504">Source Code</a></p>
 <p>Draws a pieslice (outlined circular sector).</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -383,7 +383,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <h2 id="al_draw_filled_pieslice"><a href="#al_draw_filled_pieslice">al_draw_filled_pieslice</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_filled_pieslice(<span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> r, <span class="dt">float</span> start_theta,
    <span class="dt">float</span> delta_theta, ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L660">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L660">Source Code</a></p>
 <p>Draws a filled pieslice (filled circular sector).</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -398,7 +398,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <h2 id="al_draw_ellipse"><a href="#al_draw_ellipse">al_draw_ellipse</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_ellipse(<span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> rx, <span class="dt">float</span> ry,
    ALLEGRO_COLOR color, <span class="dt">float</span> thickness)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L691">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L691">Source Code</a></p>
 <p>Draws an outlined ellipse.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -411,7 +411,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <h2 id="al_draw_filled_ellipse"><a href="#al_draw_filled_ellipse">al_draw_filled_ellipse</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_filled_ellipse(<span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> rx, <span class="dt">float</span> ry,
    ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L743">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L743">Source Code</a></p>
 <p>Draws a filled ellipse.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -423,7 +423,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <h2 id="al_draw_circle"><a href="#al_draw_circle">al_draw_circle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_circle(<span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> r, ALLEGRO_COLOR color,
    <span class="dt">float</span> thickness)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L778">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L778">Source Code</a></p>
 <p>Draws an outlined circle.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -435,7 +435,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <p>See also: <a href="primitives.html#al_draw_filled_circle">al_draw_filled_circle</a>, <a href="primitives.html#al_draw_ellipse">al_draw_ellipse</a></p>
 <h2 id="al_draw_filled_circle"><a href="#al_draw_filled_circle">al_draw_filled_circle</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_filled_circle(<span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> r, ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L786">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L786">Source Code</a></p>
 <p>Draws a filled circle.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -447,7 +447,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <h2 id="al_draw_arc"><a href="#al_draw_arc">al_draw_arc</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_arc(<span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> r, <span class="dt">float</span> start_theta,
    <span class="dt">float</span> delta_theta, ALLEGRO_COLOR color, <span class="dt">float</span> thickness)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L843">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L843">Source Code</a></p>
 <p>Draws an arc.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -462,7 +462,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <h2 id="al_draw_elliptical_arc"><a href="#al_draw_elliptical_arc">al_draw_elliptical_arc</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_elliptical_arc(<span class="dt">float</span> cx, <span class="dt">float</span> cy, <span class="dt">float</span> rx, <span class="dt">float</span> ry, <span class="dt">float</span> start_theta,
    <span class="dt">float</span> delta_theta, ALLEGRO_COLOR color, <span class="dt">float</span> thickness)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L793">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L793">Source Code</a></p>
 <p>Draws an elliptical arc.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -478,7 +478,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <h2 id="al_calculate_spline"><a href="#al_calculate_spline">al_calculate_spline</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_calculate_spline(<span class="dt">float</span>* dest, <span class="dt">int</span> stride, <span class="dt">float</span> points[<span class="dv">8</span>],
    <span class="dt">float</span> thickness, <span class="dt">int</span> num_segments)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L1000">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L1000">Source Code</a></p>
 <p>Calculates a Bézier spline given 4 control points. If <code>thickness <= 0</code>, then <code>num_segments</code> of points are required in the destination, otherwise twice as many are needed. The destination buffer should consist of regularly spaced (by distance of stride bytes) doublets of floats, corresponding to x and y coordinates of the vertices.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -491,7 +491,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <p>See also: <a href="primitives.html#al_draw_spline">al_draw_spline</a>, <a href="primitives.html#al_calculate_arc">al_calculate_arc</a>, <a href="primitives.html#al_calculate_ribbon">al_calculate_ribbon</a></p>
 <h2 id="al_draw_spline"><a href="#al_draw_spline">al_draw_spline</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_spline(<span class="dt">float</span> points[<span class="dv">8</span>], ALLEGRO_COLOR color, <span class="dt">float</span> thickness)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L1079">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L1079">Source Code</a></p>
 <p>Draws a Bézier spline given 4 control points.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -503,7 +503,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <h2 id="al_calculate_ribbon"><a href="#al_calculate_ribbon">al_calculate_ribbon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_calculate_ribbon(<span class="dt">float</span>* dest, <span class="dt">int</span> dest_stride, <span class="dt">const</span> <span class="dt">float</span> *points,
    <span class="dt">int</span> points_stride, <span class="dt">float</span> thickness, <span class="dt">int</span> num_segments)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L1123">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L1123">Source Code</a></p>
 <p>Calculates a ribbon given an array of points. The ribbon will go through all of the passed points. If <code>thickness <= 0</code>, then <code>num_segments</code> of points are required in the destination buffer, otherwise twice as many are needed. The destination and the points buffer should consist of regularly spaced doublets of floats, corresponding to x and y coordinates of the vertices.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -518,7 +518,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <h2 id="al_draw_ribbon"><a href="#al_draw_ribbon">al_draw_ribbon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_ribbon(<span class="dt">const</span> <span class="dt">float</span> *points, <span class="dt">int</span> points_stride, ALLEGRO_COLOR color,
    <span class="dt">float</span> thickness, <span class="dt">int</span> num_segments)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/high_primitives.c#L1245">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/high_primitives.c#L1245">Source Code</a></p>
 <p>Draws a ribbon given an array of points. The ribbon will go through all of the passed points. The points buffer should consist of regularly spaced doublets of floats, corresponding to x and y coordinates of the vertices.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -538,7 +538,7 @@ assert((<span class="dt">int</span>)points[(num_points - <span class="dv">1</spa
 <h2 id="al_draw_prim"><a href="#al_draw_prim">al_draw_prim</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_draw_prim(<span class="dt">const</span> <span class="dt">void</span>* vtxs, <span class="dt">const</span> ALLEGRO_VERTEX_DECL* decl,
    ALLEGRO_BITMAP* texture, <span class="dt">int</span> start, <span class="dt">int</span> end, <span class="dt">int</span> type)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L68">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L68">Source Code</a></p>
 <p>Draws a subset of the passed vertex array.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -561,7 +561,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <h2 id="al_draw_indexed_prim"><a href="#al_draw_indexed_prim">al_draw_indexed_prim</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_draw_indexed_prim(<span class="dt">const</span> <span class="dt">void</span>* vtxs, <span class="dt">const</span> ALLEGRO_VERTEX_DECL* decl,
    ALLEGRO_BITMAP* texture, <span class="dt">const</span> <span class="dt">int</span>* indices, <span class="dt">int</span> num_vtx, <span class="dt">int</span> type)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L104">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L104">Source Code</a></p>
 <p>Draws a subset of the passed vertex array. This function uses an index array to specify which vertices to use.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -577,7 +577,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <h2 id="al_draw_vertex_buffer"><a href="#al_draw_vertex_buffer">al_draw_vertex_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_draw_vertex_buffer(ALLEGRO_VERTEX_BUFFER* vertex_buffer,
    ALLEGRO_BITMAP* texture, <span class="dt">int</span> start, <span class="dt">int</span> end, <span class="dt">int</span> type)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L501">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L501">Source Code</a></p>
 <p>Draws a subset of the passed vertex buffer. The vertex buffer must not be locked. Additionally, to draw onto memory bitmaps or with memory bitmap textures the vertex buffer must support reading (i.e. it must be created with the <code>ALLEGRO_PRIM_BUFFER_READWRITE</code>).</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -594,7 +594,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_draw_indexed_buffer(ALLEGRO_VERTEX_BUFFER* vertex_buffer,
    ALLEGRO_BITMAP* texture, ALLEGRO_INDEX_BUFFER* index_buffer,
    <span class="dt">int</span> start, <span class="dt">int</span> end, <span class="dt">int</span> type)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L536">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L536">Source Code</a></p>
 <p>Draws a subset of the passed vertex buffer. This function uses an index buffer to specify which vertices to use. Both buffers must not be locked. Additionally, to draw onto memory bitmaps or with memory bitmap textures both buffers must support reading (i.e. they must be created with the <code>ALLEGRO_PRIM_BUFFER_READWRITE</code>).</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -615,7 +615,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
    <span class="dt">void</span> (*first)(uintptr_t, <span class="dt">int</span>, <span class="dt">int</span>, <span class="dt">int</span>, <span class="dt">int</span>),
    <span class="dt">void</span> (*step)(uintptr_t, <span class="dt">int</span>),
    <span class="dt">void</span> (*draw)(uintptr_t, <span class="dt">int</span>, <span class="dt">int</span>, <span class="dt">int</span>))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/prim_soft.c#L522">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/prim_soft.c#L522">Source Code</a></p>
 <p>Draws a triangle using the software rasterizer and user supplied pixel functions. For help in understanding what these functions do, see the implementation of the various shading routines in addons/primitives/tri_soft.c. The triangle is drawn in two segments, from top to bottom. The segments are deliniated by the vertically middle vertex of the triangle. One of the two segments may be absent if two vertices are horizontally collinear.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -632,7 +632,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
    <span class="dt">void</span> (*first)(uintptr_t, <span class="dt">int</span>, <span class="dt">int</span>, ALLEGRO_VERTEX*, ALLEGRO_VERTEX*),
    <span class="dt">void</span> (*step)(uintptr_t, <span class="dt">int</span>),
    <span class="dt">void</span> (*draw)(uintptr_t, <span class="dt">int</span>, <span class="dt">int</span>))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/line_soft.c#L572">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/line_soft.c#L572">Source Code</a></p>
 <p>Draws a line using the software rasterizer and user supplied pixel functions. For help in understanding what these functions do, see the implementation of the various shading routines in addons/primitives/line_soft.c. The line is drawn top to bottom.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -646,7 +646,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <h1 id="custom-vertex-declaration-routines"><a href="#custom-vertex-declaration-routines">Custom vertex declaration routines</a></h1>
 <h2 id="al_create_vertex_decl"><a href="#al_create_vertex_decl">al_create_vertex_decl</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_VERTEX_DECL* al_create_vertex_decl(<span class="dt">const</span> ALLEGRO_VERTEX_ELEMENT* elements, <span class="dt">int</span> stride)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L158">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L158">Source Code</a></p>
 <p>Creates a vertex declaration, which describes a custom vertex format.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -657,7 +657,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <p>See also: <a href="primitives.html#allegro_vertex_element">ALLEGRO_VERTEX_ELEMENT</a>, <a href="primitives.html#allegro_vertex_decl">ALLEGRO_VERTEX_DECL</a>, <a href="primitives.html#al_destroy_vertex_decl">al_destroy_vertex_decl</a></p>
 <h2 id="al_destroy_vertex_decl"><a href="#al_destroy_vertex_decl">al_destroy_vertex_decl</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_vertex_decl(ALLEGRO_VERTEX_DECL* decl)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L218">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L218">Source Code</a></p>
 <p>Destroys a vertex declaration.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -668,7 +668,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <h2 id="al_create_vertex_buffer"><a href="#al_create_vertex_buffer">al_create_vertex_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_VERTEX_BUFFER* al_create_vertex_buffer(ALLEGRO_VERTEX_DECL* decl,
    <span class="dt">const</span> <span class="dt">void</span>* initial_data, <span class="dt">int</span> num_vertices, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L229">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L229">Source Code</a></p>
 <p>Creates a vertex buffer. Can return NULL if the buffer could not be created (e.g. the system only supports write-only buffers).</p>
 <blockquote>
 <p><em>Note:</em></p>
@@ -685,14 +685,14 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <p>See also: <a href="primitives.html#allegro_vertex_buffer">ALLEGRO_VERTEX_BUFFER</a>, <a href="primitives.html#al_destroy_vertex_buffer">al_destroy_vertex_buffer</a></p>
 <h2 id="al_destroy_vertex_buffer"><a href="#al_destroy_vertex_buffer">al_destroy_vertex_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_vertex_buffer(ALLEGRO_VERTEX_BUFFER* buffer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L303">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L303">Source Code</a></p>
 <p>Destroys a vertex buffer. Does nothing if passed NULL.</p>
 <p>Since: 5.1.3</p>
 <p>See also: <a href="primitives.html#allegro_vertex_buffer">ALLEGRO_VERTEX_BUFFER</a>, <a href="primitives.html#al_create_vertex_buffer">al_create_vertex_buffer</a></p>
 <h2 id="al_lock_vertex_buffer"><a href="#al_lock_vertex_buffer">al_lock_vertex_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span>* al_lock_vertex_buffer(ALLEGRO_VERTEX_BUFFER* buffer, <span class="dt">int</span> offset,
    <span class="dt">int</span> length, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L360">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L360">Source Code</a></p>
 <p>Locks a vertex buffer so you can access its data. Will return NULL if the parameters are invalid, if reading is requested from a write only buffer, or if the buffer is already locked.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -705,13 +705,13 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <p>See also: <a href="primitives.html#allegro_vertex_buffer">ALLEGRO_VERTEX_BUFFER</a>, <a href="primitives.html#al_unlock_vertex_buffer">al_unlock_vertex_buffer</a></p>
 <h2 id="al_unlock_vertex_buffer"><a href="#al_unlock_vertex_buffer">al_unlock_vertex_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_unlock_vertex_buffer(ALLEGRO_VERTEX_BUFFER* buffer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L415">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L415">Source Code</a></p>
 <p>Unlocks a previously locked vertex buffer.</p>
 <p>Since: 5.1.3</p>
 <p>See also: <a href="primitives.html#allegro_vertex_buffer">ALLEGRO_VERTEX_BUFFER</a>, <a href="primitives.html#al_lock_vertex_buffer">al_lock_vertex_buffer</a></p>
 <h2 id="al_get_vertex_buffer_size"><a href="#al_get_vertex_buffer_size">al_get_vertex_buffer_size</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_vertex_buffer_size(ALLEGRO_VERTEX_BUFFER* buffer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L574">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L574">Source Code</a></p>
 <p>Returns the size of the vertex buffer</p>
 <p>Since: 5.1.8</p>
 <p>See also: <a href="primitives.html#allegro_vertex_buffer">ALLEGRO_VERTEX_BUFFER</a></p>
@@ -719,7 +719,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <h2 id="al_create_index_buffer"><a href="#al_create_index_buffer">al_create_index_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_INDEX_BUFFER* al_create_index_buffer(<span class="dt">int</span> index_size,
     <span class="dt">const</span> <span class="dt">void</span>* initial_data, <span class="dt">int</span> num_indices, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L263">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L263">Source Code</a></p>
 <p>Creates a index buffer. Can return NULL if the buffer could not be created (e.g. the system only supports write-only buffers).</p>
 <blockquote>
 <p><em>Note:</em></p>
@@ -736,14 +736,14 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <p>See also: <a href="primitives.html#allegro_index_buffer">ALLEGRO_INDEX_BUFFER</a>, <a href="primitives.html#al_destroy_index_buffer">al_destroy_index_buffer</a></p>
 <h2 id="al_destroy_index_buffer"><a href="#al_destroy_index_buffer">al_destroy_index_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_index_buffer(ALLEGRO_INDEX_BUFFER* buffer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L325">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L325">Source Code</a></p>
 <p>Destroys a index buffer. Does nothing if passed NULL.</p>
 <p>Since: 5.1.8</p>
 <p>See also: <a href="primitives.html#allegro_index_buffer">ALLEGRO_INDEX_BUFFER</a>, <a href="primitives.html#al_create_index_buffer">al_create_index_buffer</a></p>
 <h2 id="al_lock_index_buffer"><a href="#al_lock_index_buffer">al_lock_index_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span>* al_lock_index_buffer(ALLEGRO_INDEX_BUFFER* buffer, <span class="dt">int</span> offset,
     <span class="dt">int</span> length, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L389">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L389">Source Code</a></p>
 <p>Locks a index buffer so you can access its data. Will return NULL if the parameters are invalid, if reading is requested from a write only buffer and if the buffer is already locked.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -756,13 +756,13 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <p>See also: <a href="primitives.html#allegro_index_buffer">ALLEGRO_INDEX_BUFFER</a>, <a href="primitives.html#al_unlock_index_buffer">al_unlock_index_buffer</a></p>
 <h2 id="al_unlock_index_buffer"><a href="#al_unlock_index_buffer">al_unlock_index_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_unlock_index_buffer(ALLEGRO_INDEX_BUFFER* buffer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L436">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L436">Source Code</a></p>
 <p>Unlocks a previously locked index buffer.</p>
 <p>Since: 5.1.8</p>
 <p>See also: <a href="primitives.html#allegro_index_buffer">ALLEGRO_INDEX_BUFFER</a>, <a href="primitives.html#al_lock_index_buffer">al_lock_index_buffer</a></p>
 <h2 id="al_get_index_buffer_size"><a href="#al_get_index_buffer_size">al_get_index_buffer_size</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_index_buffer_size(ALLEGRO_INDEX_BUFFER* buffer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/primitives.c#L582">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/primitives.c#L582">Source Code</a></p>
 <p>Returns the size of the index buffer</p>
 <p>Since: 5.1.8</p>
 <p>See also: <a href="primitives.html#allegro_index_buffer">ALLEGRO_INDEX_BUFFER</a></p>
@@ -771,7 +771,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_polyline(<span class="dt">const</span> <span class="dt">float</span>* vertices, <span class="dt">int</span> vertex_stride,
    <span class="dt">int</span> vertex_count, <span class="dt">int</span> join_style, <span class="dt">int</span> cap_style,
    ALLEGRO_COLOR color, <span class="dt">float</span> thickness, <span class="dt">float</span> miter_limit)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/polyline.c#L537">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/polyline.c#L537">Source Code</a></p>
 <p>Draw a series of line segments.</p>
 <ul>
 <li>vertices - Interleaved array of (x, y) vertex coordinates</li>
@@ -801,7 +801,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <h2 id="al_draw_polygon"><a href="#al_draw_polygon">al_draw_polygon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_polygon(<span class="dt">const</span> <span class="dt">float</span> *vertices, <span class="dt">int</span> vertex_count,
    <span class="dt">int</span> join_style, ALLEGRO_COLOR color, <span class="dt">float</span> thickness, <span class="dt">float</span> miter_limit)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/polygon.c#L44">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/polygon.c#L44">Source Code</a></p>
 <p>Draw an unfilled polygon. This is the same as passing <code>ALLEGRO_LINE_CAP_CLOSED</code> to <a href="primitives.html#al_draw_polyline">al_draw_polyline</a>.</p>
 <ul>
 <li>vertex - Interleaved array of (x, y) vertex coordinates</li>
@@ -816,7 +816,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <h2 id="al_draw_filled_polygon"><a href="#al_draw_filled_polygon">al_draw_filled_polygon</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_filled_polygon(<span class="dt">const</span> <span class="dt">float</span> *vertices, <span class="dt">int</span> vertex_count,
    ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/polygon.c#L53">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/polygon.c#L53">Source Code</a></p>
 <p>Draw a filled, simple polygon. Simple means it does not have to be convex but must not be self-overlapping.</p>
 <ul>
 <li>vertices - Interleaved array of (x, y) vertex coordinates</li>
@@ -829,7 +829,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <h2 id="al_draw_filled_polygon_with_holes"><a href="#al_draw_filled_polygon_with_holes">al_draw_filled_polygon_with_holes</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_draw_filled_polygon_with_holes(<span class="dt">const</span> <span class="dt">float</span> *vertices,
    <span class="dt">const</span> <span class="dt">int</span> *vertex_counts, ALLEGRO_COLOR color)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/polygon.c#L71">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/polygon.c#L71">Source Code</a></p>
 <p>Draws a filled simple polygon with zero or more other simple polygons subtracted from it - the holes. The holes cannot touch or intersect with the outline of the filled polygon.</p>
 <ul>
 <li>vertices - Interleaved array of (x, y) vertex coordinates for each of the polygons, including holes.</li>
@@ -859,7 +859,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <pre class="sourceCode c"><code class="sourceCode c">bool al_triangulate_polygon(
    <span class="dt">const</span> <span class="dt">float</span>* vertices, size_t vertex_stride, <span class="dt">const</span> <span class="dt">int</span>* vertex_counts,
    <span class="dt">void</span> (*emit_triangle)(<span class="dt">int</span>, <span class="dt">int</span>, <span class="dt">int</span>, <span class="dt">void</span>*), <span class="dt">void</span>* userdata)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/triangulator.c#L814">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/triangulator.c#L814">Source Code</a></p>
 <p>Divides a simple polygon into triangles, with zero or more other simple polygons subtracted from it - the holes. The holes cannot touch or intersect with the outline of the main polygon. Simple means the polygon does not have to be convex but must not be self-overlapping.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -874,7 +874,7 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <h1 id="structures-and-types"><a href="#structures-and-types">Structures and types</a></h1>
 <h2 id="allegro_vertex"><a href="#allegro_vertex">ALLEGRO_VERTEX</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_VERTEX ALLEGRO_VERTEX;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L145">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L145">Source Code</a></p>
 <p>Defines the generic vertex type, with a 3D position, color and texture coordinates for a single texture. Note that at this time, the software driver for this addon cannot render 3D primitives. If you want a 2D only primitive, set z to 0. Note that you must initialize all members of this struct when you're using it. One exception to this rule are the u and v variables which can be left uninitialized when you are not using textures.</p>
 <p><em>Fields:</em></p>
 <ul>
@@ -885,12 +885,12 @@ al_draw_prim(v, NULL, texture, <span class="dv">0</span>, <span class="dv">3</sp
 <p>See also: <a href="primitives.html#allegro_prim_attr">ALLEGRO_PRIM_ATTR</a></p>
 <h2 id="allegro_vertex_decl"><a href="#allegro_vertex_decl">ALLEGRO_VERTEX_DECL</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_VERTEX_DECL ALLEGRO_VERTEX_DECL;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L137">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L137">Source Code</a></p>
 <p>A vertex declaration. This opaque structure is responsible for describing the format and layout of a user defined custom vertex. It is created and destroyed by specialized functions.</p>
 <p>See also: <a href="primitives.html#al_create_vertex_decl">al_create_vertex_decl</a>, <a href="primitives.html#al_destroy_vertex_decl">al_destroy_vertex_decl</a>, <a href="primitives.html#allegro_vertex_element">ALLEGRO_VERTEX_ELEMENT</a></p>
 <h2 id="allegro_vertex_element"><a href="#allegro_vertex_element">ALLEGRO_VERTEX_ELEMENT</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_VERTEX_ELEMENT ALLEGRO_VERTEX_ELEMENT;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L127">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L127">Source Code</a></p>
 <p>A small structure describing a certain element of a vertex. E.g. the position of the vertex, or its color. These structures are used by the <a href="primitives.html#al_create_vertex_decl">al_create_vertex_decl</a> function to create the vertex declaration. For that they generally occur in an array. The last element of such an array should have the attribute field equal to 0, to signify that it is the end of the array. Here is an example code that would create a declaration describing  [...]
 <pre class="sourceCode c"><code class="sourceCode c"><span class="co">/* On compilers without the offsetof keyword you need to obtain the</span>
 <span class="co"> * offset with sizeof and make sure to account for packing.</span>
@@ -911,7 +911,7 @@ ALLEGRO_VERTEX_DECL* decl = al_create_vertex_decl(elems, <span class="kw">sizeof
 <p>See also: <a href="primitives.html#al_create_vertex_decl">al_create_vertex_decl</a>, <a href="primitives.html#allegro_vertex_decl">ALLEGRO_VERTEX_DECL</a>, <a href="primitives.html#allegro_prim_attr">ALLEGRO_PRIM_ATTR</a>, <a href="primitives.html#allegro_prim_storage">ALLEGRO_PRIM_STORAGE</a></p>
 <h2 id="allegro_prim_type"><a href="#allegro_prim_type">ALLEGRO_PRIM_TYPE</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_PRIM_TYPE</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L36">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L36">Source Code</a></p>
 <p>Enumerates the types of primitives this addon can draw.</p>
 <ul>
 <li><p>ALLEGRO_PRIM_POINT_LIST - A list of points, each vertex defines a point</p></li>
@@ -924,7 +924,7 @@ ALLEGRO_VERTEX_DECL* decl = al_create_vertex_decl(elems, <span class="kw">sizeof
 </ul>
 <h2 id="allegro_prim_attr"><a href="#allegro_prim_attr">ALLEGRO_PRIM_ATTR</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_PRIM_ATTR</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L55">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L55">Source Code</a></p>
 <p>Enumerates the types of vertex attributes that a custom vertex may have.</p>
 <ul>
 <li><p>ALLEGRO_PRIM_POSITION - Position information, can be stored only in ALLEGRO_PRIM_SHORT_2, ALLEGRO_PRIM_FLOAT_2 and ALLEGRO_PRIM_FLOAT_3.</p></li>
@@ -939,7 +939,7 @@ ALLEGRO_VERTEX_DECL* decl = al_create_vertex_decl(elems, <span class="kw">sizeof
 <p>See also: <a href="primitives.html#allegro_vertex_decl">ALLEGRO_VERTEX_DECL</a>, <a href="primitives.html#allegro_prim_storage">ALLEGRO_PRIM_STORAGE</a></p>
 <h2 id="allegro_prim_storage"><a href="#allegro_prim_storage">ALLEGRO_PRIM_STORAGE</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_PRIM_STORAGE</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L67">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L67">Source Code</a></p>
 <p>Enumerates the types of storage an attribute of a custom vertex may be stored in. Many of these can only be used for ALLEGRO_PRIM_USER_ATTR attributes and can only be accessed via shaders. Usually no matter what the storage is specified the attribute gets converted to single precision floating point when the shader is run. Despite that, it may be advantageous to use more dense storage formats (e.g. ALLEGRO_PRIM_NORMALIZED_UBYTE_4 instead of ALLEGRO_PRIM_FLOAT_4) when bandwidth (amount [...]
 <ul>
 <li><p>ALLEGRO_PRIM_FLOAT_1 - A single float</p>
@@ -971,15 +971,15 @@ Since: 5.1.6</li>
 <p>See also: <a href="primitives.html#allegro_prim_attr">ALLEGRO_PRIM_ATTR</a></p>
 <h2 id="allegro_vertex_cache_size"><a href="#allegro_vertex_cache_size">ALLEGRO_VERTEX_CACHE_SIZE</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_VERTEX_CACHE_SIZE 256</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L119">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L119">Source Code</a></p>
 <p>Defines the size of the transformation vertex cache for the software renderer. If you pass less than this many vertices to the primitive rendering functions you will get a speed boost. This also defines the size of the cache vertex buffer, used for the high-level primitives. This corresponds to the maximum number of line segments that will be used to form them.</p>
 <h2 id="allegro_prim_quality"><a href="#allegro_prim_quality">ALLEGRO_PRIM_QUALITY</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_PRIM_QUALITY 10</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L123">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L123">Source Code</a></p>
 <p>Controls the quality of the approximation of curved primitives (e.g. circles). Curved primitives are drawn by approximating them with a sequence of line segments. By default, this roughly corresponds to error of less than half of a pixel.</p>
 <h2 id="allegro_line_join"><a href="#allegro_line_join">ALLEGRO_LINE_JOIN</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_LINE_JOIN</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L87">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L87">Source Code</a></p>
 <ul>
 <li>ALLEGRO_LINE_JOIN_NONE</li>
 <li>ALLEGRO_LINE_JOIN_BEVEL</li>
@@ -995,7 +995,7 @@ Since: 5.1.6</li>
 <p>See also: <a href="primitives.html#al_draw_polygon">al_draw_polygon</a></p>
 <h2 id="allegro_line_cap"><a href="#allegro_line_cap">ALLEGRO_LINE_CAP</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_LINE_CAP</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L98">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L98">Source Code</a></p>
 <ul>
 <li>ALLEGRO_LINE_CAP_NONE</li>
 <li>ALLEGRO_LINE_CAP_SQUARE</li>
@@ -1012,19 +1012,19 @@ Since: 5.1.6</li>
 <p>See also: <a href="primitives.html#al_draw_polygon">al_draw_polygon</a></p>
 <h2 id="allegro_vertex_buffer"><a href="#allegro_vertex_buffer">ALLEGRO_VERTEX_BUFFER</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_VERTEX_BUFFER ALLEGRO_VERTEX_BUFFER;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L156">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L156">Source Code</a></p>
 <p>A GPU vertex buffer that you can use to store vertices on the GPU instead of uploading them afresh during every drawing operation.</p>
 <p>Since: 5.1.3</p>
 <p>See also: <a href="primitives.html#al_create_vertex_buffer">al_create_vertex_buffer</a>, <a href="primitives.html#al_destroy_vertex_buffer">al_destroy_vertex_buffer</a></p>
 <h2 id="allegro_index_buffer"><a href="#allegro_index_buffer">ALLEGRO_INDEX_BUFFER</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_INDEX_BUFFER ALLEGRO_INDEX_BUFFER;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L160">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L160">Source Code</a></p>
 <p>A GPU index buffer that you can use to store indices of vertices in a vertex buffer on the GPU instead of uploading them afresh during every drawing operation.</p>
 <p>Since: 5.1.8</p>
 <p>See also: <a href="primitives.html#al_create_index_buffer">al_create_index_buffer</a>, <a href="primitives.html#al_destroy_index_buffer">al_destroy_index_buffer</a></p>
 <h2 id="allegro_prim_buffer_flags"><a href="#allegro_prim_buffer_flags">ALLEGRO_PRIM_BUFFER_FLAGS</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_PRIM_BUFFER_FLAGS</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/primitives/allegro5/allegro_primitives.h#L109">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/primitives/allegro5/allegro_primitives.h#L109">Source Code</a></p>
 <p>Flags to specify how to create a vertex or an index buffer.</p>
 <ul>
 <li><p>ALLEGRO_PRIM_BUFFER_STREAM - Hints to the driver that the buffer is written to often, but used only a few times per frame</p></li>
@@ -1035,8 +1035,8 @@ Since: 5.1.6</li>
 <p>Since: 5.1.3</p>
 <p>See also: <a href="primitives.html#al_create_vertex_buffer">al_create_vertex_buffer</a>, <a href="primitives.html#al_create_index_buffer">al_create_index_buffer</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:45 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:02 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/search_index.js b/docs/html/refman/search_index.js
index 4e284b6..c2d70fd 100644
--- a/docs/html/refman/search_index.js
+++ b/docs/html/refman/search_index.js
@@ -1,4 +1,4 @@
 var search_index = [
-'Getting started guide','Introduction','Structure of the library and its addons','The main function','Initialisation','Opening a window','Display an image','Changing the drawing target','Event queues and input','Displaying some text','Drawing primitives','Blending','Sound','Unstable API','Not the end','Configuration files','Monster description','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG_ENTRY','al_create_config','al_destroy_config','al_load_config_file','al_load_config_fil [...]
+'Getting started guide','Introduction','Structure of the library and its addons','The main function','Initialisation','Opening a window','Display an image','Changing the drawing target','Event queues and input','Displaying some text','Drawing primitives','Blending','Sound','Unstable API','Not the end','Configuration files','Monster description','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG_ENTRY','al_create_config','al_destroy_config','al_load_config_file','al_load_config_fil [...]
 var search_urls = [
-'getting_started.html#getting-started-guide','getting_started.html#introduction','getting_started.html#structure-of-the-library-and-its-addons','getting_started.html#the-main-function','getting_started.html#initialisation','getting_started.html#opening-a-window','getting_started.html#display-an-image','getting_started.html#changing-the-drawing-target','getting_started.html#event-queues-and-input','getting_started.html#displaying-some-text','getting_started.html#drawing-primitives','getti [...]
+'getting_started.html#getting-started-guide','getting_started.html#introduction','getting_started.html#structure-of-the-library-and-its-addons','getting_started.html#the-main-function','getting_started.html#initialisation','getting_started.html#opening-a-window','getting_started.html#display-an-image','getting_started.html#changing-the-drawing-target','getting_started.html#event-queues-and-input','getting_started.html#displaying-some-text','getting_started.html#drawing-primitives','getti [...]
diff --git a/docs/html/refman/shader.html b/docs/html/refman/shader.html
index 28c8509..9b04cba 100644
--- a/docs/html/refman/shader.html
+++ b/docs/html/refman/shader.html
@@ -142,13 +142,13 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="allegro_shader"><a href="#allegro_shader">ALLEGRO_SHADER</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_SHADER ALLEGRO_SHADER;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/shader.h#L14">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/shader.h#L14">Source Code</a></p>
 <p>An <a href="shader.html#allegro_shader">ALLEGRO_SHADER</a> is a program that runs on the GPU. It combines both a vertex and a pixel shader. (In OpenGL terms, an <a href="shader.html#allegro_shader">ALLEGRO_SHADER</a> is actually a <em>program</em> which has one or more <em>shaders</em> attached. This can be confusing.)</p>
 <p>The source code for the underlying vertex or pixel shader can be provided either as GLSL or HLSL, depending on the value of <a href="shader.html#allegro_shader_platform">ALLEGRO_SHADER_PLATFORM</a> used when creating it.</p>
 <p>Since: 5.1.0</p>
 <h1 id="allegro_shader_type"><a href="#allegro_shader_type">ALLEGRO_SHADER_TYPE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_SHADER_TYPE ALLEGRO_SHADER_TYPE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/shader.h#L23">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/shader.h#L23">Source Code</a></p>
 <p>Used with <a href="shader.html#al_attach_shader_source">al_attach_shader_source</a> and <a href="shader.html#al_attach_shader_source_file">al_attach_shader_source_file</a> to specify how to interpret the attached source.</p>
 <dl>
 <dt>ALLEGRO_VERTEX_SHADER</dt>
@@ -164,7 +164,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Since: 5.1.0</p>
 <h1 id="allegro_shader_platform"><a href="#allegro_shader_platform">ALLEGRO_SHADER_PLATFORM</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_SHADER_PLATFORM ALLEGRO_SHADER_PLATFORM;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/shader.h#L33">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/shader.h#L33">Source Code</a></p>
 <p>The underlying platform which the <a href="shader.html#allegro_shader">ALLEGRO_SHADER</a> is built on top of, which dictates the language used to program the shader.</p>
 <ul>
 <li>ALLEGRO_SHADER_AUTO</li>
@@ -174,7 +174,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Since: 5.1.0</p>
 <h1 id="al_create_shader"><a href="#al_create_shader">al_create_shader</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_SHADER *al_create_shader(ALLEGRO_SHADER_PLATFORM platform)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L50">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L50">Source Code</a></p>
 <p>Create a shader object.</p>
 <p>The platform argument is one of the <a href="shader.html#allegro_shader_platform">ALLEGRO_SHADER_PLATFORM</a> values, and specifies the type of shader object to create, and which language is used to program the shader.</p>
 <p>The shader platform must be compatible with the type of display that you will use the shader with. For example, you cannot create and use a HLSL shader on an OpenGL display, nor a GLSL shader on a Direct3D display.</p>
@@ -185,7 +185,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_attach_shader_source"><a href="#al_attach_shader_source">al_attach_shader_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_attach_shader_source(ALLEGRO_SHADER *shader, ALLEGRO_SHADER_TYPE type,
     <span class="dt">const</span> <span class="dt">char</span> *source)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L83">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L83">Source Code</a></p>
 <p>Attaches the shader's source code to the shader object and compiles it. Passing NULL deletes the underlying (OpenGL or DirectX) shader. See also <a href="shader.html#al_attach_shader_source_file">al_attach_shader_source_file</a> if you prefer to obtain your shader source from an external file.</p>
 <p>If you do not use ALLEGRO_PROGRAMMABLE_PIPELINE Allegro's graphics functions will not use any shader specific functions themselves. In case of a system with no fixed function pipeline (like OpenGL ES 2 or OpenGL 3 or 4) this means Allegro's drawing functions cannot be used.</p>
 <p>TODO: Is ALLEGRO_PROGRAMMABLE_PIPELINE set automatically in this case?</p>
@@ -249,14 +249,14 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_attach_shader_source_file"><a href="#al_attach_shader_source_file">al_attach_shader_source_file</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_attach_shader_source_file(ALLEGRO_SHADER *shader,
    ALLEGRO_SHADER_TYPE type, <span class="dt">const</span> <span class="dt">char</span> *filename)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L92">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L92">Source Code</a></p>
 <p>Like <a href="shader.html#al_attach_shader_source">al_attach_shader_source</a> but reads the source code for the shader from the named file.</p>
 <p>Returns true on success and false on error, in which case the error log is updated. The error log can be retrieved with <a href="shader.html#al_get_shader_log">al_get_shader_log</a>.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="shader.html#al_attach_shader_source">al_attach_shader_source</a>, <a href="shader.html#al_build_shader">al_build_shader</a>, <a href="shader.html#al_get_shader_log">al_get_shader_log</a></p>
 <h1 id="al_build_shader"><a href="#al_build_shader">al_build_shader</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_build_shader(ALLEGRO_SHADER *shader)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L125">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L125">Source Code</a></p>
 <p>This is required before the shader can be used with <a href="shader.html#al_use_shader">al_use_shader</a>. It should be called after successfully attaching the pixel and/or vertex shaders with <a href="shader.html#al_attach_shader_source">al_attach_shader_source</a> or <a href="shader.html#al_attach_shader_source_file">al_attach_shader_source_file</a>.</p>
 <p>Returns true on success and false on error, in which case the error log is updated. The error log can be retrieved with <a href="shader.html#al_get_shader_log">al_get_shader_log</a>.</p>
 <blockquote>
@@ -266,27 +266,27 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="shader.html#al_use_shader">al_use_shader</a>, <a href="shader.html#al_get_shader_log">al_get_shader_log</a></p>
 <h1 id="al_get_shader_log"><a href="#al_get_shader_log">al_get_shader_log</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_shader_log(ALLEGRO_SHADER *shader)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L133">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L133">Source Code</a></p>
 <p>Return a read-only string containing the information log for a shader program. The log is updated by certain functions, such as <a href="shader.html#al_attach_shader_source">al_attach_shader_source</a> or <a href="shader.html#al_build_shader">al_build_shader</a> when there is an error.</p>
 <p>This function never returns NULL.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="shader.html#al_attach_shader_source">al_attach_shader_source</a>, <a href="shader.html#al_attach_shader_source_file">al_attach_shader_source_file</a>, <a href="shader.html#al_build_shader">al_build_shader</a></p>
 <h1 id="al_get_shader_platform"><a href="#al_get_shader_platform">al_get_shader_platform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_SHADER_PLATFORM al_get_shader_platform(ALLEGRO_SHADER *shader)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L142">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L142">Source Code</a></p>
 <p>Returns the platform the shader was created with (either ALLEGRO_SHADER_HLSL or ALLEGRO_SHADER_GLSL).</p>
 <p>Since: 5.1.6</p>
 <p>See also: <a href="shader.html#al_create_shader">al_create_shader</a></p>
 <h1 id="al_use_shader"><a href="#al_use_shader">al_use_shader</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_use_shader(ALLEGRO_SHADER *shader)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L150">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L150">Source Code</a></p>
 <p>Uses the shader for subsequent drawing operations on the current target bitmap. Pass NULL to stop using any shader on the current target bitmap.</p>
 <p>Returns true on success. Otherwise returns false, e.g. because the shader is incompatible with the target bitmap.</p>
 <p>Since: 5.1.6</p>
 <p>See also: <a href="shader.html#al_destroy_shader">al_destroy_shader</a>, <a href="shader.html#al_set_shader_sampler">al_set_shader_sampler</a>, <a href="shader.html#al_set_shader_matrix">al_set_shader_matrix</a>, <a href="shader.html#al_set_shader_int">al_set_shader_int</a>, <a href="shader.html#al_set_shader_float">al_set_shader_float</a>, <a href="shader.html#al_set_shader_bool">al_set_shader_bool</a>, <a href="shader.html#al_set_shader_int_vector">al_set_shader_int_vector</a>, <a h [...]
 <h1 id="al_destroy_shader"><a href="#al_destroy_shader">al_destroy_shader</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_shader(ALLEGRO_SHADER *shader)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L197">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L197">Source Code</a></p>
 <p>Destroy a shader. Any bitmaps which currently use the shader will implicitly stop using the shader. In multi-threaded programs, be careful that no such bitmaps are being accessed by other threads at the time.</p>
 <p>As a convenience, if the target bitmap of the calling thread is using the shader then the shader is implicitly unused before being destroyed.</p>
 <p>This function does nothing if the shader argument is NULL.</p>
@@ -295,7 +295,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_set_shader_sampler"><a href="#al_set_shader_sampler">al_set_shader_sampler</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_shader_sampler(<span class="dt">const</span> <span class="dt">char</span> *name,
    ALLEGRO_BITMAP *bitmap, <span class="dt">int</span> unit)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L237">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L237">Source Code</a></p>
 <p>Sets a texture sampler uniform and texture unit of the current target bitmap's shader. The given bitmap must be a video bitmap.</p>
 <p>Different samplers should use different units. The bitmap passed to Allegro's drawing functions uses the 0th unit, so if you're planning on using the <code>al_tex</code> variable in your pixel shader as well as another sampler, set the other sampler to use a unit different from 0. With the primitives addon, it is possible to free up the 0th unit by passing <code>NULL</code> as the texture argument to the relevant drawing functions. In this case, you may set a sampler to use the 0th un [...]
 <p>Returns true on success. Otherwise returns false, e.g. if the uniform by that name does not exist in the shader.</p>
@@ -303,37 +303,37 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="shader.html#al_use_shader">al_use_shader</a></p>
 <h1 id="al_set_shader_matrix"><a href="#al_set_shader_matrix">al_set_shader_matrix</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_shader_matrix(<span class="dt">const</span> <span class="dt">char</span> *name,
-   ALLEGRO_TRANSFORM *matrix)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L258">Source Code</a></p>
+   <span class="dt">const</span> ALLEGRO_TRANSFORM *matrix)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L258">Source Code</a></p>
 <p>Sets a matrix uniform of the current target bitmap's shader.</p>
 <p>Returns true on success. Otherwise returns false, e.g. if the uniform by that name does not exist in the shader.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="shader.html#al_use_shader">al_use_shader</a></p>
 <h1 id="al_set_shader_int"><a href="#al_set_shader_int">al_set_shader_int</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_shader_int(<span class="dt">const</span> <span class="dt">char</span> *name, <span class="dt">int</span> i)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L279">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L279">Source Code</a></p>
 <p>Sets an integer uniform of the current target bitmap's shader.</p>
 <p>Returns true on success. Otherwise returns false, e.g. if the uniform by that name does not exist in the shader.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="shader.html#al_use_shader">al_use_shader</a></p>
 <h1 id="al_set_shader_float"><a href="#al_set_shader_float">al_set_shader_float</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_shader_float(<span class="dt">const</span> <span class="dt">char</span> *name, <span class="dt">float</span> f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L299">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L299">Source Code</a></p>
 <p>Sets a float uniform of the target bitmap's shader.</p>
 <p>Returns true on success. Otherwise returns false, e.g. if the uniform by that name does not exist in the shader.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="shader.html#al_use_shader">al_use_shader</a></p>
 <h1 id="al_set_shader_bool"><a href="#al_set_shader_bool">al_set_shader_bool</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_shader_bool(<span class="dt">const</span> <span class="dt">char</span> *name, bool b)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L361">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L361">Source Code</a></p>
 <p>Sets a boolean uniform of the target bitmap's shader.</p>
 <p>Returns true on success. Otherwise returns false, e.g. if the uniform by that name does not exist in the shader.</p>
 <p>Since: 5.1.6</p>
 <p>See also: <a href="shader.html#al_use_shader">al_use_shader</a></p>
 <h1 id="al_set_shader_int_vector"><a href="#al_set_shader_int_vector">al_set_shader_int_vector</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_shader_int_vector(<span class="dt">const</span> <span class="dt">char</span> *name,
-   <span class="dt">int</span> num_components, <span class="dt">int</span> *i, <span class="dt">int</span> num_elems)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L319">Source Code</a></p>
+   <span class="dt">int</span> num_components, <span class="dt">const</span> <span class="dt">int</span> *i, <span class="dt">int</span> num_elems)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L319">Source Code</a></p>
 <p>Sets an integer vector array uniform of the current target bitmap's shader. The 'num_components' parameter can take one of the values 1, 2, 3 or 4. If it is 1 then an array of 'num_elems' integer elements is added. Otherwise each added array element is assumed to be a vector with 2, 3 or 4 components in it.</p>
 <p>For example, if you have a GLSL uniform declared as <code>uniform ivec3 flowers[4]</code> or an HLSL uniform declared as <code>uniform int3 flowers[4]</code>, then you'd use this function from your code like so:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> flowers[<span class="dv">4</span>][<span class="dv">3</span>] =
@@ -350,21 +350,21 @@ al_set_shader_int_vector(<span class="st">"flowers"</span>, <span clas
 <p>See also: <a href="shader.html#al_set_shader_float_vector">al_set_shader_float_vector</a>, <a href="shader.html#al_use_shader">al_use_shader</a></p>
 <h1 id="al_set_shader_float_vector"><a href="#al_set_shader_float_vector">al_set_shader_float_vector</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_set_shader_float_vector(<span class="dt">const</span> <span class="dt">char</span> *name,
-   <span class="dt">int</span> num_components, <span class="dt">float</span> *f, <span class="dt">int</span> num_elems)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L340">Source Code</a></p>
+   <span class="dt">int</span> num_components, <span class="dt">const</span> <span class="dt">float</span> *f, <span class="dt">int</span> num_elems)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L340">Source Code</a></p>
 <p>Same as <a href="shader.html#al_set_shader_int_vector">al_set_shader_int_vector</a> except all values are float instead of int.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="shader.html#al_set_shader_int_vector">al_set_shader_int_vector</a>, <a href="shader.html#al_use_shader">al_use_shader</a></p>
 <h1 id="al_get_default_shader_source"><a href="#al_get_default_shader_source">al_get_default_shader_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> <span class="dt">const</span> *al_get_default_shader_source(ALLEGRO_SHADER_PLATFORM platform,
    ALLEGRO_SHADER_TYPE type)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/shader.c#L381">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/shader.c#L381">Source Code</a></p>
 <p>Returns a string containing the source code to Allegro's default vertex or pixel shader appropriate for the passed platform. The ALLEGRO_SHADER_AUTO value means GLSL is used if OpenGL is being used otherwise HLSL. ALLEGRO_SHADER_AUTO requires that there is a current display set on the calling thread. This function can return NULL if Allegro was built without support for shaders of the selected platform.</p>
 <p>Since: 5.1.6</p>
 <p>See also: <a href="shader.html#al_attach_shader_source">al_attach_shader_source</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:45 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:03 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/state.html b/docs/html/refman/state.html
index 8794c12..6ca207a 100644
--- a/docs/html/refman/state.html
+++ b/docs/html/refman/state.html
@@ -129,7 +129,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre><code> #include <allegro5/allegro.h></code></pre>
 <h1 id="allegro_state"><a href="#allegro_state">ALLEGRO_STATE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_STATE ALLEGRO_STATE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/tls.h#L49">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/tls.h#L49">Source Code</a></p>
 <p>Opaque type which is passed to <a href="state.html#al_store_state">al_store_state</a>/<a href="state.html#al_restore_state">al_restore_state</a>.</p>
 <p>The various state kept internally by Allegro can be displayed like this:</p>
 <pre><code>  global
@@ -152,16 +152,16 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>In general, the only real global state is the active system driver. All other global state is per-thread, so if your application has multiple separate threads they never will interfere with each other. (Except if there are objects accessed by multiple threads of course. Usually you want to minimize that though and for the remaining cases use synchronization primitives described in the threads section or events described in the events section to control inter-thread communication.)</p>
 <h1 id="allegro_state_flags"><a href="#allegro_state_flags">ALLEGRO_STATE_FLAGS</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_STATE_FLAGS</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/tls.h#L28">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/tls.h#L28">Source Code</a></p>
 <p>Flags which can be passed to <a href="state.html#al_store_state">al_store_state</a>/<a href="state.html#al_restore_state">al_restore_state</a> as bit combinations. See <a href="state.html#al_store_state">al_store_state</a> for the list of flags.</p>
 <h1 id="al_restore_state"><a href="#al_restore_state">al_restore_state</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_restore_state(ALLEGRO_STATE <span class="dt">const</span> *state)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L754">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L755">Source Code</a></p>
 <p>Restores part of the state of the current thread from the given <a href="state.html#allegro_state">ALLEGRO_STATE</a> object.</p>
 <p>See also: <a href="state.html#al_store_state">al_store_state</a>, <a href="state.html#allegro_state_flags">ALLEGRO_STATE_FLAGS</a></p>
 <h1 id="al_store_state"><a href="#al_store_state">al_store_state</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_store_state(ALLEGRO_STATE *state, <span class="dt">int</span> flags)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L686">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L687">Source Code</a></p>
 <p>Stores part of the state of the current thread in the given <a href="state.html#allegro_state">ALLEGRO_STATE</a> object. The flags parameter can take any bit-combination of these flags:</p>
 <ul>
 <li>ALLEGRO_STATE_NEW_DISPLAY_PARAMETERS - new_display_format, new_display_refresh_rate, new_display_flags</li>
@@ -177,16 +177,18 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </ul>
 <p>See also: <a href="state.html#al_restore_state">al_restore_state</a>, <a href="state.html#allegro_state">ALLEGRO_STATE</a></p>
 <h1 id="al_get_errno"><a href="#al_get_errno">al_get_errno</a></h1>
-<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_errno(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L903">Source Code</a></p>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_errno(<span class="dt">void</span>)
+GETTER(allegro_errno, <span class="dv">0</span>)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L919">Source Code</a></p>
 <p>Some Allegro functions will set an error number as well as returning an error code. Call this function to retrieve the last error number set for the calling thread.</p>
 <h1 id="al_set_errno"><a href="#al_set_errno">al_set_errno</a></h1>
-<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_errno(<span class="dt">int</span> errnum)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/tls.c#L916">Source Code</a></p>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_errno(<span class="dt">int</span> errnum)
+SETTER(allegro_errno, errnum)</code></pre>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/tls.c#L924">Source Code</a></p>
 <p>Set the error number for the calling thread.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:41 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:59 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/system.html b/docs/html/refman/system.html
index 523c15e..cde235f 100644
--- a/docs/html/refman/system.html
+++ b/docs/html/refman/system.html
@@ -139,7 +139,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="al_install_system"><a href="#al_install_system">al_install_system</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_install_system(<span class="dt">int</span> version, <span class="dt">int</span> (*atexit_ptr)(<span class="dt">void</span> (*)(<span class="dt">void</span>)))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/system.c#L202">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/system.c#L207">Source Code</a></p>
 <p>Initialize the Allegro system. No other Allegro functions can be called before this (with one or two exceptions).</p>
 <p>The version field should always be set to ALLEGRO_VERSION_INT.</p>
 <p>If atexit_ptr is non-NULL, and if hasn't been done already, <a href="system.html#al_uninstall_system">al_uninstall_system</a> will be registered as an atexit function.</p>
@@ -149,7 +149,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="system.html#al_init">al_init</a></p>
 <h1 id="al_init"><a href="#al_init">al_init</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define al_init()    (al_install_system(ALLEGRO_VERSION_INT, atexit))</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/system.h#L15">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/system.h#L15">Source Code</a></p>
 <p>Like <a href="system.html#al_install_system">al_install_system</a>, but automatically passes in the version and uses the atexit function visible in the current binary.</p>
 <blockquote>
 <p>Note: It is typically wrong to call al_init anywhere except the final game binary. In particular, do not call it inside a shared library unless you know what you're doing. In those cases, it is better to call al_install_system either with a <code>NULL</code> atexit_ptr, or with a pointer to atexit provided by the user of this shared library.</p>
@@ -157,18 +157,18 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="system.html#al_install_system">al_install_system</a></p>
 <h1 id="al_uninstall_system"><a href="#al_uninstall_system">al_uninstall_system</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_uninstall_system(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/system.c#L296">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/system.c#L303">Source Code</a></p>
 <p>Closes down the Allegro system.</p>
 <blockquote>
 <p>Note: al_uninstall_system() can be called without a corresponding <a href="system.html#al_install_system">al_install_system</a> call, e.g. from atexit().</p>
 </blockquote>
 <h1 id="al_is_system_installed"><a href="#al_is_system_installed">al_is_system_installed</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_system_installed(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/system.c#L326">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/system.c#L333">Source Code</a></p>
 <p>Returns true if Allegro is initialized, otherwise returns false.</p>
 <h1 id="al_get_allegro_version"><a href="#al_get_allegro_version">al_get_allegro_version</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/allegro.c#L27">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/allegro.c#L27">Source Code</a></p>
 <p>Returns the (compiled) version of the Allegro library, packed into a single integer as groups of 8 bits in the form <code>(major << 24) | (minor << 16) | (revision << 8) | release</code>.</p>
 <p>You can use code like this to extract them:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> version = al_get_allegro_version();
@@ -179,7 +179,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>The <code>release</code> number is 0 for an unofficial version and 1 or greater for an official release. For example "5.0.2[1]" would be the (first) official 5.0.2 release while "5.0.2[0]" would be a compile of a version from the "5.0.2" branch before the official release.</p>
 <h1 id="al_get_standard_path"><a href="#al_get_standard_path">al_get_standard_path</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_PATH *al_get_standard_path(<span class="dt">int</span> id)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/system.c#L354">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/system.c#L361">Source Code</a></p>
 <p>Gets a system path, depending on the <code>id</code> parameter. Some of these paths may be affected by the organization and application name, so be sure to set those before calling this function.</p>
 <p>The paths are not guaranteed to be unique (e.g., SETTINGS and DATA may be the same on some platforms), so you should be sure your filenames are unique if you need to avoid naming collisions. Also, a returned path may not actually exist on the file system.</p>
 <dl>
@@ -213,38 +213,38 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="system.html#al_set_app_name">al_set_app_name</a>, <a href="system.html#al_set_org_name">al_set_org_name</a>, <a href="path.html#al_destroy_path">al_destroy_path</a>, <a href="system.html#al_set_exe_name">al_set_exe_name</a></p>
 <h1 id="al_set_exe_name"><a href="#al_set_exe_name">al_set_exe_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_exe_name(<span class="dt">char</span> <span class="dt">const</span> *path)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/system.c#L378">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/system.c#L385">Source Code</a></p>
 <p>This override the executable name used by <a href="system.html#al_get_standard_path">al_get_standard_path</a> for ALLEGRO_EXENAME_PATH and ALLEGRO_RESOURCES_PATH.</p>
 <p>One possibility where changing this can be useful is if you use the Python wrapper. Allegro would then by default think that the system's Python executable is the current executable - but you can set it to the .py file being executed instead.</p>
 <p>Since: 5.0.6, 5.1.0</p>
 <p>See also: <a href="system.html#al_get_standard_path">al_get_standard_path</a></p>
 <h1 id="al_set_app_name"><a href="#al_set_app_name">al_set_app_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_app_name(<span class="dt">const</span> <span class="dt">char</span> *app_name)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/system.c#L401">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/system.c#L408">Source Code</a></p>
 <p>Sets the global application name.</p>
 <p>The application name is used by <a href="system.html#al_get_standard_path">al_get_standard_path</a> to build the full path to an application's files.</p>
 <p>This function may be called before <a href="system.html#al_init">al_init</a> or <a href="system.html#al_install_system">al_install_system</a>.</p>
 <p>See also: <a href="system.html#al_get_app_name">al_get_app_name</a>, <a href="system.html#al_set_org_name">al_set_org_name</a></p>
 <h1 id="al_set_org_name"><a href="#al_set_org_name">al_set_org_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_org_name(<span class="dt">const</span> <span class="dt">char</span> *org_name)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/system.c#L390">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/system.c#L397">Source Code</a></p>
 <p>Sets the global organization name.</p>
 <p>The organization name is used by <a href="system.html#al_get_standard_path">al_get_standard_path</a> to build the full path to an application's files.</p>
 <p>This function may be called before <a href="system.html#al_init">al_init</a> or <a href="system.html#al_install_system">al_install_system</a>.</p>
 <p>See also: <a href="system.html#al_get_org_name">al_get_org_name</a>, <a href="system.html#al_set_app_name">al_set_app_name</a></p>
 <h1 id="al_get_app_name"><a href="#al_get_app_name">al_get_app_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_app_name(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/system.c#L425">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/system.c#L432">Source Code</a></p>
 <p>Returns the global application name string.</p>
 <p>See also: <a href="system.html#al_set_app_name">al_set_app_name</a></p>
 <h1 id="al_get_org_name"><a href="#al_get_org_name">al_get_org_name</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_get_org_name(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/system.c#L417">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/system.c#L424">Source Code</a></p>
 <p>Returns the global organization name string.</p>
 <p>See also: <a href="system.html#al_set_org_name">al_set_org_name</a></p>
 <h1 id="al_get_system_config"><a href="#al_get_system_config">al_get_system_config</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_CONFIG *al_get_system_config(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/system.c#L344">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/system.c#L351">Source Code</a></p>
 <p>Returns the system configuration structure. The returned configuration should not be destroyed with <a href="config.html#al_destroy_config">al_destroy_config</a>. This is mainly used for configuring Allegro and its addons. You may populate this configuration before Allegro is installed to control things like the logging levels and other features.</p>
 <p>Allegro will try to populate this configuration by loading a configuration file from a few different locations, in this order:</p>
 <ul>
@@ -257,19 +257,19 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="al_register_assert_handler"><a href="#al_register_assert_handler">al_register_assert_handler</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_register_assert_handler(<span class="dt">void</span> (*handler)(<span class="dt">char</span> <span class="dt">const</span> *expr,
    <span class="dt">char</span> <span class="dt">const</span> *file, <span class="dt">int</span> line, <span class="dt">char</span> <span class="dt">const</span> *func))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/debug.c#L364">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/debug.c#L364">Source Code</a></p>
 <p>Register a function to be called when an internal Allegro assertion fails. Pass NULL to reset to the default behaviour, which is to do whatever the standard <code>assert()</code> macro does.</p>
 <p>Since: 5.0.6, 5.1.0</p>
 <h1 id="al_register_trace_handler"><a href="#al_register_trace_handler">al_register_trace_handler</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_register_trace_handler(<span class="dt">void</span> (*handler)(<span class="dt">char</span> <span class="dt">const</span> *))</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/debug.c#L373">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/debug.c#L373">Source Code</a></p>
 <p>Register a callback which is called whenever Allegro writes something to its log files. The default logging to allegro.log is disabled while this callback is active. Pass NULL to revert to the default logging.</p>
 <p>This function may be called prior to al_install_system.</p>
 <p>See the example allegro5.cfg for documentation on how to configure the used debug channels, logging levels and trace format.</p>
 <p>Since: 5.1.5</p>
 <h1 id="al_get_cpu_count"><a href="#al_get_cpu_count">al_get_cpu_count</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_cpu_count(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/cpu.c#L51">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/cpu.c#L51">Source Code</a></p>
 <p>Returns the number of CPU cores that the system Allegro is running on has and which could be detected, or a negative number if detection failed. Even if a positive number is returned, it might be that it is not correct. For example, Allegro running on a virtual machine will return the amount of CPU's of the VM, and not that of the underlying system.</p>
 <p>Furthermore even if the number is correct, this only gives you information about the total CPU cores of the system Allegro runs on. The amount of cores available to your program may be less due to circumstances such as programs that are currently running.</p>
 <p>Therefore, it's best to use this for advisory purposes only. It is certainly a bad idea to make your program exclusive to systems for which this function returns a certain "desirable" number.</p>
@@ -277,15 +277,15 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Since: 5.1.12</p>
 <h1 id="al_get_ram_size"><a href="#al_get_ram_size">al_get_ram_size</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_ram_size(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/cpu.c#L78">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/cpu.c#L78">Source Code</a></p>
 <p>Returns the size in MB of the random access memory that the system Allegro is running on has and which could be detected, or a negative number if detection failed. Even if a positive number is returned, it might be that it is not correct. For example, Allegro running on a virtual machine will return the amount of RAM of the VM, and not that of the underlying system.</p>
 <p>Furthermore even if the number is correct, this only gives you information about the total physical memory of the system Allegro runs on. The memory available to your program may be less or more than what this function returns due to circumstances such as virtual memory, and other programs that are currently running.</p>
 <p>Therefore, it's best to use this for advisory purposes only. It is certainly a bad idea to make your program exclusive to systems for which this function returns a certain "desirable" number.</p>
 <p>This function may be called prior to <a href="system.html#al_install_system">al_install_system</a> or <a href="system.html#al_init">al_init</a>.</p>
 <p>Since: 5.1.12</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:42 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:59 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/threads.html b/docs/html/refman/threads.html
index c437597..77145db 100644
--- a/docs/html/refman/threads.html
+++ b/docs/html/refman/threads.html
@@ -145,43 +145,43 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="allegro_thread"><a href="#allegro_thread">ALLEGRO_THREAD</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_THREAD ALLEGRO_THREAD;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/threads.h#L27">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/threads.h#L27">Source Code</a></p>
 <p>An opaque structure representing a thread.</p>
 <h1 id="allegro_mutex"><a href="#allegro_mutex">ALLEGRO_MUTEX</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_MUTEX ALLEGRO_MUTEX;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/threads.h#L31">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/threads.h#L31">Source Code</a></p>
 <p>An opaque structure representing a mutex.</p>
 <h1 id="allegro_cond"><a href="#allegro_cond">ALLEGRO_COND</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_COND ALLEGRO_COND;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/threads.h#L35">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/threads.h#L35">Source Code</a></p>
 <p>An opaque structure representing a condition variable.</p>
 <h1 id="al_create_thread"><a href="#al_create_thread">al_create_thread</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_THREAD *al_create_thread(
    <span class="dt">void</span> *(*proc)(ALLEGRO_THREAD *thread, <span class="dt">void</span> *arg), <span class="dt">void</span> *arg)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L115">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L115">Source Code</a></p>
 <p>Spawn a new thread which begins executing <code>proc</code>. The new thread is passed its own thread handle and the value <code>arg</code>.</p>
 <p>Returns a pointer to the thread on success. Otherwise, returns NULL if there was an error.</p>
 <p>See also: <a href="threads.html#al_start_thread">al_start_thread</a>, <a href="threads.html#al_join_thread">al_join_thread</a>.</p>
 <h1 id="al_start_thread"><a href="#al_start_thread">al_start_thread</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_start_thread(ALLEGRO_THREAD *thread)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L146">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L146">Source Code</a></p>
 <p>When a thread is created, it is initially in a suspended state. Calling <a href="threads.html#al_start_thread">al_start_thread</a> will start its actual execution.</p>
 <p>Starting a thread which has already been started does nothing.</p>
 <p>See also: <a href="threads.html#al_create_thread">al_create_thread</a>.</p>
 <h1 id="al_join_thread"><a href="#al_join_thread">al_join_thread</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_join_thread(ALLEGRO_THREAD *thread, <span class="dt">void</span> **ret_value)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L180">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L180">Source Code</a></p>
 <p>Wait for the thread to finish executing. This implicitly calls <a href="threads.html#al_set_thread_should_stop">al_set_thread_should_stop</a> first.</p>
 <p>If <code>ret_value</code> is non-<code>NULL</code>, the value returned by the thread function will be stored at the location pointed to by <code>ret_value</code>.</p>
 <p>See also: <a href="threads.html#al_set_thread_should_stop">al_set_thread_should_stop</a>, <a href="threads.html#al_get_thread_should_stop">al_get_thread_should_stop</a>, <a href="threads.html#al_destroy_thread">al_destroy_thread</a>.</p>
 <h1 id="al_set_thread_should_stop"><a href="#al_set_thread_should_stop">al_set_thread_should_stop</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_thread_should_stop(ALLEGRO_THREAD *thread)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L230">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L230">Source Code</a></p>
 <p>Set the flag to indicate <code>thread</code> should stop. Returns immediately.</p>
 <p>See also: <a href="threads.html#al_join_thread">al_join_thread</a>, <a href="threads.html#al_get_thread_should_stop">al_get_thread_should_stop</a>.</p>
 <h1 id="al_get_thread_should_stop"><a href="#al_get_thread_should_stop">al_get_thread_should_stop</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_thread_should_stop(ALLEGRO_THREAD *thread)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L239">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L239">Source Code</a></p>
 <p>Check if another thread is waiting for <code>thread</code> to stop. Threads which run in a loop should check this periodically and act on it when convenient.</p>
 <p>Returns true if another thread has called <a href="threads.html#al_join_thread">al_join_thread</a> or <a href="threads.html#al_set_thread_should_stop">al_set_thread_should_stop</a> on this thread.</p>
 <p>See also: <a href="threads.html#al_join_thread">al_join_thread</a>, <a href="threads.html#al_set_thread_should_stop">al_set_thread_should_stop</a>.</p>
@@ -190,57 +190,57 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_destroy_thread"><a href="#al_destroy_thread">al_destroy_thread</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_thread(ALLEGRO_THREAD *thread)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L248">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L248">Source Code</a></p>
 <p>Free the resources used by a thread. Implicitly performs <a href="threads.html#al_join_thread">al_join_thread</a> on the thread if it hasn't been done already.</p>
 <p>Does nothing if <code>thread</code> is NULL.</p>
 <p>See also: <a href="threads.html#al_join_thread">al_join_thread</a>.</p>
 <h1 id="al_run_detached_thread"><a href="#al_run_detached_thread">al_run_detached_thread</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_run_detached_thread(<span class="dt">void</span> *(*proc)(<span class="dt">void</span> *arg), <span class="dt">void</span> *arg)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L133">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L133">Source Code</a></p>
 <p>Runs the passed function in its own thread, with <code>arg</code> passed to it as only parameter. This is similar to calling <a href="threads.html#al_create_thread">al_create_thread</a>, <a href="threads.html#al_start_thread">al_start_thread</a> and (after the thread has finished) <a href="threads.html#al_destroy_thread">al_destroy_thread</a> - but you don't have the possibility of ever calling <a href="threads.html#al_join_thread">al_join_thread</a> on the thread.</p>
 <h1 id="al_create_mutex"><a href="#al_create_mutex">al_create_mutex</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MUTEX *al_create_mutex(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L282">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L282">Source Code</a></p>
 <p>Create the mutex object (a mutual exclusion device). The mutex may or may not support "recursive" locking.</p>
 <p>Returns the mutex on success or <code>NULL</code> on error.</p>
 <p>See also: <a href="threads.html#al_create_mutex_recursive">al_create_mutex_recursive</a>.</p>
 <h1 id="al_create_mutex_recursive"><a href="#al_create_mutex_recursive">al_create_mutex_recursive</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_MUTEX *al_create_mutex_recursive(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L295">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L295">Source Code</a></p>
 <p>Create the mutex object (a mutual exclusion device), with support for "recursive" locking. That is, the mutex will count the number of times it has been locked by the same thread. If the caller tries to acquire a lock on the mutex when it already holds the lock then the count is incremented. The mutex is only unlocked when the thread releases the lock on the mutex an equal number of times, i.e. the count drops down to zero.</p>
 <p>See also: <a href="threads.html#al_create_mutex">al_create_mutex</a>.</p>
 <h1 id="al_lock_mutex"><a href="#al_lock_mutex">al_lock_mutex</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_lock_mutex(ALLEGRO_MUTEX *mutex)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L308">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L308">Source Code</a></p>
 <p>Acquire the lock on <code>mutex</code>. If the mutex is already locked by another thread, the call will block until the mutex becomes available and locked.</p>
 <p>If the mutex is already locked by the calling thread, then the behaviour depends on whether the mutex was created with <a href="threads.html#al_create_mutex">al_create_mutex</a> or <a href="threads.html#al_create_mutex_recursive">al_create_mutex_recursive</a>. In the former case, the behaviour is undefined; the most likely behaviour is deadlock. In the latter case, the count in the mutex will be incremented and the call will return immediately.</p>
 <p>See also: <a href="threads.html#al_unlock_mutex">al_unlock_mutex</a>.</p>
 <p><strong>We don't yet have al_mutex_trylock.</strong></p>
 <h1 id="al_unlock_mutex"><a href="#al_unlock_mutex">al_unlock_mutex</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_unlock_mutex(ALLEGRO_MUTEX *mutex)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L318">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L318">Source Code</a></p>
 <p>Release the lock on <code>mutex</code> if the calling thread holds the lock on it.</p>
 <p>If the calling thread doesn't hold the lock, or if the mutex is not locked, undefined behaviour results.</p>
 <p>See also: <a href="threads.html#al_lock_mutex">al_lock_mutex</a>.</p>
 <h1 id="al_destroy_mutex"><a href="#al_destroy_mutex">al_destroy_mutex</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_mutex(ALLEGRO_MUTEX *mutex)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L327">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L327">Source Code</a></p>
 <p>Free the resources used by the mutex. The mutex should be unlocked. Destroying a locked mutex results in undefined behaviour.</p>
 <p>Does nothing if <code>mutex</code> is <code>NULL</code>.</p>
 <h1 id="al_create_cond"><a href="#al_create_cond">al_create_cond</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_COND *al_create_cond(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L338">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L338">Source Code</a></p>
 <p>Create a condition variable.</p>
 <p>Returns the condition value on success or <code>NULL</code> on error.</p>
 <h1 id="al_destroy_cond"><a href="#al_destroy_cond">al_destroy_cond</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_cond(ALLEGRO_COND *cond)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L350">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L350">Source Code</a></p>
 <p>Destroy a condition variable.</p>
 <p>Destroying a condition variable which has threads block on it results in undefined behaviour.</p>
 <p>Does nothing if <code>cond</code> is <code>NULL</code>.</p>
 <h1 id="al_wait_cond"><a href="#al_wait_cond">al_wait_cond</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_wait_cond(ALLEGRO_COND *cond, ALLEGRO_MUTEX *mutex)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L361">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L361">Source Code</a></p>
 <p>On entering this function, <code>mutex</code> must be locked by the calling thread. The function will atomically release <code>mutex</code> and block on <code>cond</code>. The function will return when <code>cond</code> is "signalled", acquiring the lock on the mutex in the process.</p>
 <p>Example of proper use:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_lock_mutex(mutex);
@@ -254,13 +254,13 @@ al_unlock_mutex(mutex);</code></pre>
 <h1 id="al_wait_cond_until"><a href="#al_wait_cond_until">al_wait_cond_until</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_wait_cond_until(ALLEGRO_COND *cond, ALLEGRO_MUTEX *mutex,
    <span class="dt">const</span> ALLEGRO_TIMEOUT *timeout)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L372">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L372">Source Code</a></p>
 <p>Like <a href="threads.html#al_wait_cond">al_wait_cond</a> but the call can return if the absolute time passes <code>timeout</code> before the condition is signalled.</p>
 <p>Returns zero on success, non-zero if the call timed out.</p>
 <p>See also: <a href="threads.html#al_wait_cond">al_wait_cond</a></p>
 <h1 id="al_broadcast_cond"><a href="#al_broadcast_cond">al_broadcast_cond</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_broadcast_cond(ALLEGRO_COND *cond)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L385">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L385">Source Code</a></p>
 <p>Unblock all threads currently waiting on a condition variable. That is, broadcast that some condition which those threads were waiting for has become true.</p>
 <p>See also: <a href="threads.html#al_signal_cond">al_signal_cond</a>.</p>
 <blockquote>
@@ -268,13 +268,13 @@ al_unlock_mutex(mutex);</code></pre>
 </blockquote>
 <h1 id="al_signal_cond"><a href="#al_signal_cond">al_signal_cond</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_signal_cond(ALLEGRO_COND *cond)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/threads.c#L395">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/threads.c#L395">Source Code</a></p>
 <p>Unblock at least one thread waiting on a condition variable.</p>
 <p>Generally you should use <a href="threads.html#al_broadcast_cond">al_broadcast_cond</a> but <a href="threads.html#al_signal_cond">al_signal_cond</a> may be more efficient when it's applicable.</p>
 <p>See also: <a href="threads.html#al_broadcast_cond">al_broadcast_cond</a>.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:42 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:23:59 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/time.html b/docs/html/refman/time.html
index d1712f4..0c49bc0 100644
--- a/docs/html/refman/time.html
+++ b/docs/html/refman/time.html
@@ -127,28 +127,28 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="allegro_timeout"><a href="#allegro_timeout">ALLEGRO_TIMEOUT</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_TIMEOUT ALLEGRO_TIMEOUT;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/altime.h#L12">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/altime.h#L12">Source Code</a></p>
 <p>Represent a timeout value. The size of the structure is known so it can be statically allocated. The contents are private.</p>
 <p>See also: <a href="time.html#al_init_timeout">al_init_timeout</a></p>
 <h1 id="al_get_time"><a href="#al_get_time">al_get_time</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">double</span> al_get_time(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/unix/utime.c#L48">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/unix/utime.c#L48">Source Code</a></p>
 <p>Return the number of seconds since the Allegro library was initialised. The return value is undefined if Allegro is uninitialised. The resolution depends on the used driver, but typically can be in the order of microseconds.</p>
 <h1 id="al_init_timeout"><a href="#al_init_timeout">al_init_timeout</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_init_timeout(ALLEGRO_TIMEOUT *timeout, <span class="dt">double</span> seconds)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/unix/utime.c#L76">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/unix/utime.c#L76">Source Code</a></p>
 <p>Set timeout value of some number of seconds after the function call.</p>
 <p>For compatibility with all platforms, <code>seconds</code> must be 2,147,483.647 seconds or less.</p>
 <p>See also: <a href="time.html#allegro_timeout">ALLEGRO_TIMEOUT</a>, <a href="events.html#al_wait_for_event_until">al_wait_for_event_until</a></p>
 <h1 id="al_rest"><a href="#al_rest">al_rest</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_rest(<span class="dt">double</span> seconds)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/unix/utime.c#L63">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/unix/utime.c#L63">Source Code</a></p>
 <p>Waits for the specified number of seconds. This tells the system to pause the current thread for the given amount of time. With some operating systems, the accuracy can be in the order of 10ms. That is, even</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_rest(<span class="fl">0.000001</span>)</code></pre>
 <p>might pause for something like 10ms. Also see the section on Timer routines for easier ways to time your program without using up all CPU.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:42 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:00 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/timer.html b/docs/html/refman/timer.html
index 5d973dd..8c7db0b 100644
--- a/docs/html/refman/timer.html
+++ b/docs/html/refman/timer.html
@@ -140,90 +140,90 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="allegro_timer"><a href="#allegro_timer">ALLEGRO_TIMER</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_TIMER ALLEGRO_TIMER;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/timer.h#L45">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/timer.h#L46">Source Code</a></p>
 <p>This is an abstract data type representing a timer object.</p>
 <h1 id="allegro_usecs_to_secs"><a href="#allegro_usecs_to_secs">ALLEGRO_USECS_TO_SECS</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_USECS_TO_SECS(x)      ((x) / 1000000.0)</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/timer.h#L28">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/timer.h#L29">Source Code</a></p>
 <p>Convert microseconds to seconds.</p>
 <h1 id="allegro_msecs_to_secs"><a href="#allegro_msecs_to_secs">ALLEGRO_MSECS_TO_SECS</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_MSECS_TO_SECS(x)      ((x) / 1000.0)</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/timer.h#L32">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/timer.h#L33">Source Code</a></p>
 <p>Convert milliseconds to seconds.</p>
 <h1 id="allegro_bps_to_secs"><a href="#allegro_bps_to_secs">ALLEGRO_BPS_TO_SECS</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_BPS_TO_SECS(x)        (1.0 / (x))</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/timer.h#L36">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/timer.h#L37">Source Code</a></p>
 <p>Convert beats per second to seconds.</p>
 <h1 id="allegro_bpm_to_secs"><a href="#allegro_bpm_to_secs">ALLEGRO_BPM_TO_SECS</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_BPM_TO_SECS(x)        (60.0 / (x))</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/timer.h#L40">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/timer.h#L41">Source Code</a></p>
 <p>Convert beats per minute to seconds.</p>
 <h1 id="al_create_timer"><a href="#al_create_timer">al_create_timer</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_TIMER *al_create_timer(<span class="dt">double</span> speed_secs)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L220">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L244">Source Code</a></p>
 <p>Allocates and initializes a timer. If successful, a pointer to a new timer object is returned, otherwise NULL is returned. <em>speed_secs</em> is in seconds per "tick", and must be positive. The new timer is initially stopped.</p>
 <p>Usage note: typical granularity is on the order of microseconds, but with some drivers might only be milliseconds.</p>
 <p>See also: <a href="timer.html#al_start_timer">al_start_timer</a>, <a href="timer.html#al_destroy_timer">al_destroy_timer</a></p>
 <h1 id="al_start_timer"><a href="#al_start_timer">al_start_timer</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_start_timer(ALLEGRO_TIMER *timer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L263">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L287">Source Code</a></p>
 <p>Start the timer specified. From then, the timer's counter will increment at a constant rate, and it will begin generating events. Starting a timer that is already started does nothing. Starting a timer that was stopped will reset the timer's counter, effectively restarting the timer from the beginning.</p>
 <p>See also: <a href="timer.html#al_stop_timer">al_stop_timer</a>, <a href="timer.html#al_get_timer_started">al_get_timer_started</a>, <a href="timer.html#al_resume_timer">al_resume_timer</a></p>
 <h1 id="al_resume_timer"><a href="#al_resume_timer">al_resume_timer</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_resume_timer(ALLEGRO_TIMER *timer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L272">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L296">Source Code</a></p>
 <p>Resume the timer specified. From then, the timer's counter will increment at a constant rate, and it will begin generating events. Resuming a timer that is already started does nothing. Resuming a stopped timer will not reset the timer's counter (unlike al_start_timer).</p>
 <p>See also: <a href="timer.html#al_start_timer">al_start_timer</a>, <a href="timer.html#al_stop_timer">al_stop_timer</a>, <a href="timer.html#al_get_timer_started">al_get_timer_started</a></p>
 <h1 id="al_stop_timer"><a href="#al_stop_timer">al_stop_timer</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_stop_timer(ALLEGRO_TIMER *timer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L281">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L305">Source Code</a></p>
 <p>Stop the timer specified. The timer's counter will stop incrementing and it will stop generating events. Stopping a timer that is already stopped does nothing.</p>
 <p>See also: <a href="timer.html#al_start_timer">al_start_timer</a>, <a href="timer.html#al_get_timer_started">al_get_timer_started</a>, <a href="timer.html#al_resume_timer">al_resume_timer</a></p>
 <h1 id="al_get_timer_started"><a href="#al_get_timer_started">al_get_timer_started</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_get_timer_started(<span class="dt">const</span> ALLEGRO_TIMER *timer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L314">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L325">Source Code</a></p>
 <p>Return true if the timer specified is currently started.</p>
 <h1 id="al_destroy_timer"><a href="#al_destroy_timer">al_destroy_timer</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_destroy_timer(ALLEGRO_TIMER *timer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L247">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L271">Source Code</a></p>
 <p>Uninstall the timer specified. If the timer is started, it will automatically be stopped before uninstallation. It will also automatically unregister the timer with any event queues.</p>
 <p>Does nothing if passed the NULL pointer.</p>
 <p>See also: <a href="timer.html#al_create_timer">al_create_timer</a></p>
 <h1 id="al_get_timer_count"><a href="#al_get_timer_count">al_get_timer_count</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int64_t</span> al_get_timer_count(<span class="dt">const</span> ALLEGRO_TIMER *timer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L357">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L368">Source Code</a></p>
 <p>Return the timer's counter value. The timer can be started or stopped.</p>
 <p>See also: <a href="timer.html#al_set_timer_count">al_set_timer_count</a></p>
 <h1 id="al_set_timer_count"><a href="#al_set_timer_count">al_set_timer_count</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_timer_count(ALLEGRO_TIMER *timer, <span class="dt">int64_t</span> new_count)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L368">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L379">Source Code</a></p>
 <p>Set the timer's counter value. The timer can be started or stopped. The count value may be positive or negative, but will always be incremented by +1 at each tick.</p>
 <p>See also: <a href="timer.html#al_get_timer_count">al_get_timer_count</a>, <a href="timer.html#al_add_timer_count">al_add_timer_count</a></p>
 <h1 id="al_add_timer_count"><a href="#al_add_timer_count">al_add_timer_count</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_add_timer_count(ALLEGRO_TIMER *timer, <span class="dt">int64_t</span> diff)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L383">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L394">Source Code</a></p>
 <p>Add <em>diff</em> to the timer's counter value. This is similar to writing:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_set_timer_count(timer, al_get_timer_count(timer) + diff);</code></pre>
 <p>except that the addition is performed atomically, so no ticks will be lost.</p>
 <p>See also: <a href="timer.html#al_set_timer_count">al_set_timer_count</a></p>
 <h1 id="al_get_timer_speed"><a href="#al_get_timer_speed">al_get_timer_speed</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">double</span> al_get_timer_speed(<span class="dt">const</span> ALLEGRO_TIMER *timer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L325">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L336">Source Code</a></p>
 <p>Return the timer's speed, in seconds. (The same value passed to <a href="timer.html#al_create_timer">al_create_timer</a> or <a href="timer.html#al_set_timer_speed">al_set_timer_speed</a>.)</p>
 <p>See also: <a href="timer.html#al_set_timer_speed">al_set_timer_speed</a></p>
 <h1 id="al_set_timer_speed"><a href="#al_set_timer_speed">al_set_timer_speed</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_timer_speed(ALLEGRO_TIMER *timer, <span class="dt">double</span> new_speed_secs)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L336">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L347">Source Code</a></p>
 <p>Set the timer's speed, i.e. the rate at which its counter will be incremented when it is started. This can be done when the timer is started or stopped. If the timer is currently running, it is made to look as though the speed change occurred precisely at the last tick.</p>
 <p><em>speed_secs</em> has exactly the same meaning as with <a href="timer.html#al_create_timer">al_create_timer</a>.</p>
 <p>See also: <a href="timer.html#al_get_timer_speed">al_get_timer_speed</a></p>
 <h1 id="al_get_timer_event_source"><a href="#al_get_timer_event_source">al_get_timer_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_timer_event_source(ALLEGRO_TIMER *timer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/timernu.c#L426">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/timernu.c#L436">Source Code</a></p>
 <p>Retrieve the associated event source. Timers will generate events of type <a href="events.html#allegro_event_timer">ALLEGRO_EVENT_TIMER</a>.</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:42 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:00 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/touch.html b/docs/html/refman/touch.html
index 4f254d3..0ad0757 100644
--- a/docs/html/refman/touch.html
+++ b/docs/html/refman/touch.html
@@ -136,17 +136,17 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <pre class="sourceCode c"><code class="sourceCode c"> <span class="ot">#include <allegro5/allegro.h></span></code></pre>
 <h1 id="allegro_touch_input"><a href="#allegro_touch_input">ALLEGRO_TOUCH_INPUT</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_TOUCH_INPUT ALLEGRO_TOUCH_INPUT;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/touch_input.h#L34">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/touch_input.h#L34">Source Code</a></p>
 <p>An abstract data type representing a physical touch screen or touch pad.</p>
 <p>Since: 5.1.0</p>
 <h1 id="allegro_touch_input_max_touch_count"><a href="#allegro_touch_input_max_touch_count">ALLEGRO_TOUCH_INPUT_MAX_TOUCH_COUNT</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="ot">#define ALLEGRO_TOUCH_INPUT_MAX_TOUCH_COUNT        16</span></code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/touch_input.h#L29">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/touch_input.h#L29">Source Code</a></p>
 <p>The maximum amount of simultaneous touches that can be detected.</p>
 <p>Since: 5.1.0</p>
 <h1 id="allegro_touch_state"><a href="#allegro_touch_state">ALLEGRO_TOUCH_STATE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_TOUCH_STATE ALLEGRO_TOUCH_STATE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/touch_input.h#L44">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/touch_input.h#L44">Source Code</a></p>
 <p>This is a structure that is used to hold a "snapshot" of a touch at a particular instant.</p>
 <p>Public fields (read only):</p>
 <ul>
@@ -161,7 +161,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Since: 5.1.0</p>
 <h1 id="allegro_touch_input_state"><a href="#allegro_touch_input_state">ALLEGRO_TOUCH_INPUT_STATE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_TOUCH_INPUT_STATE ALLEGRO_TOUCH_INPUT_STATE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/touch_input.h#L39">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/touch_input.h#L39">Source Code</a></p>
 <p>This is a structure that holds a snapshot of all simultaneous touches at a particular instant.</p>
 <p>Public fields (read only):</p>
 <ul>
@@ -170,7 +170,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Since: 5.1.0</p>
 <h1 id="allegro_mouse_emulation_mode"><a href="#allegro_mouse_emulation_mode">ALLEGRO_MOUSE_EMULATION_MODE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_MOUSE_EMULATION_MODE</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/touch_input.h#L71">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/touch_input.h#L71">Source Code</a></p>
 <p>Type of mouse emulation to apply.</p>
 <dl>
 <dt>ALLEGRO_MOUSE_EMULATION_NONE</dt>
@@ -195,30 +195,30 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 </blockquote>
 <h1 id="al_install_touch_input"><a href="#al_install_touch_input">al_install_touch_input</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_install_touch_input(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/touch_input.c#L43">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/touch_input.c#L43">Source Code</a></p>
 <p>Install a touch input driver, returning true if successful. If a touch input driver was already installed, returns true immediately.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="touch.html#al_uninstall_touch_input">al_uninstall_touch_input</a></p>
 <h1 id="al_uninstall_touch_input"><a href="#al_uninstall_touch_input">al_uninstall_touch_input</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_uninstall_touch_input(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/touch_input.c#L68">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/touch_input.c#L68">Source Code</a></p>
 <p>Uninstalls the active touch input driver. If no touch input driver was active, this function does nothing.</p>
 <p>This function is automatically called when Allegro is shut down.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="touch.html#al_install_touch_input">al_install_touch_input</a></p>
 <h1 id="al_is_touch_input_installed"><a href="#al_is_touch_input_installed">al_is_touch_input_installed</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_touch_input_installed(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/touch_input.c#L35">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/touch_input.c#L35">Source Code</a></p>
 <p>Returns true if <a href="touch.html#al_install_touch_input">al_install_touch_input</a> was called successfully.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_get_touch_input_state"><a href="#al_get_touch_input_state">al_get_touch_input_state</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_get_touch_input_state(ALLEGRO_TOUCH_INPUT_STATE *ret_state)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/touch_input.c#L93">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/touch_input.c#L93">Source Code</a></p>
 <p>Gets the current touch input state. The touch information is copied into the <a href="touch.html#allegro_touch_input_state">ALLEGRO_TOUCH_INPUT_STATE</a> you provide to this function.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_set_mouse_emulation_mode"><a href="#al_set_mouse_emulation_mode">al_set_mouse_emulation_mode</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_mouse_emulation_mode(<span class="dt">int</span> mode)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/touch_input.c#L104">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/touch_input.c#L104">Source Code</a></p>
 <p>Sets the kind of mouse emulation for the touch input subsystem to perform.</p>
 <p>Since: 5.1.0</p>
 <blockquote>
@@ -227,7 +227,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="touch.html#allegro_mouse_emulation_mode">ALLEGRO_MOUSE_EMULATION_MODE</a>, <a href="touch.html#al_get_mouse_emulation_mode">al_get_mouse_emulation_mode</a>.</p>
 <h1 id="al_get_mouse_emulation_mode"><a href="#al_get_mouse_emulation_mode">al_get_mouse_emulation_mode</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_get_mouse_emulation_mode(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/touch_input.c#L117">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/touch_input.c#L117">Source Code</a></p>
 <p>Returns the kind of mouse emulation which the touch input subsystem is set to perform.</p>
 <p>Since: 5.1.0</p>
 <blockquote>
@@ -236,13 +236,13 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="touch.html#allegro_mouse_emulation_mode">ALLEGRO_MOUSE_EMULATION_MODE</a>, <a href="touch.html#al_set_mouse_emulation_mode">al_set_mouse_emulation_mode</a>.</p>
 <h1 id="al_get_touch_input_event_source"><a href="#al_get_touch_input_event_source">al_get_touch_input_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_touch_input_event_source(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/touch_input.c#L130">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/touch_input.c#L130">Source Code</a></p>
 <p>Returns the global touch input event source. This event source generates <a href="events.html#allegro_event_touch_begin">touch input events</a>.</p>
 <p>Since: 5.1.0</p>
 <p>See also: <a href="events.html#allegro_event_source">ALLEGRO_EVENT_SOURCE</a>, <a href="events.html#al_register_event_source">al_register_event_source</a></p>
 <h1 id="al_get_touch_input_mouse_emulation_event_source"><a href="#al_get_touch_input_mouse_emulation_event_source">al_get_touch_input_mouse_emulation_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_touch_input_mouse_emulation_event_source(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/touch_input.c#L140">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/touch_input.c#L140">Source Code</a></p>
 <p>Returns the global touch input event source for emulated mouse events. This event source generates <a href="events.html#allegro_event_mouse_axes">emulated mouse events</a> that are based on touch events.</p>
 <p>See also: <a href="events.html#allegro_event_source">ALLEGRO_EVENT_SOURCE</a>, <a href="events.html#al_register_event_source">al_register_event_source</a></p>
 <p>Since: 5.1.0</p>
@@ -250,8 +250,8 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p><em><a href="getting_started.html#unstable-api">Unstable API</a>:</em> Seems of limited value, as touch input tends to have different semantics compared to mouse input.</p>
 </blockquote>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:42 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:00 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/transformations.html b/docs/html/refman/transformations.html
index 2fd791d..e0884cb 100644
--- a/docs/html/refman/transformations.html
+++ b/docs/html/refman/transformations.html
@@ -176,15 +176,15 @@ al_identity_transform(&T);
 al_compose_transform(&T, &T1);
 al_compose_transform(&T, &T2);
 
-al_use_transform(T);</code></pre>
+al_use_transform(&T);</code></pre>
 <p>it does exactly the same as:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_identity_transform(&T);
 al_scale_transform(&T, <span class="dv">2</span>, <span class="dv">2</span>);
 al_translate_transform(&T, <span class="dv">100</span>, <span class="dv">0</span>);
-al_use_transform(T);</code></pre>
+al_use_transform(&T);</code></pre>
 <h1 id="allegro_transform"><a href="#allegro_transform">ALLEGRO_TRANSFORM</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> ALLEGRO_TRANSFORM ALLEGRO_TRANSFORM;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/transformations.h#L12">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/transformations.h#L12">Source Code</a></p>
 <p>Defines the generic transformation type, a 4x4 matrix. 2D transforms use only a small subsection of this matrix, namely the top left 2x2 matrix, and the right most 2x1 matrix, for a total of 6 values.</p>
 <p><em>Fields:</em></p>
 <ul>
@@ -192,7 +192,7 @@ al_use_transform(T);</code></pre>
 </ul>
 <h1 id="al_copy_transform"><a href="#al_copy_transform">al_copy_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_copy_transform(ALLEGRO_TRANSFORM *dest, <span class="dt">const</span> ALLEGRO_TRANSFORM *src)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L30">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L30">Source Code</a></p>
 <p>Makes a copy of a transformation.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -201,7 +201,7 @@ al_use_transform(T);</code></pre>
 </ul>
 <h1 id="al_use_transform"><a href="#al_use_transform">al_use_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_use_transform(<span class="dt">const</span> ALLEGRO_TRANSFORM *trans)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L40">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L40">Source Code</a></p>
 <p>Sets the transformation to be used for the the drawing operations on the target bitmap (each bitmap maintains its own transformation). Every drawing operation after this call will be transformed using this transformation. Call this function with an identity transformation to return to the default behaviour.</p>
 <p>This function does nothing if there is no target bitmap.</p>
 <p>The parameter is passed by reference as an optimization to avoid the overhead of stack copying. The reference will not be stored in the Allegro library so it is safe to pass references to local variables.</p>
@@ -218,13 +218,13 @@ al_use_transform(T);</code></pre>
 <p>See also: <a href="transformations.html#al_get_current_transform">al_get_current_transform</a>, <a href="transformations.html#al_transform_coordinates">al_transform_coordinates</a></p>
 <h1 id="al_get_current_transform"><a href="#al_get_current_transform">al_get_current_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> ALLEGRO_TRANSFORM *al_get_current_transform(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L104">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L104">Source Code</a></p>
 <p>Returns the transformation of the current target bitmap, as set by <a href="transformations.html#al_use_transform">al_use_transform</a>. If there is no target bitmap, this function returns NULL.</p>
 <p><em>Returns:</em> A pointer to the current transformation.</p>
 <p>See also: <a href="transformations.html#al_get_current_projection_transform">al_get_current_projection_transform</a></p>
 <h1 id="al_use_projection_transform"><a href="#al_use_projection_transform">al_use_projection_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_use_projection_transform(<span class="dt">const</span> ALLEGRO_TRANSFORM *trans)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L74">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L74">Source Code</a></p>
 <p>Sets the projection transformation to be used for the the drawing operations on the target bitmap (each bitmap maintains its own projection transformation). Every drawing operation after this call will be transformed using this transformation. To return default behavior, call this function with an orthographic transform like so:</p>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_TRANSFORM trans;
 al_identity_transform(&trans);
@@ -240,20 +240,20 @@ al_use_projection_transform(&trans);</code></pre>
 <p>See also: <a href="transformations.html#al_get_current_projection_transform">al_get_current_projection_transform</a></p>
 <h1 id="al_get_current_projection_transform"><a href="#al_get_current_projection_transform">al_get_current_projection_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> ALLEGRO_TRANSFORM *al_get_current_projection_transform(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L116">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L116">Source Code</a></p>
 <p>If there is no target bitmap, this function returns NULL.</p>
 <p><em>Returns:</em> A pointer to the current transformation.</p>
 <p>Since: 5.1.9</p>
 <p>See also: <a href="transformations.html#al_use_projection_transform">al_use_projection_transform</a></p>
 <h1 id="al_get_current_inverse_transform"><a href="#al_get_current_inverse_transform">al_get_current_inverse_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> ALLEGRO_TRANSFORM *al_get_current_inverse_transform(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L128">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L128">Source Code</a></p>
 <p>Returns the inverse of the current transformation of the target bitmap. If there is no target bitmap, this function returns NULL.</p>
 <p>This is similar to calling <code>al_invert_transform(al_get_current_transform())</code> but the result of this function is cached.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_invert_transform"><a href="#al_invert_transform">al_invert_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_invert_transform(ALLEGRO_TRANSFORM *trans)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L272">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L272">Source Code</a></p>
 <p>Inverts the passed transformation. If the transformation is nearly singular (close to not having an inverse) then the returned transformation may be invalid. Use <a href="transformations.html#al_check_inverse">al_check_inverse</a> to ascertain if the transformation has an inverse before inverting it if you are in doubt.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -262,7 +262,7 @@ al_use_projection_transform(&trans);</code></pre>
 <p>See also: <a href="transformations.html#al_check_inverse">al_check_inverse</a></p>
 <h1 id="al_check_inverse"><a href="#al_check_inverse">al_check_inverse</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_check_inverse(<span class="dt">const</span> ALLEGRO_TRANSFORM *trans, <span class="dt">float</span> tol)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L293">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L293">Source Code</a></p>
 <p>Checks if the transformation has an inverse using the supplied tolerance. Tolerance should be a small value between 0 and 1, with 1e-7 being sufficient for most applications.</p>
 <p>In this function tolerance specifies how close the determinant can be to 0 (if the determinant is 0, the transformation has no inverse). Thus the smaller the tolerance you specify, the "worse" transformations will pass this test. Using a tolerance of 1e-7 will catch errors greater than 1/1000's of a pixel, but let smaller errors pass. That means that if you transformed a point by a transformation and then transformed it again by the inverse transformation that passed this ch [...]
 <p>Note that this check is superfluous most of the time if you never touched the transformation matrix values yourself. The only thing that would cause the transformation to not have an inverse is if you applied a 0 (or very small) scale to the transformation or you have a really large translation. As long as the scale is comfortably above 0, the transformation will be invertible.</p>
@@ -275,7 +275,7 @@ al_use_projection_transform(&trans);</code></pre>
 <p>See also: <a href="transformations.html#al_invert_transform">al_invert_transform</a></p>
 <h1 id="al_identity_transform"><a href="#al_identity_transform">al_identity_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_identity_transform(ALLEGRO_TRANSFORM *trans)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L145">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L145">Source Code</a></p>
 <p>Sets the transformation to be the identity transformation. This is the default transformation. Use <a href="transformations.html#al_use_transform">al_use_transform</a> on an identity transformation to return to the default.</p>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_TRANSFORM t;
 al_identity_transform(&t);
@@ -288,7 +288,7 @@ al_use_transform(&t);</code></pre>
 <h1 id="al_build_transform"><a href="#al_build_transform">al_build_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_build_transform(ALLEGRO_TRANSFORM *trans, <span class="dt">float</span> x, <span class="dt">float</span> y,
    <span class="dt">float</span> sx, <span class="dt">float</span> sy, <span class="dt">float</span> theta)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L172">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L172">Source Code</a></p>
 <p>Builds a transformation given some parameters. This call is equivalent to calling the transformations in this order: make identity, rotate, scale, translate. This method is faster, however, than actually calling those functions.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -306,7 +306,7 @@ al_use_transform(&t);</code></pre>
    <span class="dt">float</span> position_x, <span class="dt">float</span> position_y, <span class="dt">float</span> position_z,
    <span class="dt">float</span> look_x, <span class="dt">float</span> look_y, <span class="dt">float</span> look_z,
    <span class="dt">float</span> up_x, <span class="dt">float</span> up_y, <span class="dt">float</span> up_z)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L204">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L204">Source Code</a></p>
 <p>Builds a transformation which can be used to transform 3D coordinates in world space to camera space. This involves translation and a rotation. The function expects three coordinate triplets: The camera's position, the position the camera is looking at and an up vector. The up vector does not need to be of unit length and also does not need to be perpendicular to the view direction - it can usually just be the world up direction (most commonly 0/1/0).</p>
 <p>For example:</p>
 <pre class="sourceCode c"><code class="sourceCode c">al_build_camera_transform(&t,
@@ -331,7 +331,7 @@ al_use_transform(&t);</code></pre>
 <p>See also: <a href="transformations.html#al_translate_transform_3d">al_translate_transform_3d</a>, <a href="transformations.html#al_rotate_transform_3d">al_rotate_transform_3d</a>, <a href="transformations.html#al_scale_transform_3d">al_scale_transform_3d</a>, <a href="transformations.html#al_compose_transform">al_compose_transform</a>, <a href="transformations.html#al_use_transform">al_use_transform</a></p>
 <h1 id="al_translate_transform"><a href="#al_translate_transform">al_translate_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_translate_transform(ALLEGRO_TRANSFORM *trans, <span class="dt">float</span> x, <span class="dt">float</span> y)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L312">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L312">Source Code</a></p>
 <p>Apply a translation to a transformation.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -341,7 +341,7 @@ al_use_transform(&t);</code></pre>
 <p>See also: <a href="transformations.html#al_rotate_transform">al_rotate_transform</a>, <a href="transformations.html#al_scale_transform">al_scale_transform</a>, <a href="transformations.html#al_build_transform">al_build_transform</a></p>
 <h1 id="al_rotate_transform"><a href="#al_rotate_transform">al_rotate_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_rotate_transform(ALLEGRO_TRANSFORM *trans, <span class="dt">float</span> theta)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L336">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L336">Source Code</a></p>
 <p>Apply a rotation to a transformation.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -351,7 +351,7 @@ al_use_transform(&t);</code></pre>
 <p>See also: <a href="transformations.html#al_translate_transform">al_translate_transform</a>, <a href="transformations.html#al_scale_transform">al_scale_transform</a>, <a href="transformations.html#al_build_transform">al_build_transform</a></p>
 <h1 id="al_scale_transform"><a href="#al_scale_transform">al_scale_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_scale_transform(ALLEGRO_TRANSFORM *trans, <span class="dt">float</span> sx, <span class="dt">float</span> sy)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L360">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L360">Source Code</a></p>
 <p>Apply a scale to a transformation.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -361,7 +361,7 @@ al_use_transform(&t);</code></pre>
 <p>See also: <a href="transformations.html#al_translate_transform">al_translate_transform</a>, <a href="transformations.html#al_rotate_transform">al_rotate_transform</a>, <a href="transformations.html#al_build_transform">al_build_transform</a></p>
 <h1 id="al_transform_coordinates"><a href="#al_transform_coordinates">al_transform_coordinates</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_transform_coordinates(<span class="dt">const</span> ALLEGRO_TRANSFORM *trans, <span class="dt">float</span> *x, <span class="dt">float</span> *y)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L401">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L401">Source Code</a></p>
 <p>Transform a pair of coordinates.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -372,7 +372,7 @@ al_use_transform(&t);</code></pre>
 <h1 id="al_transform_coordinates_3d"><a href="#al_transform_coordinates_3d">al_transform_coordinates_3d</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_transform_coordinates_3d(<span class="dt">const</span> ALLEGRO_TRANSFORM *trans,
    <span class="dt">float</span> *x, <span class="dt">float</span> *y, <span class="dt">float</span> *z)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L416">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L416">Source Code</a></p>
 <p>Transform x, y, z coordinates.</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -383,7 +383,7 @@ al_use_transform(&t);</code></pre>
 <p>See also: <a href="transformations.html#al_use_transform">al_use_transform</a>, <a href="transformations.html#al_transform_coordinates">al_transform_coordinates</a></p>
 <h1 id="al_compose_transform"><a href="#al_compose_transform">al_compose_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_compose_transform(ALLEGRO_TRANSFORM *trans, <span class="dt">const</span> ALLEGRO_TRANSFORM *other)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L440">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L440">Source Code</a></p>
 <p>Compose (combine) two transformations by a matrix multiplication.</p>
 <pre><code>trans := trans other</code></pre>
 <p>Note that the order of matrix multiplications is important. The effect of applying the combined transform will be as if first applying <code>trans</code> and then applying <code>other</code> and not the other way around.</p>
@@ -397,7 +397,7 @@ al_use_transform(&t);</code></pre>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_orthographic_transform(ALLEGRO_TRANSFORM *trans,
    <span class="dt">float</span> left, <span class="dt">float</span> top, <span class="dt">float</span> n,
    <span class="dt">float</span> right, <span class="dt">float</span> bottom, <span class="dt">float</span> f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L486">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L486">Source Code</a></p>
 <p>Combines the given transformation with an orthographic transformation which maps the screen rectangle to the given left/top and right/bottom coordinates. near/far is the z-buffer range, if there is no z-buffer you can set it to -1/1.</p>
 <p>Since: 5.1.3</p>
 <p>See also: <a href="transformations.html#al_use_projection_transform">al_use_projection_transform</a>, <a href="transformations.html#al_perspective_transform">al_perspective_transform</a></p>
@@ -405,7 +405,7 @@ al_use_transform(&t);</code></pre>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_perspective_transform(ALLEGRO_TRANSFORM *trans,
    <span class="dt">float</span> left, <span class="dt">float</span> top, <span class="dt">float</span> n,
    <span class="dt">float</span> right, <span class="dt">float</span> bottom, <span class="dt">float</span> f)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L547">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L547">Source Code</a></p>
 <p>Like <a href="transformations.html#al_orthographic_transform">al_orthographic_transform</a> but honors perspective. If everything is at a z-position of -near it will look the same as with an orthographic transformation.</p>
 <p>To use a specific horizontal field of view you can use the relation:</p>
 <pre><code>tan(hfov / 2) = (right - left) / 2 / near</code></pre>
@@ -414,26 +414,26 @@ al_use_transform(&t);</code></pre>
 <h1 id="al_translate_transform_3d"><a href="#al_translate_transform_3d">al_translate_transform_3d</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_translate_transform_3d(ALLEGRO_TRANSFORM *trans, <span class="dt">float</span> x, <span class="dt">float</span> y,
     <span class="dt">float</span> z)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L323">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L323">Source Code</a></p>
 <p>Combines the given transformation with a transformation which translates coordinates by the given vector.</p>
 <p>Since: 5.1.3</p>
 <p>See also: <a href="transformations.html#al_use_projection_transform">al_use_projection_transform</a></p>
 <h1 id="al_scale_transform_3d"><a href="#al_scale_transform_3d">al_scale_transform_3d</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_scale_transform_3d(ALLEGRO_TRANSFORM *trans, <span class="dt">float</span> sx, <span class="dt">float</span> sy,
     <span class="dt">float</span> sz)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L377">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L377">Source Code</a></p>
 <p>Combines the given transformation with a transformation which scales coordinates by the given vector.</p>
 <p>Since: 5.1.3</p>
 <p>See also: <a href="transformations.html#al_use_projection_transform">al_use_projection_transform</a></p>
 <h1 id="al_rotate_transform_3d"><a href="#al_rotate_transform_3d">al_rotate_transform_3d</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_rotate_transform_3d(ALLEGRO_TRANSFORM *trans,
    <span class="dt">float</span> x, <span class="dt">float</span> y, <span class="dt">float</span> z, <span class="dt">float</span> angle)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L511">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L511">Source Code</a></p>
 <p>Combines the given transformation with a transformation which rotates coordinates around the given vector by the given angle in radians.</p>
 <p>Since: 5.1.3</p>
 <h1 id="al_horizontal_shear_transform"><a href="#al_horizontal_shear_transform">al_horizontal_shear_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_horizontal_shear_transform(ALLEGRO_TRANSFORM* trans, <span class="dt">float</span> theta)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L572">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L572">Source Code</a></p>
 <p>Apply a horizontal shear to the transform</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -444,7 +444,7 @@ al_use_transform(&t);</code></pre>
 <p>See also: <a href="transformations.html#al_vertical_shear_transform">al_vertical_shear_transform</a></p>
 <h1 id="al_vertical_shear_transform"><a href="#al_vertical_shear_transform">al_vertical_shear_transform</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_vertical_shear_transform(ALLEGRO_TRANSFORM* trans, <span class="dt">float</span> theta)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/transformations.c#L586">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/transformations.c#L586">Source Code</a></p>
 <p>Apply a vertical shear to the transform</p>
 <p><em>Parameters:</em></p>
 <ul>
@@ -454,8 +454,8 @@ al_use_transform(&t);</code></pre>
 <p>Since: 5.1.7</p>
 <p>See also: <a href="transformations.html#al_horizontal_shear_transform">al_horizontal_shear_transform</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:42 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:00 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/utf8.html b/docs/html/refman/utf8.html
index 7f1ccdd..8323433 100644
--- a/docs/html/refman/utf8.html
+++ b/docs/html/refman/utf8.html
@@ -247,27 +247,27 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <h1 id="utf-8-string-types"><a href="#utf-8-string-types">UTF-8 string types</a></h1>
 <h2 id="allegro_ustr"><a href="#allegro_ustr">ALLEGRO_USTR</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> _al_tagbstring ALLEGRO_USTR;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/utf8.h#L12">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/utf8.h#L12">Source Code</a></p>
 <p>An opaque type representing a string. ALLEGRO_USTRs normally contain UTF-8 encoded strings, but they may be used to hold any byte sequences, including NULs.</p>
 <h2 id="allegro_ustr_info"><a href="#allegro_ustr_info">ALLEGRO_USTR_INFO</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">struct</span> _al_tagbstring ALLEGRO_USTR_INFO;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/include/allegro5/utf8.h#L16">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/include/allegro5/utf8.h#L16">Source Code</a></p>
 <p>A type that holds additional information for an <a href="utf8.html#allegro_ustr">ALLEGRO_USTR</a> that references an external memory buffer.</p>
 <p>See also: <a href="utf8.html#al_ref_cstr">al_ref_cstr</a>, <a href="utf8.html#al_ref_buffer">al_ref_buffer</a> and <a href="utf8.html#al_ref_ustr">al_ref_ustr</a>.</p>
 <h1 id="creating-and-destroying-strings"><a href="#creating-and-destroying-strings">Creating and destroying strings</a></h1>
 <h2 id="al_ustr_new"><a href="#al_ustr_new">al_ustr_new</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_USTR *al_ustr_new(<span class="dt">const</span> <span class="dt">char</span> *s)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L62">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L62">Source Code</a></p>
 <p>Create a new string containing a copy of the C-style string <code>s</code>. The string must eventually be freed with <a href="utf8.html#al_ustr_free">al_ustr_free</a>.</p>
 <p>See also: <a href="utf8.html#al_ustr_new_from_buffer">al_ustr_new_from_buffer</a>, <a href="utf8.html#al_ustr_newf">al_ustr_newf</a>, <a href="utf8.html#al_ustr_dup">al_ustr_dup</a>, <a href="utf8.html#al_ustr_new_from_utf16">al_ustr_new_from_utf16</a></p>
 <h2 id="al_ustr_new_from_buffer"><a href="#al_ustr_new_from_buffer">al_ustr_new_from_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_USTR *al_ustr_new_from_buffer(<span class="dt">const</span> <span class="dt">char</span> *s, size_t size)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L70">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L70">Source Code</a></p>
 <p>Create a new string containing a copy of the buffer pointed to by <code>s</code> of the given <code>size</code> in bytes. The string must eventually be freed with <a href="utf8.html#al_ustr_free">al_ustr_free</a>.</p>
 <p>See also: <a href="utf8.html#al_ustr_new">al_ustr_new</a></p>
 <h2 id="al_ustr_newf"><a href="#al_ustr_newf">al_ustr_newf</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_USTR *al_ustr_newf(<span class="dt">const</span> <span class="dt">char</span> *fmt, ...)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L78">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L78">Source Code</a></p>
 <p>Create a new string using a printf-style format string.</p>
 <p><em>Notes:</em></p>
 <p>The "%s" specifier takes C string arguments, not ALLEGRO_USTRs. Therefore to pass an ALLEGRO_USTR as a parameter you must use <a href="utf8.html#al_cstr">al_cstr</a>, and it must be NUL terminated. If the string contains an embedded NUL byte everything from that byte onwards will be ignored.</p>
@@ -275,12 +275,12 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="utf8.html#al_ustr_new">al_ustr_new</a>, <a href="utf8.html#al_ustr_appendf">al_ustr_appendf</a></p>
 <h2 id="al_ustr_free"><a href="#al_ustr_free">al_ustr_free</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_ustr_free(ALLEGRO_USTR *us)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L93">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L93">Source Code</a></p>
 <p>Free a previously allocated string. Does nothing if the argument is NULL.</p>
 <p>See also: <a href="utf8.html#al_ustr_new">al_ustr_new</a>, <a href="utf8.html#al_ustr_new_from_buffer">al_ustr_new_from_buffer</a>, <a href="utf8.html#al_ustr_newf">al_ustr_newf</a></p>
 <h2 id="al_cstr"><a href="#al_cstr">al_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> <span class="dt">char</span> *al_cstr(<span class="dt">const</span> ALLEGRO_USTR *us)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L101">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L101">Source Code</a></p>
 <p>Get a <code>char *</code> pointer to the data in a string. This pointer will only be valid while the <a href="utf8.html#allegro_ustr">ALLEGRO_USTR</a> object is not modified and not destroyed. The pointer may be passed to functions expecting C-style strings, with the following caveats:</p>
 <ul>
 <li><p>ALLEGRO_USTRs are allowed to contain embedded NUL (<code>'\0'</code>) bytes. That means <code>al_ustr_size(u)</code> and <code>strlen(al_cstr(u))</code> may not agree.</p></li>
@@ -290,36 +290,36 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>See also: <a href="utf8.html#al_ustr_to_buffer">al_ustr_to_buffer</a>, <a href="utf8.html#al_cstr_dup">al_cstr_dup</a></p>
 <h2 id="al_ustr_to_buffer"><a href="#al_ustr_to_buffer">al_ustr_to_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_ustr_to_buffer(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">char</span> *buffer, <span class="dt">int</span> size)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L110">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L110">Source Code</a></p>
 <p>Write the contents of the string into a pre-allocated buffer of the given size in bytes. The result will always be NUL terminated, so a maximum of <code>size - 1</code> bytes will be copied.</p>
 <p>See also: <a href="utf8.html#al_cstr">al_cstr</a>, <a href="utf8.html#al_cstr_dup">al_cstr_dup</a></p>
 <h2 id="al_cstr_dup"><a href="#al_cstr_dup">al_cstr_dup</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">char</span> *al_cstr_dup(<span class="dt">const</span> ALLEGRO_USTR *us)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L126">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L126">Source Code</a></p>
 <p>Create a NUL (<code>'\0'</code>) terminated copy of the string. Any embedded NUL bytes will still be presented in the returned string. The new string must eventually be freed with <a href="memory.html#al_free">al_free</a>.</p>
 <p>If an error occurs NULL is returned.</p>
 <p>See also: <a href="utf8.html#al_cstr">al_cstr</a>, <a href="utf8.html#al_ustr_to_buffer">al_ustr_to_buffer</a>, <a href="memory.html#al_free">al_free</a></p>
 <h2 id="al_ustr_dup"><a href="#al_ustr_dup">al_ustr_dup</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_USTR *al_ustr_dup(<span class="dt">const</span> ALLEGRO_USTR *us)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L134">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L134">Source Code</a></p>
 <p>Return a duplicate copy of a string. The new string will need to be freed with <a href="utf8.html#al_ustr_free">al_ustr_free</a>.</p>
 <p>See also: <a href="utf8.html#al_ustr_dup_substr">al_ustr_dup_substr</a>, <a href="utf8.html#al_ustr_free">al_ustr_free</a></p>
 <h2 id="al_ustr_dup_substr"><a href="#al_ustr_dup_substr">al_ustr_dup_substr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_USTR *al_ustr_dup_substr(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> start_pos,
    <span class="dt">int</span> end_pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L142">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L142">Source Code</a></p>
 <p>Return a new copy of a string, containing its contents in the byte interval [<code>start_pos</code>, <code>end_pos</code>). The new string will be NUL terminated and will need to be freed with <a href="utf8.html#al_ustr_free">al_ustr_free</a>.</p>
 <p>If necessary, use <a href="utf8.html#al_ustr_offset">al_ustr_offset</a> to find the byte offsets for a given code point that you are interested in.</p>
 <p>See also: <a href="utf8.html#al_ustr_dup">al_ustr_dup</a>, <a href="utf8.html#al_ustr_free">al_ustr_free</a></p>
 <h1 id="predefined-strings"><a href="#predefined-strings">Predefined strings</a></h1>
 <h2 id="al_ustr_empty_string"><a href="#al_ustr_empty_string">al_ustr_empty_string</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> ALLEGRO_USTR *al_ustr_empty_string(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L151">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L151">Source Code</a></p>
 <p>Return a pointer to a static empty string. The string is read only and must not be freed.</p>
 <h1 id="creating-strings-by-referencing-other-data"><a href="#creating-strings-by-referencing-other-data">Creating strings by referencing other data</a></h1>
 <h2 id="al_ref_cstr"><a href="#al_ref_cstr">al_ref_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> ALLEGRO_USTR *al_ref_cstr(ALLEGRO_USTR_INFO *info, <span class="dt">const</span> <span class="dt">char</span> *s)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L160">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L160">Source Code</a></p>
 <p>Create a string that references the storage of a C-style string. The information about the string (e.g. its size) is stored in the structure pointed to by the <code>info</code> parameter. The string will not have any other storage allocated of its own, so if you allocate the <code>info</code> structure on the stack then no explicit "free" operation is required.</p>
 <p>The string is valid until the underlying C string disappears.</p>
 <p>Example:</p>
@@ -328,14 +328,14 @@ ALLEGRO_USTR *us = al_ref_cstr(&info, <span class="st">"my string"
 <p>See also: <a href="utf8.html#al_ref_buffer">al_ref_buffer</a>, <a href="utf8.html#al_ref_ustr">al_ref_ustr</a></p>
 <h2 id="al_ref_buffer"><a href="#al_ref_buffer">al_ref_buffer</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> ALLEGRO_USTR *al_ref_buffer(ALLEGRO_USTR_INFO *info, <span class="dt">const</span> <span class="dt">char</span> *s, size_t size)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L173">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L173">Source Code</a></p>
 <p>Create a string that references the storage of an underlying buffer. The size of the buffer is given in bytes. You can use it to reference only part of a string or an arbitrary region of memory.</p>
 <p>The string is valid while the underlying memory buffer is valid.</p>
 <p>See also: <a href="utf8.html#al_ref_cstr">al_ref_cstr</a>, <a href="utf8.html#al_ref_ustr">al_ref_ustr</a></p>
 <h2 id="al_ref_ustr"><a href="#al_ref_ustr">al_ref_ustr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">const</span> ALLEGRO_USTR *al_ref_ustr(ALLEGRO_USTR_INFO *info, <span class="dt">const</span> ALLEGRO_USTR *us,
    <span class="dt">int</span> start_pos, <span class="dt">int</span> end_pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L185">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L185">Source Code</a></p>
 <p>Create a read-only string that references the storage of another <a href="utf8.html#allegro_ustr">ALLEGRO_USTR</a> string. The information about the string (e.g. its size) is stored in the structure pointed to by the <code>info</code> parameter. The new string will not have any other storage allocated of its own, so if you allocate the <code>info</code> structure on the stack then no explicit "free" operation is required.</p>
 <p>The referenced interval is [<code>start_pos</code>, <code>end_pos</code>). Both are byte offsets.</p>
 <p>The string is valid until the underlying string is modified or destroyed.</p>
@@ -344,75 +344,75 @@ ALLEGRO_USTR *us = al_ref_cstr(&info, <span class="st">"my string"
 <h1 id="sizes-and-offsets"><a href="#sizes-and-offsets">Sizes and offsets</a></h1>
 <h2 id="al_ustr_size"><a href="#al_ustr_size">al_ustr_size</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_ustr_size(<span class="dt">const</span> ALLEGRO_USTR *us)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L197">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L197">Source Code</a></p>
 <p>Return the size of the string in bytes. This is equal to the number of code points in the string if the string is empty or contains only 7-bit ASCII characters.</p>
 <p>See also: <a href="utf8.html#al_ustr_length">al_ustr_length</a></p>
 <h2 id="al_ustr_length"><a href="#al_ustr_length">al_ustr_length</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_ustr_length(<span class="dt">const</span> ALLEGRO_USTR *us)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L205">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L205">Source Code</a></p>
 <p>Return the number of code points in the string.</p>
 <p>See also: <a href="utf8.html#al_ustr_size">al_ustr_size</a>, <a href="utf8.html#al_ustr_offset">al_ustr_offset</a></p>
 <h2 id="al_ustr_offset"><a href="#al_ustr_offset">al_ustr_offset</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_offset(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> index)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L219">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L219">Source Code</a></p>
 <p>Return the byte offset (from the start of the string) of the code point at the specified index in the string. A zero index parameter will return the first character of the string. If index is negative, it counts backward from the end of the string, so an index of -1 will return an offset to the last code point.</p>
 <p>If the index is past the end of the string, returns the offset of the end of the string.</p>
 <p>See also: <a href="utf8.html#al_ustr_length">al_ustr_length</a></p>
 <h2 id="al_ustr_next"><a href="#al_ustr_next">al_ustr_next</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_next(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> *pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L237">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L237">Source Code</a></p>
 <p>Find the byte offset of the next code point in string, beginning at <code>*pos</code>. <code>*pos</code> does not have to be at the beginning of a code point.</p>
 <p>Returns true on success, and the value pointed to by <code>pos</code> will be updated to the found offset. Otherwise returns false if <code>*pos</code> was already at the end of the string, and <code>*pos</code> is unmodified.</p>
 <p>This function just looks for an appropriate byte; it doesn't check if found offset is the beginning of a valid code point. If you are working with possibly invalid UTF-8 strings then it could skip over some invalid bytes.</p>
 <p>See also: <a href="utf8.html#al_ustr_prev">al_ustr_prev</a></p>
 <h2 id="al_ustr_prev"><a href="#al_ustr_prev">al_ustr_prev</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_prev(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> *pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L259">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L259">Source Code</a></p>
 <p>Find the byte offset of the previous code point in string, before <code>*pos</code>. <code>*pos</code> does not have to be at the beginning of a code point. Returns true on success, and the value pointed to by <code>pos</code> will be updated to the found offset. Otherwise returns false if <code>*pos</code> was already at the end of the string, and <code>*pos</code> is unmodified.</p>
 <p>This function just looks for an appropriate byte; it doesn't check if found offset is the beginning of a valid code point. If you are working with possibly invalid UTF-8 strings then it could skip over some invalid bytes.</p>
 <p>See also: <a href="utf8.html#al_ustr_next">al_ustr_next</a></p>
 <h1 id="getting-code-points"><a href="#getting-code-points">Getting code points</a></h1>
 <h2 id="al_ustr_get"><a href="#al_ustr_get">al_ustr_get</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int32_t</span> al_ustr_get(<span class="dt">const</span> ALLEGRO_USTR *ub, <span class="dt">int</span> pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L280">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L280">Source Code</a></p>
 <p>Return the code point in <code>ub</code> beginning at byte offset <code>pos</code>.</p>
 <p>On success returns the code point value. If <code>pos</code> was out of bounds (e.g. past the end of the string), return -1. On an error, such as an invalid byte sequence, return -2.</p>
 <p>See also: <a href="utf8.html#al_ustr_get_next">al_ustr_get_next</a>, <a href="utf8.html#al_ustr_prev_get">al_ustr_prev_get</a></p>
 <h2 id="al_ustr_get_next"><a href="#al_ustr_get_next">al_ustr_get_next</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int32_t</span> al_ustr_get_next(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> *pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L365">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L365">Source Code</a></p>
 <p>Find the code point in <code>us</code> beginning at byte offset <code>*pos</code>, then advance to the next code point.</p>
 <p>On success return the code point value. If <code>pos</code> was out of bounds (e.g. past the end of the string), return -1. On an error, such as an invalid byte sequence, return -2. As with <a href="utf8.html#al_ustr_next">al_ustr_next</a>, invalid byte sequences may be skipped while advancing.</p>
 <p>See also: <a href="utf8.html#al_ustr_get">al_ustr_get</a>, <a href="utf8.html#al_ustr_prev_get">al_ustr_prev_get</a></p>
 <h2 id="al_ustr_prev_get"><a href="#al_ustr_prev_get">al_ustr_prev_get</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int32_t</span> al_ustr_prev_get(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> *pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L387">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L387">Source Code</a></p>
 <p>Find the beginning of a code point before byte offset <code>*pos</code>, then return it. Note this performs a <em>pre-increment</em>.</p>
 <p>On success returns the code point value. If <code>pos</code> was out of bounds (e.g. past the end of the string), return -1. On an error, such as an invalid byte sequence, return -2. As with <a href="utf8.html#al_ustr_prev">al_ustr_prev</a>, invalid byte sequences may be skipped while advancing.</p>
 <p>See also: <a href="utf8.html#al_ustr_get_next">al_ustr_get_next</a></p>
 <h1 id="inserting-into-strings"><a href="#inserting-into-strings">Inserting into strings</a></h1>
 <h2 id="al_ustr_insert"><a href="#al_ustr_insert">al_ustr_insert</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_insert(ALLEGRO_USTR *us1, <span class="dt">int</span> pos, <span class="dt">const</span> ALLEGRO_USTR *us2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L400">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L400">Source Code</a></p>
 <p>Insert <code>us2</code> into <code>us1</code> beginning at byte offset <code>pos</code>. <code>pos</code> cannot be less than 0. If <code>pos</code> is past the end of <code>us1</code> then the space between the end of the string and <code>pos</code> will be padded with NUL (<code>'\0'</code>) bytes.</p>
 <p>If required, use <a href="utf8.html#al_ustr_offset">al_ustr_offset</a> to find the byte offset for a given code point index.</p>
 <p>Returns true on success, false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_insert_cstr">al_ustr_insert_cstr</a>, <a href="utf8.html#al_ustr_insert_chr">al_ustr_insert_chr</a>, <a href="utf8.html#al_ustr_append">al_ustr_append</a>, <a href="utf8.html#al_ustr_offset">al_ustr_offset</a></p>
 <h2 id="al_ustr_insert_cstr"><a href="#al_ustr_insert_cstr">al_ustr_insert_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_insert_cstr(ALLEGRO_USTR *us, <span class="dt">int</span> pos, <span class="dt">const</span> <span class="dt">char</span> *s)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L408">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L408">Source Code</a></p>
 <p>Like <a href="utf8.html#al_ustr_insert">al_ustr_insert</a> but inserts a C-style string at byte offset <code>pos</code>.</p>
 <p>See also: <a href="utf8.html#al_ustr_insert">al_ustr_insert</a>, <a href="utf8.html#al_ustr_insert_chr">al_ustr_insert_chr</a></p>
 <h2 id="al_ustr_insert_chr"><a href="#al_ustr_insert_chr">al_ustr_insert_chr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_ustr_insert_chr(ALLEGRO_USTR *us, <span class="dt">int</span> pos, <span class="dt">int32_t</span> c)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L418">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L418">Source Code</a></p>
 <p>Insert a code point into <code>us</code> beginning at byte offset <code>pos</code>. <code>pos</code> cannot be less than 0. If <code>pos</code> is past the end of <code>us</code> then the space between the end of the string and <code>pos</code> will be padded with NUL (<code>'\0'</code>) bytes.</p>
 <p>Returns the number of bytes inserted, or 0 on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_insert">al_ustr_insert</a>, <a href="utf8.html#al_ustr_insert_cstr">al_ustr_insert_cstr</a></p>
 <h1 id="appending-to-strings"><a href="#appending-to-strings">Appending to strings</a></h1>
 <h2 id="al_ustr_append"><a href="#al_ustr_append">al_ustr_append</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_append(ALLEGRO_USTR *us1, <span class="dt">const</span> ALLEGRO_USTR *us2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L438">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L438">Source Code</a></p>
 <p>Append <code>us2</code> to the end of <code>us1</code>.</p>
 <p>Returns true on success, false on error.</p>
 <p>This function can be used to append an arbitrary buffer:</p>
@@ -421,95 +421,95 @@ ALLEGRO_USTR *us = al_ref_cstr(&info, <span class="st">"my string"
 <p>See also: <a href="utf8.html#al_ustr_append_cstr">al_ustr_append_cstr</a>, <a href="utf8.html#al_ustr_append_chr">al_ustr_append_chr</a>, <a href="utf8.html#al_ustr_appendf">al_ustr_appendf</a>, <a href="utf8.html#al_ustr_vappendf">al_ustr_vappendf</a></p>
 <h2 id="al_ustr_append_cstr"><a href="#al_ustr_append_cstr">al_ustr_append_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_append_cstr(ALLEGRO_USTR *us, <span class="dt">const</span> <span class="dt">char</span> *s)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L446">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L446">Source Code</a></p>
 <p>Append C-style string <code>s</code> to the end of <code>us</code>.</p>
 <p>Returns true on success, false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_append">al_ustr_append</a></p>
 <h2 id="al_ustr_append_chr"><a href="#al_ustr_append_chr">al_ustr_append_chr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_ustr_append_chr(ALLEGRO_USTR *us, <span class="dt">int32_t</span> c)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L454">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L454">Source Code</a></p>
 <p>Append a code point to the end of <code>us</code>.</p>
 <p>Returns the number of bytes added, or 0 on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_append">al_ustr_append</a></p>
 <h2 id="al_ustr_appendf"><a href="#al_ustr_appendf">al_ustr_appendf</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_appendf(ALLEGRO_USTR *us, <span class="dt">const</span> <span class="dt">char</span> *fmt, ...)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L468">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L468">Source Code</a></p>
 <p>This function appends formatted output to the string <code>us</code>. <code>fmt</code> is a printf-style format string. See <a href="utf8.html#al_ustr_newf">al_ustr_newf</a> about the "%s" and "%c" specifiers.</p>
 <p>Returns true on success, false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_vappendf">al_ustr_vappendf</a>, <a href="utf8.html#al_ustr_append">al_ustr_append</a></p>
 <h2 id="al_ustr_vappendf"><a href="#al_ustr_vappendf">al_ustr_vappendf</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_vappendf(ALLEGRO_USTR *us, <span class="dt">const</span> <span class="dt">char</span> *fmt, va_list ap)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L482">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L482">Source Code</a></p>
 <p>Like <a href="utf8.html#al_ustr_appendf">al_ustr_appendf</a> but you pass the variable argument list directly, instead of the arguments themselves. See <a href="utf8.html#al_ustr_newf">al_ustr_newf</a> about the "%s" and "%c" specifiers.</p>
 <p>Returns true on success, false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_appendf">al_ustr_appendf</a>, <a href="utf8.html#al_ustr_append">al_ustr_append</a></p>
 <h1 id="removing-parts-of-strings"><a href="#removing-parts-of-strings">Removing parts of strings</a></h1>
 <h2 id="al_ustr_remove_chr"><a href="#al_ustr_remove_chr">al_ustr_remove_chr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_remove_chr(ALLEGRO_USTR *us, <span class="dt">int</span> pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L518">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L518">Source Code</a></p>
 <p>Remove the code point beginning at byte offset <code>pos</code>. Returns true on success. If <code>pos</code> is out of range or <code>pos</code> is not the beginning of a valid code point, returns false leaving the string unmodified.</p>
 <p>Use <a href="utf8.html#al_ustr_offset">al_ustr_offset</a> to find the byte offset for a code-points offset.</p>
 <p>See also: <a href="utf8.html#al_ustr_remove_range">al_ustr_remove_range</a></p>
 <h2 id="al_ustr_remove_range"><a href="#al_ustr_remove_range">al_ustr_remove_range</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_remove_range(ALLEGRO_USTR *us, <span class="dt">int</span> start_pos, <span class="dt">int</span> end_pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L534">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L534">Source Code</a></p>
 <p>Remove the interval [<code>start_pos</code>, <code>end_pos</code>) from a string. <code>start_pos</code> and <code>end_pos</code> are byte offsets. Both may be past the end of the string but cannot be less than 0 (the start of the string).</p>
 <p>Returns true on success, false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_remove_chr">al_ustr_remove_chr</a>, <a href="utf8.html#al_ustr_truncate">al_ustr_truncate</a></p>
 <h2 id="al_ustr_truncate"><a href="#al_ustr_truncate">al_ustr_truncate</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_truncate(ALLEGRO_USTR *us, <span class="dt">int</span> start_pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L542">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L542">Source Code</a></p>
 <p>Truncate a portion of a string from byte offset <code>start_pos</code> onwards. <code>start_pos</code> can be past the end of the string (has no effect) but cannot be less than 0.</p>
 <p>Returns true on success, false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_remove_range">al_ustr_remove_range</a>, <a href="utf8.html#al_ustr_ltrim_ws">al_ustr_ltrim_ws</a>, <a href="utf8.html#al_ustr_rtrim_ws">al_ustr_rtrim_ws</a>, <a href="utf8.html#al_ustr_trim_ws">al_ustr_trim_ws</a></p>
 <h2 id="al_ustr_ltrim_ws"><a href="#al_ustr_ltrim_ws">al_ustr_ltrim_ws</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_ltrim_ws(ALLEGRO_USTR *us)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L550">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L550">Source Code</a></p>
 <p>Remove leading whitespace characters from a string, as defined by the C function <code>isspace()</code>.</p>
 <p>Returns true on success, or false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_rtrim_ws">al_ustr_rtrim_ws</a>, <a href="utf8.html#al_ustr_trim_ws">al_ustr_trim_ws</a></p>
 <h2 id="al_ustr_rtrim_ws"><a href="#al_ustr_rtrim_ws">al_ustr_rtrim_ws</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_rtrim_ws(ALLEGRO_USTR *us)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L558">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L558">Source Code</a></p>
 <p>Remove trailing ("right") whitespace characters from a string, as defined by the C function <code>isspace()</code>.</p>
 <p>Returns true on success, or false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_ltrim_ws">al_ustr_ltrim_ws</a>, <a href="utf8.html#al_ustr_trim_ws">al_ustr_trim_ws</a></p>
 <h2 id="al_ustr_trim_ws"><a href="#al_ustr_trim_ws">al_ustr_trim_ws</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_trim_ws(ALLEGRO_USTR *us)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L566">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L566">Source Code</a></p>
 <p>Remove both leading and trailing whitespace characters from a string.</p>
 <p>Returns true on success, or false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_ltrim_ws">al_ustr_ltrim_ws</a>, <a href="utf8.html#al_ustr_rtrim_ws">al_ustr_rtrim_ws</a></p>
 <h1 id="assigning-one-string-to-another"><a href="#assigning-one-string-to-another">Assigning one string to another</a></h1>
 <h2 id="al_ustr_assign"><a href="#al_ustr_assign">al_ustr_assign</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_assign(ALLEGRO_USTR *us1, <span class="dt">const</span> ALLEGRO_USTR *us2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L574">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L574">Source Code</a></p>
 <p>Overwrite the string <code>us1</code> with another string <code>us2</code>. Returns true on success, false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_assign_substr">al_ustr_assign_substr</a>, <a href="utf8.html#al_ustr_assign_cstr">al_ustr_assign_cstr</a></p>
 <h2 id="al_ustr_assign_substr"><a href="#al_ustr_assign_substr">al_ustr_assign_substr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_assign_substr(ALLEGRO_USTR *us1, <span class="dt">const</span> ALLEGRO_USTR *us2,
    <span class="dt">int</span> start_pos, <span class="dt">int</span> end_pos)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L582">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L582">Source Code</a></p>
 <p>Overwrite the string <code>us1</code> with the contents of <code>us2</code> in the byte interval [<code>start_pos</code>, <code>end_pos</code>). The end points will be clamped to the bounds of <code>us2</code>.</p>
 <p>Usually you will first have to use <a href="utf8.html#al_ustr_offset">al_ustr_offset</a> to find the byte offsets.</p>
 <p>Returns true on success, false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_assign">al_ustr_assign</a>, <a href="utf8.html#al_ustr_assign_cstr">al_ustr_assign_cstr</a></p>
 <h2 id="al_ustr_assign_cstr"><a href="#al_ustr_assign_cstr">al_ustr_assign_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_assign_cstr(ALLEGRO_USTR *us1, <span class="dt">const</span> <span class="dt">char</span> *s)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L592">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L592">Source Code</a></p>
 <p>Overwrite the string <code>us1</code> with the contents of the C-style string <code>s</code>. Returns true on success, false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_assign_substr">al_ustr_assign_substr</a>, <a href="utf8.html#al_ustr_assign_cstr">al_ustr_assign_cstr</a></p>
 <h1 id="replacing-parts-of-string"><a href="#replacing-parts-of-string">Replacing parts of string</a></h1>
 <h2 id="al_ustr_set_chr"><a href="#al_ustr_set_chr">al_ustr_set_chr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_ustr_set_chr(ALLEGRO_USTR *us, <span class="dt">int</span> start_pos, <span class="dt">int32_t</span> c)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L600">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L600">Source Code</a></p>
 <p>Replace the code point beginning at byte offset <code>start_pos</code> with <code>c</code>. <code>start_pos</code> cannot be less than 0. If <code>start_pos</code> is past the end of <code>us</code> then the space between the end of the string and <code>start_pos</code> will be padded with NUL (<code>'\0'</code>) bytes. If <code>start_pos</code> is not the start of a valid code point, that is an error and the string will be unmodified.</p>
 <p>On success, returns the number of bytes written, i.e. the offset to the following code point. On error, returns 0.</p>
 <p>See also: <a href="utf8.html#al_ustr_replace_range">al_ustr_replace_range</a></p>
 <h2 id="al_ustr_replace_range"><a href="#al_ustr_replace_range">al_ustr_replace_range</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_replace_range(ALLEGRO_USTR *us1, <span class="dt">int</span> start_pos1, <span class="dt">int</span> end_pos1,
    <span class="dt">const</span> ALLEGRO_USTR *us2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L632">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L632">Source Code</a></p>
 <p>Replace the part of <code>us1</code> in the byte interval [<code>start_pos1</code>, <code>end_pos1</code>) with the contents of <code>us2</code>. <code>start_pos1</code> cannot be less than 0. If <code>start_pos1</code> is past the end of <code>us1</code> then the space between the end of the string and <code>start_pos1</code> will be padded with NUL (<code>'\0'</code>) bytes.</p>
 <p>Use <a href="utf8.html#al_ustr_offset">al_ustr_offset</a> to find the byte offsets.</p>
 <p>Returns true on success, false on error.</p>
@@ -517,156 +517,156 @@ ALLEGRO_USTR *us = al_ref_cstr(&info, <span class="st">"my string"
 <h1 id="searching"><a href="#searching">Searching</a></h1>
 <h2 id="al_ustr_find_chr"><a href="#al_ustr_find_chr">al_ustr_find_chr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_find_chr(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> start_pos, <span class="dt">int32_t</span> c)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L642">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L642">Source Code</a></p>
 <p>Search for the encoding of code point <code>c</code> in <code>us</code> from byte offset <code>start_pos</code> (inclusive).</p>
 <p>Returns the position where it is found or -1 if it is not found.</p>
 <p>See also: <a href="utf8.html#al_ustr_rfind_chr">al_ustr_rfind_chr</a></p>
 <h2 id="al_ustr_rfind_chr"><a href="#al_ustr_rfind_chr">al_ustr_rfind_chr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_rfind_chr(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> end_pos, <span class="dt">int32_t</span> c)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L673">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L673">Source Code</a></p>
 <p>Search for the encoding of code point <code>c</code> in <code>us</code> backwards from byte offset <code>end_pos</code> (exclusive). Returns the position where it is found or -1 if it is not found.</p>
 <p>See also: <a href="utf8.html#al_ustr_find_chr">al_ustr_find_chr</a></p>
 <h2 id="al_ustr_find_set"><a href="#al_ustr_find_set">al_ustr_find_set</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_find_set(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> start_pos,
    <span class="dt">const</span> ALLEGRO_USTR *accept)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L704">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L704">Source Code</a></p>
 <p>This function finds the first code point in <code>us</code>, beginning from byte offset <code>start_pos</code>, that matches any code point in <code>accept</code>. Returns the position if a code point was found. Otherwise returns -1.</p>
 <p>See also: <a href="utf8.html#al_ustr_find_set_cstr">al_ustr_find_set_cstr</a>, <a href="utf8.html#al_ustr_find_cset">al_ustr_find_cset</a></p>
 <h2 id="al_ustr_find_set_cstr"><a href="#al_ustr_find_set_cstr">al_ustr_find_set_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_find_set_cstr(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> start_pos,
    <span class="dt">const</span> <span class="dt">char</span> *accept)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L742">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L742">Source Code</a></p>
 <p>Like <a href="utf8.html#al_ustr_find_set">al_ustr_find_set</a> but takes a C-style string for <code>accept</code>.</p>
 <p>See also: <a href="utf8.html#al_ustr_find_set">al_ustr_find_set</a>, <a href="utf8.html#al_ustr_find_cset_cstr">al_ustr_find_cset_cstr</a></p>
 <h2 id="al_ustr_find_cset"><a href="#al_ustr_find_cset">al_ustr_find_cset</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_find_cset(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> start_pos,
    <span class="dt">const</span> ALLEGRO_USTR *reject)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L754">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L754">Source Code</a></p>
 <p>This function finds the first code point in <code>us</code>, beginning from byte offset <code>start_pos</code>, that does <em>not</em> match any code point in <code>reject</code>. In other words it finds a code point in the complementary set of <code>reject</code>. Returns the byte position of that code point, if any. Otherwise returns -1.</p>
 <p>See also: <a href="utf8.html#al_ustr_find_cset_cstr">al_ustr_find_cset_cstr</a>, <a href="utf8.html#al_ustr_find_set">al_ustr_find_set</a></p>
 <h2 id="al_ustr_find_cset_cstr"><a href="#al_ustr_find_cset_cstr">al_ustr_find_cset_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_find_cset_cstr(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">int</span> start_pos,
    <span class="dt">const</span> <span class="dt">char</span> *reject)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L796">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L796">Source Code</a></p>
 <p>Like <a href="utf8.html#al_ustr_find_cset">al_ustr_find_cset</a> but takes a C-style string for <code>reject</code>.</p>
 <p>See also: <a href="utf8.html#al_ustr_find_cset">al_ustr_find_cset</a>, <a href="utf8.html#al_ustr_find_set_cstr">al_ustr_find_set_cstr</a></p>
 <h2 id="al_ustr_find_str"><a href="#al_ustr_find_str">al_ustr_find_str</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_find_str(<span class="dt">const</span> ALLEGRO_USTR *haystack, <span class="dt">int</span> start_pos,
    <span class="dt">const</span> ALLEGRO_USTR *needle)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L808">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L808">Source Code</a></p>
 <p>Find the first occurrence of string <code>needle</code> in <code>haystack</code>, beginning from byte offset <code>start_pos</code> (inclusive). Return the byte offset of the occurrence if it is found, otherwise return -1.</p>
 <p>See also: <a href="utf8.html#al_ustr_find_cstr">al_ustr_find_cstr</a>, <a href="utf8.html#al_ustr_rfind_str">al_ustr_rfind_str</a>, <a href="utf8.html#al_ustr_find_replace">al_ustr_find_replace</a></p>
 <h2 id="al_ustr_find_cstr"><a href="#al_ustr_find_cstr">al_ustr_find_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_find_cstr(<span class="dt">const</span> ALLEGRO_USTR *haystack, <span class="dt">int</span> start_pos,
    <span class="dt">const</span> <span class="dt">char</span> *needle)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L818">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L818">Source Code</a></p>
 <p>Like <a href="utf8.html#al_ustr_find_str">al_ustr_find_str</a> but takes a C-style string for <code>needle</code>.</p>
 <p>See also: <a href="utf8.html#al_ustr_find_str">al_ustr_find_str</a>, <a href="utf8.html#al_ustr_rfind_cstr">al_ustr_rfind_cstr</a></p>
 <h2 id="al_ustr_rfind_str"><a href="#al_ustr_rfind_str">al_ustr_rfind_str</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_rfind_str(<span class="dt">const</span> ALLEGRO_USTR *haystack, <span class="dt">int</span> end_pos,
    <span class="dt">const</span> ALLEGRO_USTR *needle)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L830">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L830">Source Code</a></p>
 <p>Find the last occurrence of string <code>needle</code> in <code>haystack</code> before byte offset <code>end_pos</code> (exclusive). Return the byte offset of the occurrence if it is found, otherwise return -1.</p>
 <p>See also: <a href="utf8.html#al_ustr_rfind_cstr">al_ustr_rfind_cstr</a>, <a href="utf8.html#al_ustr_find_str">al_ustr_find_str</a></p>
 <h2 id="al_ustr_rfind_cstr"><a href="#al_ustr_rfind_cstr">al_ustr_rfind_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_rfind_cstr(<span class="dt">const</span> ALLEGRO_USTR *haystack, <span class="dt">int</span> end_pos,
    <span class="dt">const</span> <span class="dt">char</span> *needle)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L840">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L840">Source Code</a></p>
 <p>Like <a href="utf8.html#al_ustr_rfind_str">al_ustr_rfind_str</a> but takes a C-style string for <code>needle</code>.</p>
 <p>See also: <a href="utf8.html#al_ustr_rfind_str">al_ustr_rfind_str</a>, <a href="utf8.html#al_ustr_find_cstr">al_ustr_find_cstr</a></p>
 <h2 id="al_ustr_find_replace"><a href="#al_ustr_find_replace">al_ustr_find_replace</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_find_replace(ALLEGRO_USTR *us, <span class="dt">int</span> start_pos,
    <span class="dt">const</span> ALLEGRO_USTR *find, <span class="dt">const</span> ALLEGRO_USTR *replace)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L852">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L852">Source Code</a></p>
 <p>Replace all occurrences of <code>find</code> in <code>us</code> with <code>replace</code>, beginning at byte offset <code>start_pos</code>. The <code>find</code> string must be non-empty. Returns true on success, false on error.</p>
 <p>See also: <a href="utf8.html#al_ustr_find_replace_cstr">al_ustr_find_replace_cstr</a></p>
 <h2 id="al_ustr_find_replace_cstr"><a href="#al_ustr_find_replace_cstr">al_ustr_find_replace_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_find_replace_cstr(ALLEGRO_USTR *us, <span class="dt">int</span> start_pos,
    <span class="dt">const</span> <span class="dt">char</span> *find, <span class="dt">const</span> <span class="dt">char</span> *replace)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L861">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L861">Source Code</a></p>
 <p>Like <a href="utf8.html#al_ustr_find_replace">al_ustr_find_replace</a> but takes C-style strings for <code>find</code> and <code>replace</code>.</p>
 <h1 id="comparing"><a href="#comparing">Comparing</a></h1>
 <h2 id="al_ustr_equal"><a href="#al_ustr_equal">al_ustr_equal</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_equal(<span class="dt">const</span> ALLEGRO_USTR *us1, <span class="dt">const</span> ALLEGRO_USTR *us2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L875">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L875">Source Code</a></p>
 <p>Return true iff the two strings are equal. This function is more efficient than <a href="utf8.html#al_ustr_compare">al_ustr_compare</a> so is preferable if ordering is not important.</p>
 <p>See also: <a href="utf8.html#al_ustr_compare">al_ustr_compare</a></p>
 <h2 id="al_ustr_compare"><a href="#al_ustr_compare">al_ustr_compare</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_compare(<span class="dt">const</span> ALLEGRO_USTR *us1, <span class="dt">const</span> ALLEGRO_USTR *us2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L883">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L883">Source Code</a></p>
 <p>This function compares <code>us1</code> and <code>us2</code> by code point values. Returns zero if the strings are equal, a positive number if <code>us1</code> comes after <code>us2</code>, else a negative number.</p>
 <p>This does <em>not</em> take into account locale-specific sorting rules. For that you will need to use another library.</p>
 <p>See also: <a href="utf8.html#al_ustr_ncompare">al_ustr_ncompare</a>, <a href="utf8.html#al_ustr_equal">al_ustr_equal</a></p>
 <h2 id="al_ustr_ncompare"><a href="#al_ustr_ncompare">al_ustr_ncompare</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">int</span> al_ustr_ncompare(<span class="dt">const</span> ALLEGRO_USTR *us1, <span class="dt">const</span> ALLEGRO_USTR *us2, <span class="dt">int</span> n)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L905">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L905">Source Code</a></p>
 <p>Like <a href="utf8.html#al_ustr_compare">al_ustr_compare</a> but only compares up to the first <code>n</code> code points of both strings.</p>
 <p>Returns zero if the strings are equal, a positive number if <code>us1</code> comes after <code>us2</code>, else a negative number.</p>
 <p>See also: <a href="utf8.html#al_ustr_compare">al_ustr_compare</a>, <a href="utf8.html#al_ustr_equal">al_ustr_equal</a></p>
 <h2 id="al_ustr_has_prefix"><a href="#al_ustr_has_prefix">al_ustr_has_prefix</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_has_prefix(<span class="dt">const</span> ALLEGRO_USTR *us1, <span class="dt">const</span> ALLEGRO_USTR *us2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L930">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L930">Source Code</a></p>
 <p>Returns true iff <code>us1</code> begins with <code>us2</code>.</p>
 <p>See also: <a href="utf8.html#al_ustr_has_prefix_cstr">al_ustr_has_prefix_cstr</a>, <a href="utf8.html#al_ustr_has_suffix">al_ustr_has_suffix</a></p>
 <h2 id="al_ustr_has_prefix_cstr"><a href="#al_ustr_has_prefix_cstr">al_ustr_has_prefix_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_has_prefix_cstr(<span class="dt">const</span> ALLEGRO_USTR *us1, <span class="dt">const</span> <span class="dt">char</span> *s2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L938">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L938">Source Code</a></p>
 <p>Returns true iff <code>us1</code> begins with <code>s2</code>.</p>
 <p>See also: <a href="utf8.html#al_ustr_has_prefix">al_ustr_has_prefix</a>, <a href="utf8.html#al_ustr_has_suffix_cstr">al_ustr_has_suffix_cstr</a></p>
 <h2 id="al_ustr_has_suffix"><a href="#al_ustr_has_suffix">al_ustr_has_suffix</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_has_suffix(<span class="dt">const</span> ALLEGRO_USTR *us1, <span class="dt">const</span> ALLEGRO_USTR *us2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L949">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L949">Source Code</a></p>
 <p>Returns true iff <code>us1</code> ends with <code>us2</code>.</p>
 <p>See also: <a href="utf8.html#al_ustr_has_suffix_cstr">al_ustr_has_suffix_cstr</a>, <a href="utf8.html#al_ustr_has_prefix">al_ustr_has_prefix</a></p>
 <h2 id="al_ustr_has_suffix_cstr"><a href="#al_ustr_has_suffix_cstr">al_ustr_has_suffix_cstr</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_ustr_has_suffix_cstr(<span class="dt">const</span> ALLEGRO_USTR *us1, <span class="dt">const</span> <span class="dt">char</span> *s2)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L962">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L962">Source Code</a></p>
 <p>Returns true iff <code>us1</code> ends with <code>s2</code>.</p>
 <p>See also: <a href="utf8.html#al_ustr_has_suffix">al_ustr_has_suffix</a>, <a href="utf8.html#al_ustr_has_prefix_cstr">al_ustr_has_prefix_cstr</a></p>
 <h1 id="utf-16-conversion"><a href="#utf-16-conversion">UTF-16 conversion</a></h1>
 <h2 id="al_ustr_new_from_utf16"><a href="#al_ustr_new_from_utf16">al_ustr_new_from_utf16</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_USTR *al_ustr_new_from_utf16(<span class="dt">uint16_t</span> <span class="dt">const</span> *s)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L1090">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L1090">Source Code</a></p>
 <p>Create a new string containing a copy of the 0-terminated string <code>s</code> which must be encoded as UTF-16. The string must eventually be freed with <a href="utf8.html#al_ustr_free">al_ustr_free</a>.</p>
 <p>See also: <a href="utf8.html#al_ustr_new">al_ustr_new</a></p>
 <h2 id="al_ustr_size_utf16"><a href="#al_ustr_size_utf16">al_ustr_size_utf16</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_ustr_size_utf16(<span class="dt">const</span> ALLEGRO_USTR *us)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L1112">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L1112">Source Code</a></p>
 <p>Returns the number of bytes required to encode the string in UTF-16 (including the terminating 0). Usually called before <a href="utf8.html#al_ustr_encode_utf16">al_ustr_encode_utf16</a> to determine the size of the buffer to allocate.</p>
 <p>See also: <a href="utf8.html#al_ustr_size">al_ustr_size</a></p>
 <h2 id="al_ustr_encode_utf16"><a href="#al_ustr_encode_utf16">al_ustr_encode_utf16</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_ustr_encode_utf16(<span class="dt">const</span> ALLEGRO_USTR *us, <span class="dt">uint16_t</span> *s,
    size_t n)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L1132">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L1132">Source Code</a></p>
 <p>Encode the string into the given buffer, in UTF-16. Returns the number of bytes written. There are never more than <code>n</code> bytes written. The minimum size to encode the complete string can be queried with <a href="utf8.html#al_ustr_size_utf16">al_ustr_size_utf16</a>. If the <code>n</code> parameter is smaller than that, the string will be truncated but still always 0 terminated.</p>
 <p>See also: <a href="utf8.html#al_ustr_size_utf16">al_ustr_size_utf16</a>, <a href="utf8.html#al_utf16_encode">al_utf16_encode</a></p>
 <h1 id="low-level-utf-8-routines"><a href="#low-level-utf-8-routines">Low-level UTF-8 routines</a></h1>
 <h2 id="al_utf8_width"><a href="#al_utf8_width">al_utf8_width</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_utf8_width(<span class="dt">int</span> c)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L973">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L973">Source Code</a></p>
 <p>Returns the number of bytes that would be occupied by the specified code point when encoded in UTF-8. This is between 1 and 4 bytes for legal code point values. Otherwise returns 0.</p>
 <p>See also: <a href="utf8.html#al_utf8_encode">al_utf8_encode</a>, <a href="utf8.html#al_utf16_width">al_utf16_width</a></p>
 <h2 id="al_utf8_encode"><a href="#al_utf8_encode">al_utf8_encode</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_utf8_encode(<span class="dt">char</span> s[], <span class="dt">int32_t</span> c)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L995">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L995">Source Code</a></p>
 <p>Encode the specified code point to UTF-8 into the buffer <code>s</code>. The buffer must have enough space to hold the encoding, which takes between 1 and 4 bytes. This routine will refuse to encode code points above 0x10FFFF.</p>
 <p>Returns the number of bytes written, which is the same as that returned by <a href="utf8.html#al_utf8_width">al_utf8_width</a>.</p>
 <p>See also: <a href="utf8.html#al_utf16_encode">al_utf16_encode</a></p>
 <h1 id="low-level-utf-16-routines"><a href="#low-level-utf-16-routines">Low-level UTF-16 routines</a></h1>
 <h2 id="al_utf16_width"><a href="#al_utf16_width">al_utf16_width</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_utf16_width(<span class="dt">int</span> c)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L1032">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L1032">Source Code</a></p>
 <p>Returns the number of bytes that would be occupied by the specified code point when encoded in UTF-16. This is either 2 or 4 bytes for legal code point values. Otherwise returns 0.</p>
 <p>See also: <a href="utf8.html#al_utf16_encode">al_utf16_encode</a>, <a href="utf8.html#al_utf8_width">al_utf8_width</a></p>
 <h2 id="al_utf16_encode"><a href="#al_utf16_encode">al_utf16_encode</a></h2>
 <pre class="sourceCode c"><code class="sourceCode c">size_t al_utf16_encode(<span class="dt">uint16_t</span> s[], <span class="dt">int32_t</span> c)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/src/utf8.c#L1052">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/src/utf8.c#L1052">Source Code</a></p>
 <p>Encode the specified code point to UTF-16 into the buffer <code>s</code>. The buffer must have enough space to hold the encoding, which takes either 2 or 4 bytes. This routine will refuse to encode code points above 0x10FFFF.</p>
 <p>Returns the number of bytes written, which is the same as that returned by <a href="utf8.html#al_utf16_width">al_utf16_width</a>.</p>
 <p>See also: <a href="utf8.html#al_utf8_encode">al_utf8_encode</a>, <a href="utf8.html#al_ustr_encode_utf16">al_ustr_encode_utf16</a></p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:42 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:00 UTC
 </p>
 </div>
 </body>
diff --git a/docs/html/refman/video.html b/docs/html/refman/video.html
index 4d25da3..d225293 100644
--- a/docs/html/refman/video.html
+++ b/docs/html/refman/video.html
@@ -143,7 +143,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Currently we have an Ogg backend (Theora + Vorbis). See <a href="http://xiph.org/">http://xiph.org/</a> for installation instructions, licensing information and supported video formats.</p>
 <h1 id="allegro_video_event_type"><a href="#allegro_video_event_type">ALLEGRO_VIDEO_EVENT_TYPE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">enum</span> ALLEGRO_VIDEO_EVENT_TYPE</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/allegro5/allegro_video.h#L35">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/allegro5/allegro_video.h#L35">Source Code</a></p>
 <ul>
 <li>ALLEGRO_EVENT_VIDEO_FRAME_SHOW - This event is sent when it is time to show a new frame. Once you receive this event, you can draw the current frame (as returned by <a href="video.html#al_get_video_frame">al_get_video_frame</a>). <a href="video.html#al_get_video_frame">al_get_video_frame</a> will continue returning the same frame until the next ALLEGRO_EVENT_VIDEO_FRAME_SHOW is sent.</li>
 <li>ALLEGRO_EVENT_VIDEO_FINISHED - This event is sent when the video is finished. Depending on the backend, it may be possible to seek to an earlier part of the video and set the video to play to resume playback.</li>
@@ -151,7 +151,7 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Since: 5.1.0</p>
 <h1 id="allegro_video_position_type"><a href="#allegro_video_position_type">ALLEGRO_VIDEO_POSITION_TYPE</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="kw">typedef</span> <span class="kw">enum</span> ALLEGRO_VIDEO_POSITION_TYPE ALLEGRO_VIDEO_POSITION_TYPE;</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/allegro5/allegro_video.h#L51">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/allegro5/allegro_video.h#L51">Source Code</a></p>
 <p>Used with <a href="video.html#al_get_video_position">al_get_video_position</a> to specify which position to retrieve. If these get out of sync, audio and video may be out of sync in the display of the video.</p>
 <ul>
 <li><p>ALLEGRO_VIDEO_POSITION_ACTUAL - The amount of time the video has been playing. If the video has audio then this value can be ahead of ALLEGRO_VIDEO_POSITION_VIDEO_DECODE when video decoding lags.</p></li>
@@ -161,79 +161,79 @@ Search<br/> <input type="text" name="q" id="q" size="15" autocomplete="off"/><br
 <p>Since: 5.1.11</p>
 <h1 id="al_init_video_addon"><a href="#al_init_video_addon">al_init_video_addon</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_init_video_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L256">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L256">Source Code</a></p>
 <p>Initializes the video addon.</p>
 <p>Since: 5.1.12</p>
 <h1 id="al_shutdown_video_addon"><a href="#al_shutdown_video_addon">al_shutdown_video_addon</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_shutdown_video_addon(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L278">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L278">Source Code</a></p>
 <p>Shut down the video addon. This is done automatically at program exit, but can be called any time the user wishes as well.</p>
 <p>Since: 5.1.12</p>
 <h1 id="al_get_allegro_video_version"><a href="#al_get_allegro_video_version">al_get_allegro_video_version</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">uint32_t</span> al_get_allegro_video_version(<span class="dt">void</span>)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L292">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L292">Source Code</a></p>
 <p>Returns the (compiled) version of the addon, in the same format as <a href="system.html#al_get_allegro_version">al_get_allegro_version</a>.</p>
 <p>Since: 5.1.12</p>
 <h1 id="al_open_video"><a href="#al_open_video">al_open_video</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_VIDEO *al_open_video(<span class="dt">char</span> <span class="dt">const</span> *filename)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L94">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L94">Source Code</a></p>
 <p>Reads a video file. This does not start streaming yet but reads the meta info so you can query e.g. the size or audio rate.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_close_video"><a href="#al_close_video">al_close_video</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_close_video(ALLEGRO_VIDEO *video)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L127">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L127">Source Code</a></p>
 <p>Closes the video and frees all allocated resources. The video pointer is invalid after the function returns.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_start_video"><a href="#al_start_video">al_start_video</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_start_video(ALLEGRO_VIDEO *video, ALLEGRO_MIXER *mixer)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L149">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L149">Source Code</a></p>
 <p>Starts streaming the video from the beginning.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_start_video_with_voice"><a href="#al_start_video_with_voice">al_start_video_with_voice</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_start_video_with_voice(ALLEGRO_VIDEO *video, ALLEGRO_VOICE *voice)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L160">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L160">Source Code</a></p>
 <p>Like <a href="video.html#al_start_video">al_start_video</a> but audio is routed to the provided voice.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_get_video_event_source"><a href="#al_get_video_event_source">al_get_video_event_source</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_EVENT_SOURCE *al_get_video_event_source(ALLEGRO_VIDEO *video)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L141">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L141">Source Code</a></p>
 <p>Get an event source for the video. The possible events are described under <a href="video.html#allegro_video_event_type">ALLEGRO_VIDEO_EVENT_TYPE</a>.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_set_video_playing"><a href="#al_set_video_playing">al_set_video_playing</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">void</span> al_set_video_playing(ALLEGRO_VIDEO *video, bool play)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L171">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L171">Source Code</a></p>
 <p>Paused or resumes playback.</p>
 <p>Since: 5.1.12</p>
 <h1 id="al_is_video_playing"><a href="#al_is_video_playing">al_is_video_playing</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_is_video_playing(ALLEGRO_VIDEO *video)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L183">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L183">Source Code</a></p>
 <p>Returns true if the video is currently playing.</p>
 <p>Since: 5.1.12</p>
 <h1 id="al_get_video_audio_rate"><a href="#al_get_video_audio_rate">al_get_video_audio_rate</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">double</span> al_get_video_audio_rate(ALLEGRO_VIDEO *video)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L224">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L224">Source Code</a></p>
 <p>Returns the audio rate of the video, in Hz.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_get_video_fps"><a href="#al_get_video_fps">al_get_video_fps</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">double</span> al_get_video_fps(ALLEGRO_VIDEO *video)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L232">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L232">Source Code</a></p>
 <p>Returns the speed of the video in frames per second. Often this will not be an integer value.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_get_video_scaled_width"><a href="#al_get_video_scaled_width">al_get_video_scaled_width</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> al_get_video_scaled_width(ALLEGRO_VIDEO *video)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L240">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L240">Source Code</a></p>
 <p>Returns the width with which the video frame should be drawn. Videos often do not use square pixels, so this will may return a value larger than the width of the frame bitmap.</p>
 <p>Since: 5.1.12</p>
 <p>See also: <a href="video.html#al_get_video_frame">al_get_video_frame</a></p>
 <h1 id="al_get_video_scaled_height"><a href="#al_get_video_scaled_height">al_get_video_scaled_height</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> al_get_video_scaled_height(ALLEGRO_VIDEO *video)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L248">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L248">Source Code</a></p>
 <p>Returns the height with which the video frame should be drawn. Videos often do not use square pixels, so this will may return a value larger than the height of the frame bitmap.</p>
 <p>See also: <a href="video.html#al_get_video_frame">al_get_video_frame</a></p>
 <p>Since: 5.1.12</p>
 <h1 id="al_get_video_frame"><a href="#al_get_video_frame">al_get_video_frame</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">ALLEGRO_BITMAP *al_get_video_frame(ALLEGRO_VIDEO *video)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L192">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L192">Source Code</a></p>
 <p>Returns the current video frame. The bitmap is owned by the video so do not attempt to free it. The bitmap will stay valid until the next call to al_get_video_frame.</p>
 <p>Videos often do not use square pixels so the recommended way to draw a video frame would be using code like this:</p>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">float</span> scale = <span class="fl">1.0</span>; <span class="co">/* Adjust this to fit your target bitmap dimensions. */</span>
@@ -247,17 +247,17 @@ al_draw_scaled_bitmap(frame, <span class="dv">0</span>, <span class="dv">0</span
 <p>See also: <a href="video.html#al_get_video_scaled_width">al_get_video_scaled_width</a>, <a href="video.html#al_get_video_scaled_height">al_get_video_scaled_height</a></p>
 <h1 id="al_get_video_position"><a href="#al_get_video_position">al_get_video_position</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c"><span class="dt">double</span> al_get_video_position(ALLEGRO_VIDEO *video, ALLEGRO_VIDEO_POSITION_TYPE which)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L202">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L202">Source Code</a></p>
 <p>Returns the current position of the video stream in seconds since the beginning. The parameter is one of the <a href="video.html#allegro_video_position_type">ALLEGRO_VIDEO_POSITION_TYPE</a> constants.</p>
 <p>Since: 5.1.0</p>
 <h1 id="al_seek_video"><a href="#al_seek_video">al_seek_video</a></h1>
 <pre class="sourceCode c"><code class="sourceCode c">bool al_seek_video(ALLEGRO_VIDEO *video, <span class="dt">double</span> pos_in_seconds)</code></pre>
-<p><a href="https://github.com/liballeg/allegro5/blob/5.1/addons/video/video.c#L215">Source Code</a></p>
+<p><a href="https://github.com/liballeg/allegro5/blob/master/addons/video/video.c#L215">Source Code</a></p>
 <p>Seek to a different position in the video. Currently only seeking to the beginning of the video is supported.</p>
 <p>Since: 5.1.0</p>
 <p class="timestamp">
-Allegro version 5.2.0
- - Last updated: 2016-03-31 03:33:45 UTC
+Allegro version 5.2.2
+ - Last updated: 2016-12-12 01:24:03 UTC
 </p>
 </div>
 </body>
diff --git a/docs/man/ALLEGRO_GLYPH.3 b/docs/man/ALLEGRO_GLYPH.3
new file mode 100644
index 0000000..020f336
--- /dev/null
+++ b/docs/man/ALLEGRO_GLYPH.3
@@ -0,0 +1,54 @@
+.TH "ALLEGRO_GLYPH" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+ALLEGRO_GLYPH \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro_font.h>
+
+typedef\ struct\ ALLEGRO_GLYPH\ ALLEGRO_GLYPH;
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+A structure containing the properties of a character in a font.
+.IP
+.nf
+\f[C]
+typedef\ struct\ ALLEGRO_GLYPH\ {
+\ \ \ ALLEGRO_BITMAP\ *bitmap;\ \ \ //\ the\ bitmap\ the\ character\ is\ on
+\ \ \ int\ x;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ the\ x\ position\ of\ the\ glyph\ on\ bitmap
+\ \ \ int\ y;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ the\ y\ position\ of\ the\ glyph\ on\ bitmap
+\ \ \ int\ w;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ the\ width\ of\ the\ glyph\ in\ pixels
+\ \ \ int\ h;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ the\ height\ of\ the\ glyph\ in\ pixels
+\ \ \ int\ kerning;\ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ pixels\ of\ kerning\ (see\ below)
+\ \ \ int\ offset_x;\ \ \ \ \ \ \ \ \ \ \ \ \ //\ x\ offset\ to\ draw\ the\ glyph\ at
+\ \ \ int\ offset_y;\ \ \ \ \ \ \ \ \ \ \ \ \ //\ y\ offset\ to\ draw\ the\ glyph\ at
+\ \ \ int\ advance;\ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ number\ of\ pixels\ to\ advance\ after\ this\ character
+}\ ALLEGRO_GLYPH;
+\f[]
+.fi
+.PP
+bitmap may be a sub\-bitmap in the case of color fonts.
+.PP
+kerning should be added to the x position you draw to if you want your
+text kerned and depends on which codepoints al_get_glyph(3) was called
+with.
+.PP
+Glyphs are tightly packed onto the bitmap, so you need to add offset_x
+and offset_y to your draw position for the text to look right.
+.PP
+advance is the number of pixels to add to your x position to advance to
+the next character in a string and includes kerning.
+.SH SINCE
+.PP
+5.2.1
+.RS
+.PP
+\f[I][Unstable API]:\f[] This API is new and subject to refinement.
+.RE
+.SH SEE ALSO
+.PP
+al_get_glyph(3)
diff --git a/docs/man/al_android_get_activity.3 b/docs/man/al_android_get_activity.3
new file mode 100644
index 0000000..5362ffd
--- /dev/null
+++ b/docs/man/al_android_get_activity.3
@@ -0,0 +1,26 @@
+.TH "al_android_get_activity" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+al_android_get_activity \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro_android.h>
+
+jobject\ al_android_get_activity(void)
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+Returns the Java Android activity used by Allegro.
+This is the same object created by Android from the class you specify in
+your manifest and either an instance of AllegroActivity or a derived
+class.
+.SH SINCE
+.PP
+5.2.2
+.RS
+.PP
+\f[I][Unstable API]:\f[] This API is new and subject to refinement.
+.RE
diff --git a/docs/man/al_android_get_jni_env.3 b/docs/man/al_android_get_jni_env.3
new file mode 100644
index 0000000..3ade1e1
--- /dev/null
+++ b/docs/man/al_android_get_jni_env.3
@@ -0,0 +1,40 @@
+.TH "al_android_get_jni_env" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+al_android_get_jni_env \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro_android.h>
+
+JNIEnv\ *al_android_get_jni_env(void)
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+Returns the Android JNI environment used by Allegro to call into Java.
+As a convenience this function provides it to the user so there is no
+need to obtain it yourself.
+.PP
+For example if you have a Java method "void send(String message)" in
+your activity class, you could call it like this from C code:
+.IP
+.nf
+\f[C]
+JNIEnv\ *\ env\ =\ al_android_get_jni_env();
+jclass\ class_id\ =\ (*\ env)\->GetObjectClass(env,\ al_android_get_activity());
+jmethodID\ method_id\ =\ (*\ env)\->GetMethodID(env,\ class_id,\ "send",
+\ \ \ \ "(Ljava/lang/String;)V");
+jstring\ jdata\ =\ (*\ env)\->NewStringUTF(env,\ "Hello\ Java!");
+(*\ env)\->CallVoidMethod(env,\ al_android_get_activity(),\ method_id,\ jdata);
+(*\ env)\->DeleteLocalRef(env,\ jdata);
+\f[]
+.fi
+.SH SINCE
+.PP
+5.2.2
+.RS
+.PP
+\f[I][Unstable API]:\f[] This API is new and subject to refinement.
+.RE
diff --git a/docs/man/al_backup_dirty_bitmap.3 b/docs/man/al_backup_dirty_bitmap.3
new file mode 100644
index 0000000..526a8eb
--- /dev/null
+++ b/docs/man/al_backup_dirty_bitmap.3
@@ -0,0 +1,36 @@
+.TH "al_backup_dirty_bitmap" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+al_backup_dirty_bitmap \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro.h>
+
+void\ al_backup_dirty_bitmap(ALLEGRO_BITMAP\ *bitmap)
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+On some platforms, notably Windows Direct3D and Android, textures may be
+lost at any time for events such as display resize or switching out of
+the app.
+On those platforms, bitmaps created without the
+ALLEGRO_NO_PRESERVE_TEXTURE flag automatically get backed up to system
+memory every time al_flip_display is called.
+.PP
+This function gives you more control over when your bitmaps get backed
+up.
+By calling this function after modifying a bitmap, you can make sure the
+bitmap is backed up right away instead of during the next flip.
+.SH SINCE
+.PP
+5.2.1
+.RS
+.PP
+\f[I][Unstable API]:\f[] This API is new and subject to refinement.
+.RE
+.SH SEE ALSO
+.PP
+al_backup_dirty_bitmaps(3), al_create_bitmap(3)
diff --git a/docs/man/al_backup_dirty_bitmaps.3 b/docs/man/al_backup_dirty_bitmaps.3
new file mode 100644
index 0000000..2edee56
--- /dev/null
+++ b/docs/man/al_backup_dirty_bitmaps.3
@@ -0,0 +1,26 @@
+.TH "al_backup_dirty_bitmaps" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+al_backup_dirty_bitmaps \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro.h>
+
+void\ al_backup_dirty_bitmaps(ALLEGRO_DISPLAY\ *display)
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+Backs up all of a display\[aq]s bitmaps to system memory.
+.SH SINCE
+.PP
+5.2.1
+.RS
+.PP
+\f[I][Unstable API]:\f[] This API is new and subject to refinement.
+.RE
+.SH SEE ALSO
+.PP
+al_backup_dirty_bitmap(3)
diff --git a/docs/man/al_color_hsl.3 b/docs/man/al_color_hsl.3
index 8a707c4..d2e2850 100644
--- a/docs/man/al_color_hsl.3
+++ b/docs/man/al_color_hsl.3
@@ -15,6 +15,14 @@ ALLEGRO_COLOR\ al_color_hsl(float\ h,\ float\ s,\ float\ l)
 .PP
 Return an ALLEGRO_COLOR(3) structure from HSL (hue, saturation,
 lightness) values.
+.PP
+Parameters:
+.IP \[bu] 2
+hue \- Color hue angle in the range 0..360
+.IP \[bu] 2
+saturation \- Color saturation in the range 0..1
+.IP \[bu] 2
+lightness \- Color lightness in the range 0..1
 .SH SEE ALSO
 .PP
 al_color_hsl_to_rgb(3), al_color_hsv(3)
diff --git a/docs/man/al_color_hsl_to_rgb.3 b/docs/man/al_color_hsl_to_rgb.3
index ebac1dd..51ac934 100644
--- a/docs/man/al_color_hsl_to_rgb.3
+++ b/docs/man/al_color_hsl_to_rgb.3
@@ -18,13 +18,13 @@ Convert values in HSL color model to RGB color model.
 .PP
 Parameters:
 .IP \[bu] 2
-hue \- Color hue angle in the range 0..360.
+hue \- Color hue angle in the range 0..360
 .IP \[bu] 2
-saturation \- Color saturation in the range 0..1.
+saturation \- Color saturation in the range 0..1
 .IP \[bu] 2
-lightness \- Color lightness in the range 0..1.
+lightness \- Color lightness in the range 0..1
 .IP \[bu] 2
-red, green, blue \- returned RGB values in the range 0..1.
+red, green, blue \- returned RGB values in the range 0..1
 .SH SEE ALSO
 .PP
 al_color_rgb_to_hsl(3), al_color_hsl(3), al_color_hsv_to_rgb(3)
diff --git a/docs/man/al_color_hsv.3 b/docs/man/al_color_hsv.3
index 8d3a710..9a2032b 100644
--- a/docs/man/al_color_hsv.3
+++ b/docs/man/al_color_hsv.3
@@ -15,6 +15,14 @@ ALLEGRO_COLOR\ al_color_hsv(float\ h,\ float\ s,\ float\ v)
 .PP
 Return an ALLEGRO_COLOR(3) structure from HSV (hue, saturation, value)
 values.
+.PP
+Parameters:
+.IP \[bu] 2
+hue \- Color hue angle in the range 0..360
+.IP \[bu] 2
+saturation \- Color saturation in the range 0..1
+.IP \[bu] 2
+value \- Color value in the range 0..1
 .SH SEE ALSO
 .PP
 al_color_hsv_to_rgb(3), al_color_hsl(3)
diff --git a/docs/man/al_color_hsv_to_rgb.3 b/docs/man/al_color_hsv_to_rgb.3
index 2e443ea..eb57c62 100644
--- a/docs/man/al_color_hsv_to_rgb.3
+++ b/docs/man/al_color_hsv_to_rgb.3
@@ -18,13 +18,13 @@ Convert values in HSV color model to RGB color model.
 .PP
 Parameters:
 .IP \[bu] 2
-hue \- Color hue angle in the range 0..360.
+hue \- Color hue angle in the range 0..360
 .IP \[bu] 2
-saturation \- Color saturation in the range 0..1.
+saturation \- Color saturation in the range 0..1
 .IP \[bu] 2
-value \- Color value in the range 0..1.
+value \- Color value in the range 0..1
 .IP \[bu] 2
-red, green, blue \- returned RGB values in the range 0..1.
+red, green, blue \- returned RGB values in the range 0..1
 .SH SEE ALSO
 .PP
 al_color_rgb_to_hsv(3), al_color_hsv(3), al_color_hsl_to_rgb(3)
diff --git a/docs/man/al_get_bitmap_depth.3 b/docs/man/al_get_bitmap_depth.3
new file mode 100644
index 0000000..bdc36f5
--- /dev/null
+++ b/docs/man/al_get_bitmap_depth.3
@@ -0,0 +1,25 @@
+.TH "al_get_bitmap_depth" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+al_get_bitmap_depth \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro.h>
+
+int\ al_get_bitmap_depth(ALLEGRO_BITMAP\ *bitmap)
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+Return the depthbuffer depth used by this bitmap if it is used with
+al_set_target_bitmap(3).
+.SH SINCE
+.PP
+5.2.1
+.RS
+.PP
+\f[I][Unstable API]:\f[] This is an experimental feature and currently
+only works for the OpenGL backend.
+.RE
diff --git a/docs/man/al_get_bitmap_samples.3 b/docs/man/al_get_bitmap_samples.3
new file mode 100644
index 0000000..e1aac27
--- /dev/null
+++ b/docs/man/al_get_bitmap_samples.3
@@ -0,0 +1,25 @@
+.TH "al_get_bitmap_samples" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+al_get_bitmap_samples \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro.h>
+
+int\ al_get_bitmap_samples(ALLEGRO_BITMAP\ *bitmap)
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+Return the multi\-sampling samples used by this bitmap if it is used
+with al_set_target_bitmap(3).
+.SH SINCE
+.PP
+5.2.1
+.RS
+.PP
+\f[I][Unstable API]:\f[] This is an experimental feature and currently
+only works for the OpenGL backend.
+.RE
diff --git a/docs/man/al_get_errno.3 b/docs/man/al_get_errno.3
index be8b8c8..8f35cb6 100644
--- a/docs/man/al_get_errno.3
+++ b/docs/man/al_get_errno.3
@@ -9,6 +9,7 @@ al_get_errno \- Allegro 5 API
 
 
 int\ al_get_errno(void)
+GETTER(allegro_errno,\ 0)
 \f[]
 .fi
 .SH DESCRIPTION
diff --git a/docs/man/al_get_glyph.3 b/docs/man/al_get_glyph.3
new file mode 100644
index 0000000..8a6eae7
--- /dev/null
+++ b/docs/man/al_get_glyph.3
@@ -0,0 +1,32 @@
+.TH "al_get_glyph" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+al_get_glyph \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro_ttf.h>
+
+bool\ al_get_glyph(const\ ALLEGRO_FONT\ *f,\ int\ prev_codepoint,\ int\ codepoint,\ ALLEGRO_GLYPH\ *glyph)
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+Gets all the information about a glyph, including the bitmap, needed to
+draw it yourself.
+prev_codepoint is the codepoint in the string before the one you want to
+draw and is used for kerning.
+codepoint is the character you want to get info about.
+You should clear the \[aq]glyph\[aq] structure to 0 with memset before
+passing it to this function for future compatibility.
+.SH SINCE
+.PP
+5.2.1
+.RS
+.PP
+\f[I][Unstable API]:\f[] This API is new and subject to refinement.
+.RE
+.SH SEE ALSO
+.PP
+ALLEGRO_GLYPH(3)
diff --git a/docs/man/al_get_glyph_advance.3 b/docs/man/al_get_glyph_advance.3
index e4c870d..42f1c7e 100644
--- a/docs/man/al_get_glyph_advance.3
+++ b/docs/man/al_get_glyph_advance.3
@@ -28,7 +28,7 @@ determined by the author of the font.
 .PP
 If you pass ALLEGRO_NO_KERNING as codepoint1 then al_get_glyph_advance
 will return 0.
-this cn be useful when drawing the first character of a string in a
+this can be useful when drawing the first character of a string in a
 loop.
 .PP
 Pass ALLEGRO_NO_KERNING as codepoint2 to get the horizontal advance
@@ -62,7 +62,7 @@ and with the ALLEGRO_NO_KERNING flag.
 .IP
 .nf
 \f[C]
-al_get_glyph_advance(font,\ \[aq]A\[aq],\ \[aq]l\[aq],\ 0)
+al_get_glyph_advance(font,\ \[aq]A\[aq],\ \[aq]l\[aq])
 \ \ \ \ \ ___|___\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 
 \ \ \ \ /\ \ \ \ \ \ \ \\\ \ 
 \ \ \ \ \-\-\-\-\-\-\-\-\-\-\-\-\-\ \ \ \ \ \ \ \ \ \ \ \ 
@@ -74,7 +74,7 @@ al_get_glyph_advance(font,\ \[aq]A\[aq],\ \[aq]l\[aq],\ 0)
 \ \ \ \ \-\-\-\-\-\-\-\-\-\-\-\-\-
 \ \ \ \ 
 \ \ \ \ 
-al_get_glyph_advance(font,\ \[aq]A\[aq],\ \[aq]l\[aq],\ ALLEGRO_NO_KERNING)\ \ \ \ 
+al_get_glyph_advance(font,\ \[aq]A\[aq],\ ALLEGRO_NO_KERNING)
 \ \ \ \ \ ____|____
 \ \ \ \ /\ \ \ \ \ \ \ \ \ \\\ \ 
 \ \ \ \ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
diff --git a/docs/man/al_get_new_bitmap_depth.3 b/docs/man/al_get_new_bitmap_depth.3
new file mode 100644
index 0000000..5667a38
--- /dev/null
+++ b/docs/man/al_get_new_bitmap_depth.3
@@ -0,0 +1,26 @@
+.TH "al_get_new_bitmap_depth" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+al_get_new_bitmap_depth \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro.h>
+
+int\ al_get_new_bitmap_depth(void)
+GETTER(new_bitmap_depth,\ 0)
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+Returns the value currently set with al_set_new_bitmap_depth(3) on the
+current thread or 0 if none was set.
+.SH SINCE
+.PP
+5.2.1
+.RS
+.PP
+\f[I][Unstable API]:\f[] This is an experimental feature and currently
+only works for the OpenGL backend.
+.RE
diff --git a/docs/man/al_get_new_bitmap_samples.3 b/docs/man/al_get_new_bitmap_samples.3
new file mode 100644
index 0000000..747cf8b
--- /dev/null
+++ b/docs/man/al_get_new_bitmap_samples.3
@@ -0,0 +1,26 @@
+.TH "al_get_new_bitmap_samples" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+al_get_new_bitmap_samples \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro.h>
+
+int\ al_get_new_bitmap_samples(void)
+GETTER(new_bitmap_samples,\ 0)
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+Returns the value currently set with al_set_new_bitmap_samples(3) on the
+current thread or 0 if none was set.
+.SH SINCE
+.PP
+5.2.1
+.RS
+.PP
+\f[I][Unstable API]:\f[] This is an experimental feature and currently
+only works for the OpenGL backend.
+.RE
diff --git a/docs/man/al_get_opengl_extension_list.3 b/docs/man/al_get_opengl_extension_list.3
index 0696063..e8c5d15 100644
--- a/docs/man/al_get_opengl_extension_list.3
+++ b/docs/man/al_get_opengl_extension_list.3
@@ -42,3 +42,10 @@ In case you want to manually check for extensions and load function
 pointers yourself (say, in case the Allegro developers did not include
 it yet), you can use the al_have_opengl_extension(3) and
 al_get_opengl_proc_address(3) functions instead.
+.RS
+.PP
+\f[I]Note:\f[] the exact extensions exposed depend on how Allegro was
+compiled.
+It is recommended to use al_have_opengl_extension(3) and
+al_get_opengl_proc_address(3) for the most stable experience.
+.RE
diff --git a/docs/man/al_init_acodec_addon.3 b/docs/man/al_init_acodec_addon.3
index 7c97bf1..8ce22ed 100644
--- a/docs/man/al_init_acodec_addon.3
+++ b/docs/man/al_init_acodec_addon.3
@@ -17,7 +17,7 @@ This function registers all the known audio file type handlers for
 al_load_sample(3), al_save_sample(3), al_load_audio_stream(3), etc.
 .PP
 Depending on what libraries are available, the full set of recognised
-extensions is: .wav, .flac, .ogg, .it, .mod, .s3m, .xm, .voc.
+extensions is: .wav, .flac, .ogg, .opus, .it, .mod, .s3m, .xm, .voc.
 .PP
 \f[I]Limitations:\f[]
 .IP \[bu] 2
diff --git a/docs/man/al_set_errno.3 b/docs/man/al_set_errno.3
index dbe5d6a..66aa159 100644
--- a/docs/man/al_set_errno.3
+++ b/docs/man/al_set_errno.3
@@ -9,6 +9,7 @@ al_set_errno \- Allegro 5 API
 
 
 void\ al_set_errno(int\ errnum)
+SETTER(allegro_errno,\ errnum)
 \f[]
 .fi
 .SH DESCRIPTION
diff --git a/docs/man/al_set_new_bitmap_depth.3 b/docs/man/al_set_new_bitmap_depth.3
new file mode 100644
index 0000000..cc1070b
--- /dev/null
+++ b/docs/man/al_set_new_bitmap_depth.3
@@ -0,0 +1,28 @@
+.TH "al_set_new_bitmap_depth" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+al_set_new_bitmap_depth \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro.h>
+
+void\ al_set_new_bitmap_depth(int\ depth)
+SETTER(new_bitmap_depth,\ depth)
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+Sets the depthbuffer depth used by newly created bitmaps (on the current
+thread) if they are used with al_set_target_bitmap(3).
+0 means no depth\-buffer will be created when drawing into the bitmap,
+which is the default.
+.SH SINCE
+.PP
+5.2.1
+.RS
+.PP
+\f[I][Unstable API]:\f[] This is an experimental feature and currently
+only works for the OpenGL backend.
+.RE
diff --git a/docs/man/al_set_new_bitmap_samples.3 b/docs/man/al_set_new_bitmap_samples.3
new file mode 100644
index 0000000..9c5f0c7
--- /dev/null
+++ b/docs/man/al_set_new_bitmap_samples.3
@@ -0,0 +1,54 @@
+.TH "al_set_new_bitmap_samples" "3" "" "Allegro reference manual" ""
+.SH NAME
+.PP
+al_set_new_bitmap_samples \- Allegro 5 API
+.SH SYNOPSIS
+.IP
+.nf
+\f[C]
+#include\ <allegro5/allegro.h>
+
+void\ al_set_new_bitmap_samples(int\ samples)
+SETTER(new_bitmap_samples,\ samples)
+\f[]
+.fi
+.SH DESCRIPTION
+.PP
+Sets the multi\-sampling samples used by newly created bitmaps (on the
+current thread) if they are used with al_set_target_bitmap(3).
+0 means multi\-sampling will not be used when drawing into the bitmap,
+which is the default.
+1 means multi\-sampling will be used but only using a single sample per
+pixel (so usually there will be no visual difference to not using
+multi\-sampling at all).
+.RS
+.PP
+\f[I]Note:\f[] Some platforms have restrictions on when the
+multi\-sampling buffer for a bitmap is realized, i.e.
+down\-scaled back to the actual bitmap dimensions.
+This may only happen after a call to al_set_target_bitmap(3).
+So for example:
+.RE
+.IP
+.nf
+\f[C]
+al_set_target_bitmap(multisample);
+al_clear_to_color(blue);
+al_draw_line(0,\ 0,\ 100,\ 100,\ red,\ 1);
+al_lock_bitmap(multisample,\ ...)
+//\ ERROR:\ the\ contents\ of\ the\ bitmap\ will\ be\ undefined
+
+al_set_target_bitmap(backbuffer);
+al_lock_bitmap(multisample,\ ...)
+//\ CORRECT:\ at\ this\ point,\ the\ bitmap\ contents\ are\ updated\ and
+//\ there\ will\ be\ an\ anti\-aliased\ line\ in\ it.
+\f[]
+.fi
+.SH SINCE
+.PP
+5.2.1
+.RS
+.PP
+\f[I][Unstable API]:\f[] This is an experimental feature and currently
+only works for the OpenGL backend.
+.RE
diff --git a/docs/man/al_set_shader_float_vector.3 b/docs/man/al_set_shader_float_vector.3
index a00f108..afd4c51 100644
--- a/docs/man/al_set_shader_float_vector.3
+++ b/docs/man/al_set_shader_float_vector.3
@@ -9,7 +9,7 @@ al_set_shader_float_vector \- Allegro 5 API
 #include\ <allegro5/allegro.h>
 
 bool\ al_set_shader_float_vector(const\ char\ *name,
-\ \ \ int\ num_components,\ float\ *f,\ int\ num_elems)
+\ \ \ int\ num_components,\ const\ float\ *f,\ int\ num_elems)
 \f[]
 .fi
 .SH DESCRIPTION
diff --git a/docs/man/al_set_shader_int_vector.3 b/docs/man/al_set_shader_int_vector.3
index 3b135b7..887ad22 100644
--- a/docs/man/al_set_shader_int_vector.3
+++ b/docs/man/al_set_shader_int_vector.3
@@ -9,7 +9,7 @@ al_set_shader_int_vector \- Allegro 5 API
 #include\ <allegro5/allegro.h>
 
 bool\ al_set_shader_int_vector(const\ char\ *name,
-\ \ \ int\ num_components,\ int\ *i,\ int\ num_elems)
+\ \ \ int\ num_components,\ const\ int\ *i,\ int\ num_elems)
 \f[]
 .fi
 .SH DESCRIPTION
diff --git a/docs/man/al_set_shader_matrix.3 b/docs/man/al_set_shader_matrix.3
index 1e778b2..9653901 100644
--- a/docs/man/al_set_shader_matrix.3
+++ b/docs/man/al_set_shader_matrix.3
@@ -9,7 +9,7 @@ al_set_shader_matrix \- Allegro 5 API
 #include\ <allegro5/allegro.h>
 
 bool\ al_set_shader_matrix(const\ char\ *name,
-\ \ \ ALLEGRO_TRANSFORM\ *matrix)
+\ \ \ const\ ALLEGRO_TRANSFORM\ *matrix)
 \f[]
 .fi
 .SH DESCRIPTION
diff --git a/docs/man/al_set_target_bitmap.3 b/docs/man/al_set_target_bitmap.3
index 4537f7a..49bd820 100644
--- a/docs/man/al_set_target_bitmap.3
+++ b/docs/man/al_set_target_bitmap.3
@@ -19,6 +19,13 @@ To return to drawing to a display, set the backbuffer of the display as
 the target bitmap, using al_get_backbuffer(3).
 As a convenience, you may also use al_set_target_backbuffer(3).
 .PP
+Each allegro bitmap maintains two transformation matrices associated
+with it for drawing onto the bitmap.
+There is a view matrix and a projection matrix.
+When you call al_set_target_bitmap, these will be made current for the
+bitmap, affecting global OpenGL and DirectX states depending on the
+driver in use.
+.PP
 Each video bitmap is tied to a display.
 When a video bitmap is set to as the target bitmap, the display that the
 bitmap belongs to is automatically made "current" for the calling thread
diff --git a/docs/scripts/make_doc.c b/docs/scripts/make_doc.c
index 50d33b5..1fd3379 100644
--- a/docs/scripts/make_doc.c
+++ b/docs/scripts/make_doc.c
@@ -138,7 +138,7 @@ static void load_prototypes(const char *filename)
 
          d_assign(text, lookup_source(name));
          if (strlen(text) == 0) {
-            strcat(text, "https://github.com/liballeg/allegro5/blob/5.1/");
+            strcat(text, "https://github.com/liballeg/allegro5/blob/master/");
             strcat(text, file_name);
             strcat(text, "#L");
             strcat(text, line_number);
diff --git a/docs/src/changes-5.2.txt b/docs/src/changes-5.2.txt
index b797df7..ad0abf0 100644
--- a/docs/src/changes-5.2.txt
+++ b/docs/src/changes-5.2.txt
@@ -3,6 +3,242 @@
 These lists serve as summaries; the full histories are in the git repository.
 
 
+Changes from 5.2.1.1 to 5.2.2 (December 2016)
+=======================================
+
+The main developers this time were: Trent Gamblin, SiegeLord, Elias Pschernig.
+
+Core:
+
+  - Don't accumulate time in the timer while it is stopped.
+
+  - Use dynamic OpenGL ES checks, so binaries produced on newer platforms
+    don't crash on older ones.
+
+  - Destabilize the OpenGL extensions API (BREAKING CHANGE!).
+
+Raspberry Pi port:
+
+  - Add various optimizations.
+
+  - Fix `al_set_mouse_xy` under X.
+
+Android port:
+
+  - Fix buffer overrun and memory leak in the clipboard support.
+
+  - Add WANT_GLES3 to disable some of the newer features on platforms where they
+    aren't supported.
+
+  - Fix build in Android versions below 3.1.
+
+  - Fix a crash when activity is destroyed/paused.
+
+  - Allow building for android mips, arm64 and mips64.
+
+  - Add `al_android_get_jni_env` and `al_android_get_activity` utility
+    functions.
+
+  - Update manifest files for newer Android versions.
+
+Windows port:
+
+  - Handle keyboard input properly when Ctrl is pressed (Tobias Scheuer).
+
+Hurd port:
+
+  - Define a fallback PATH_MAX (Andreas Rönnquist).
+
+OSX port:
+
+  - Clear window to black when going in/out of fullscreen.
+
+  - Fix window centering when going out of FULLSCREEN_WINDOW mode.
+
+  - Fix OSX 10.12 build.
+
+  - Allow 32 bit builds on OSX (MarcusCalhoun-Lopez).
+
+Build system:
+
+  - Fix issues with building on GCC6 on Windows.
+
+  - Fix source directory littering while configuring the Android build.
+
+Python binding:
+
+  - Add support Python 3 (Gabriel Queiroz).
+
+Documentation:
+
+  - Document the behavior of `al_set_target_bitmap` with respect to
+    transformations (Edgar Reynaldo).
+
+  - Fix typo in `al_use_transform` docs (Ryan Roden-Corrent).
+
+Examples:
+
+  - Add kerning to the `al_get_glyph` example in ex_ttf.
+
+  - Various fixes in ex_camera (Erich Erstu).
+
+
+Changes from 5.2.1 to 5.2.1.1 (August 2016)
+=======================================
+
+The main developers this time were: Trent Gamblin, SiegeLord.
+
+Core:
+
+  - Enforce backwards compatibility in the version check, rather than
+    erroneously allowing forwards compatiblity.
+
+  - Temporarily remove new extensions in ALLEGRO_OGL_EXT_LIST as that broke ABI
+    compatibility.
+
+OSX port:
+
+  - Temporarily revert changes in joystick detection, as it did not interact
+    well with some joysticks.
+
+Windows port:
+
+  - Fix the clear display to black right away to avoid an ugly white flash
+    change.
+
+
+Changes from 5.2.0 to 5.2.1 (July 2016)
+=======================================
+
+The main developers this time were: Elias Pschernig, Trent Gamblin, SiegeLord,
+Ryan Roden-Corrent, Boris Carvajal and Peter Hull.
+
+Core:
+
+  - Optimize bitmap holding a bit (Bruce Pascoe).
+
+  - Add `al_get/set_depth/samples` (OpenGL only for now).
+
+  - Optimize destruction performance when you have thousands of objects
+    (e.g. sub-bitmaps).
+
+  - Use low floating point precision for the OpenGL fragment shaders, which
+    helps performance a lot on mobile platforms.
+
+  - Don't stop and join the timer thread when stopping the last timer (prevents
+    unnecessary delay in this situation on some platforms).
+
+  - Add `al_backup_dirty_bitmap` and `al_backup_dirty_bitmaps` to more finely
+    control when bitmap context backup is performed.
+
+Android port:
+
+  - Fix Android app issues when woken up during sleep.
+
+  - Specify the Android toolchain file on the command line now.
+    ANDROID_NDK_TOOLCHAIN_ROOT now has to be specified in an environment
+    variable.
+
+OSX port:
+
+  - Improve joystick enumeration (Todd Cope).
+
+  - Make `al_set_new_window_title` work correctly.
+
+  - Don't send duplicate mouse move events.
+
+  - Fix mouse warping behavior.
+
+  - Exit fullscreen mode if ALLEGRO_FULLSCREEN_WINDOW is set when destroying a
+    display (otherwise if you destroy and recreate display without terminating
+    the program, a white window kicks around).
+
+iOS port:
+
+  - Make it compile again.
+
+  - Don't backup textures as it is unnecessary.
+
+  - Update minimum iOS to version to 6.1.
+
+  - Disable the native png loader in favor of libpng, as it is broken on
+    Apple's end.
+
+  - Create library when creating the archive.
+
+Windows port:
+
+  - Fix the D3D target bitmap bug.
+
+  - Clear display to black right away to avoid an ugly white flash.
+
+Raspberry Pi port:
+
+  - Fix system cursor support.
+
+Linux port:
+
+  - Make `al_set_new_window_title` work correctly.
+
+Build system:
+
+  - Use PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR instead of CMAKE_SOURCE_DIR
+    and CMAKE_BINARY_DIR. This lets you use Allegro as a sub-project in your
+    CMake project.
+
+  - Fix GDIPlus finding in cmake-gui (Bruce Pascoe).
+
+  - Add .gitignore and ignore build/ dir (Mark Oates).
+
+  - Fix building examples with non-Allegro dependencies with the monolith build.
+
+Documentation:
+
+  - Various documentation updates (Daniel Johnson and others).
+
+Other:
+
+  - Add more `#include` statements in Allegro headers, so it's easier to use
+    them in isolation (Jordan Woehr).
+
+  - Allow marking tests as being hardware only.
+
+  - Prefix some private Allegro macros and types to not pollute the namespace.
+
+  - Make set_shader_uniform api const-correct (Bruce Pascoe).
+
+Audio addon:
+
+  - Adjust loop end position when calling `al_set_sample_instance_length`.
+
+Acodec addon:
+
+  - Allow file-backed audio streams to be restarted after they finish.
+
+  - Add Opus codec support.
+
+Image addon:
+
+  - Fail gracefully if not built with PNG/JPG loaders.
+
+Native dialog addon:
+
+Font addon:
+
+  - Make `al_get_text_dimensions` and `al_get_glyph_dimensions` return exact
+    bounding boxes (koro).
+
+  - Add `ALLEGRO_GLYPH` structure and `al_get_glyph`, allowing for some
+    additional optimization when drawing fonts.
+
+Examples:
+
+  - Add more controls to `ex_audio_props`.
+
+  - Add an example of using Enet with Allegro.
+
+
+
 Changes from 5.1.13.1 to 5.2.0 (April 2016)
 ============================================
 
diff --git a/docs/src/refman/acodec.txt b/docs/src/refman/acodec.txt
index 90833c9..827f633 100644
--- a/docs/src/refman/acodec.txt
+++ b/docs/src/refman/acodec.txt
@@ -13,7 +13,7 @@ This function registers all the known audio file type handlers for
 [al_load_sample], [al_save_sample], [al_load_audio_stream], etc.
 
 Depending on what libraries are available, the full set of recognised
-extensions is: .wav, .flac, .ogg, .it, .mod, .s3m, .xm, .voc.
+extensions is: .wav, .flac, .ogg, .opus, .it, .mod, .s3m, .xm, .voc.
 
 *Limitations:*
 
diff --git a/docs/src/refman/color.txt b/docs/src/refman/color.txt
index b4f26cb..5d386df 100644
--- a/docs/src/refman/color.txt
+++ b/docs/src/refman/color.txt
@@ -27,6 +27,12 @@ See also: [al_color_cmyk], [al_color_rgb_to_cmyk]
 Return an [ALLEGRO_COLOR] structure from HSL (hue, saturation, lightness)
 values.
 
+Parameters:
+
+* hue - Color hue angle in the range 0..360
+* saturation - Color saturation in the range 0..1
+* lightness - Color lightness in the range 0..1
+
 See also: [al_color_hsl_to_rgb], [al_color_hsv]
 
 
@@ -36,10 +42,10 @@ Convert values in HSL color model to RGB color model.
 
 Parameters:
 
-* hue - Color hue angle in the range 0..360.
-* saturation - Color saturation in the range 0..1.
-* lightness - Color lightness in the range 0..1.
-* red, green, blue - returned RGB values in the range 0..1.
+* hue - Color hue angle in the range 0..360
+* saturation - Color saturation in the range 0..1
+* lightness - Color lightness in the range 0..1
+* red, green, blue - returned RGB values in the range 0..1
 
 See also: [al_color_rgb_to_hsl], [al_color_hsl], [al_color_hsv_to_rgb]
 
@@ -49,6 +55,12 @@ See also: [al_color_rgb_to_hsl], [al_color_hsl], [al_color_hsv_to_rgb]
 Return an [ALLEGRO_COLOR] structure from HSV (hue, saturation, value)
 values.
 
+Parameters:
+
+* hue - Color hue angle in the range 0..360
+* saturation - Color saturation in the range 0..1
+* value - Color value in the range 0..1
+
 See also: [al_color_hsv_to_rgb], [al_color_hsl]
 
 
@@ -58,10 +70,10 @@ Convert values in HSV color model to RGB color model.
 
 Parameters:
 
-* hue - Color hue angle in the range 0..360.
-* saturation - Color saturation in the range 0..1.
-* value - Color value in the range 0..1.
-* red, green, blue - returned RGB values in the range 0..1.
+* hue - Color hue angle in the range 0..360
+* saturation - Color saturation in the range 0..1
+* value - Color value in the range 0..1
+* red, green, blue - returned RGB values in the range 0..1
 
 See also: [al_color_rgb_to_hsv], [al_color_hsv], [al_color_hsl_to_rgb]
 
diff --git a/docs/src/refman/font.txt b/docs/src/refman/font.txt
index 400ea34..927179b 100644
--- a/docs/src/refman/font.txt
+++ b/docs/src/refman/font.txt
@@ -17,6 +17,41 @@ the FreeType library. If you instead pass the filename of a bitmap file, it will
 be loaded with [al_load_bitmap] and a font in Allegro's bitmap font format will
 be created from it with [al_grab_font_from_bitmap].
 
+### API: ALLEGRO_GLYPH
+
+A structure containing the properties of a character in a font.
+
+~~~~c
+typedef struct ALLEGRO_GLYPH {
+   ALLEGRO_BITMAP *bitmap;   // the bitmap the character is on
+   int x;                    // the x position of the glyph on bitmap
+   int y;                    // the y position of the glyph on bitmap
+   int w;                    // the width of the glyph in pixels
+   int h;                    // the height of the glyph in pixels
+   int kerning;              // pixels of kerning (see below)
+   int offset_x;             // x offset to draw the glyph at
+   int offset_y;             // y offset to draw the glyph at
+   int advance;              // number of pixels to advance after this character
+} ALLEGRO_GLYPH;
+~~~~
+
+bitmap may be a sub-bitmap in the case of color fonts.
+
+kerning should be added to the x position you draw to if you want your text
+kerned and depends on which codepoints [al_get_glyph] was called with.
+
+Glyphs are tightly packed onto the bitmap, so you need to add offset_x and
+offset_y to your draw position for the text to look right.
+
+advance is the number of pixels to add to your x position to advance to the
+next character in a string and includes kerning.
+
+Since: 5.2.1
+
+> *[Unstable API]:* This API is new and subject to refinement.
+
+See also: [al_get_glyph]
+
 ### API: al_init_font_addon
 
 Initialise the font addon.
@@ -373,7 +408,7 @@ to obtain a more visually pleasing result. Kerning adjusts the space between
 two individual glyphs with an offset determined by the author of the font.
 
 If you pass ALLEGRO_NO_KERNING as codepoint1 then al_get_glyph_advance
-will return 0. this cn be useful when drawing the first character of a string 
+will return 0. this can be useful when drawing the first character of a string 
 in a loop.
 
 Pass ALLEGRO_NO_KERNING as codepoint2 to get the horizontal advance width
@@ -402,7 +437,7 @@ may be like for two glypphs `A` and `l` of the same font that has kerning for
 the "Al" pair, without and with the ALLEGRO_NO_KERNING flag.
 
 
-    al_get_glyph_advance(font, 'A', 'l', 0)
+    al_get_glyph_advance(font, 'A', 'l')
          ___|___                  
         /       \  
         -------------            
@@ -414,7 +449,7 @@ the "Al" pair, without and with the ALLEGRO_NO_KERNING flag.
         -------------
         
         
-    al_get_glyph_advance(font, 'A', 'l', ALLEGRO_NO_KERNING)    
+    al_get_glyph_advance(font, 'A', ALLEGRO_NO_KERNING)
          ____|____
         /         \  
         ---------------
@@ -739,3 +774,17 @@ See also: [al_load_ttf_font_stretch]
 
 Returns the (compiled) version of the addon, in the same format as
 [al_get_allegro_version].
+
+### API: al_get_glyph
+
+Gets all the information about a glyph, including the bitmap, needed to draw it
+yourself. prev_codepoint is the codepoint in the string before the one you want
+to draw and is used for kerning. codepoint is the character you want to get info
+about. You should clear the 'glyph' structure to 0 with memset before passing it
+to this function for future compatibility.
+
+Since: 5.2.1
+
+> *[Unstable API]:* This API is new and subject to refinement.
+
+See also: [ALLEGRO_GLYPH]
diff --git a/docs/src/refman/getting_started.txt b/docs/src/refman/getting_started.txt
index fb44260..41991f4 100644
--- a/docs/src/refman/getting_started.txt
+++ b/docs/src/refman/getting_started.txt
@@ -176,9 +176,9 @@ The latter simply points to an [ALLEGRO_SAMPLE] and will stream it for you.
 
 ## Unstable API
 
-Some of Allegro's API is marked as unstable, which means that future versions
+Some of Allegro's API is marked as unstable, which means that in future versions
 of Allegro it may change or even be removed entirely! If you want to experiment
-with unstable API, define `ALLEGRO_UNSTABLE` macro before including Allegro's
+with the unstable API, define `ALLEGRO_UNSTABLE` macro before including Allegro's
 headers.
 
 Note that when you define that macro, the version check performed by
diff --git a/docs/src/refman/graphics.txt b/docs/src/refman/graphics.txt
index a025e21..92dadae 100644
--- a/docs/src/refman/graphics.txt
+++ b/docs/src/refman/graphics.txt
@@ -673,7 +673,67 @@ the best format.
 See also: [ALLEGRO_PIXEL_FORMAT], [al_get_new_bitmap_format],
 [al_get_bitmap_format]
 
+### API: al_set_new_bitmap_depth
 
+Sets the depthbuffer depth used by newly created bitmaps (on the current
+thread) if they are used with [al_set_target_bitmap]. 0 means no
+depth-buffer will be created when drawing into the bitmap, which is the
+default.
+
+Since: 5.2.1
+
+> *[Unstable API]:* This is an experimental feature and currently only works for
+the OpenGL backend.
+
+### API: al_get_new_bitmap_depth
+
+Returns the value currently set with [al_set_new_bitmap_depth] on
+the current thread or 0 if none was set.
+
+Since: 5.2.1
+
+> *[Unstable API]:* This is an experimental feature and currently only works for
+the OpenGL backend.
+
+### API: al_set_new_bitmap_samples
+
+Sets the multi-sampling samples used by newly created bitmaps (on the
+current thread) if they are used with [al_set_target_bitmap]. 0 means
+multi-sampling will not be used when drawing into the bitmap, which is
+the default. 1 means multi-sampling will be used but only using a single
+sample per pixel (so usually there will be no visual difference to not
+using multi-sampling at all).
+
+> *Note:* Some platforms have restrictions on when the multi-sampling
+buffer for a bitmap is realized, i.e. down-scaled back to the actual
+bitmap dimensions. This may only happen after a call to
+[al_set_target_bitmap]. So for example:
+
+    al_set_target_bitmap(multisample);
+    al_clear_to_color(blue);
+    al_draw_line(0, 0, 100, 100, red, 1);
+    al_lock_bitmap(multisample, ...)
+    // ERROR: the contents of the bitmap will be undefined
+
+    al_set_target_bitmap(backbuffer);
+    al_lock_bitmap(multisample, ...)
+    // CORRECT: at this point, the bitmap contents are updated and
+    // there will be an anti-aliased line in it.
+
+Since: 5.2.1
+
+> *[Unstable API]:* This is an experimental feature and currently only works for
+the OpenGL backend.
+
+### API: al_get_new_bitmap_samples
+
+Returns the value currently set with [al_set_new_bitmap_samples] on
+the current thread or 0 if none was set.
+
+Since: 5.2.1
+
+> *[Unstable API]:* This is an experimental feature and currently only works for
+the OpenGL backend.
 
 ## Bitmap properties
 
@@ -697,6 +757,26 @@ Returns the height of a bitmap in pixels.
 
 Returns the width of a bitmap in pixels.
 
+### API: al_get_bitmap_depth
+
+Return the depthbuffer depth used by this bitmap if it is used with
+[al_set_target_bitmap].
+
+Since: 5.2.1
+
+> *[Unstable API]:* This is an experimental feature and currently only works for
+the OpenGL backend.
+
+### API: al_get_bitmap_samples
+
+Return the multi-sampling samples used by this bitmap if it is used with
+[al_set_target_bitmap].
+
+Since: 5.2.1
+
+> *[Unstable API]:* This is an experimental feature and currently only works for
+the OpenGL backend.
+
 ### API: al_get_pixel
 
 Get a pixel's color value from the specified bitmap.  This operation is slow
@@ -1062,6 +1142,8 @@ before being drawn.
 
 See also: [ALLEGRO_COLOR], [al_put_pixel]
 
+## Target bitmap
+
 ### API: al_set_target_bitmap
 
 This function selects the bitmap to which all subsequent drawing operations in
@@ -1070,6 +1152,11 @@ To return to drawing to a display, set the backbuffer of the display as the
 target bitmap, using [al_get_backbuffer]. As a convenience, you may also use
 [al_set_target_backbuffer].
 
+Each allegro bitmap maintains two transformation matrices associated with it for
+drawing onto the bitmap. There is a view matrix and a projection matrix. When you
+call al_set_target_bitmap, these will be made current for the bitmap, affecting
+global OpenGL and DirectX states depending on the driver in use.
+
 Each video bitmap is tied to a display. When a video bitmap is set to as the
 target bitmap, the display that the bitmap belongs to is automatically made
 "current" for the calling thread (if it is not current already).  Then drawing
@@ -1797,3 +1884,34 @@ Since: 5.1.2
 
 See also: [ALLEGRO_RENDER_STATE], [ALLEGRO_RENDER_FUNCTION],
 [ALLEGRO_WRITE_MASK_FLAGS]
+
+
+### API: al_backup_dirty_bitmap
+
+On some platforms, notably Windows Direct3D and Android, textures may be
+lost at any time for events such as display resize or switching out of the
+app. On those platforms, bitmaps created without the ALLEGRO_NO_PRESERVE_TEXTURE
+flag automatically get backed up to system memory every time
+al_flip_display is called.
+
+This function gives you more control over when your bitmaps get backed up.
+By calling this function after modifying a bitmap, you can make sure the
+bitmap is backed up right away instead of during the next flip.
+
+Since: 5.2.1
+
+> *[Unstable API]:* This API is new and subject to refinement.
+
+See also: [al_backup_dirty_bitmaps], [al_create_bitmap]
+
+
+### API: al_backup_dirty_bitmaps
+
+Backs up all of a display's bitmaps to system memory.
+
+Since: 5.2.1
+
+> *[Unstable API]:* This API is new and subject to refinement.
+
+See also: [al_backup_dirty_bitmap]
+
diff --git a/docs/src/refman/index.txt b/docs/src/refman/index.txt
index 9569251..e88c8c3 100644
--- a/docs/src/refman/index.txt
+++ b/docs/src/refman/index.txt
@@ -50,4 +50,5 @@ Addons
 * [Native dialogs addon](native_dialog.html)
 * [PhysicsFS addon](physfs.html)
 * [Primitives addon](primitives.html)
+* [Video streaming addon](video.html)
 
diff --git a/docs/src/refman/opengl.txt b/docs/src/refman/opengl.txt
index ac968db..5d89a7f 100644
--- a/docs/src/refman/opengl.txt
+++ b/docs/src/refman/opengl.txt
@@ -35,6 +35,10 @@ yourself (say, in case the Allegro developers did not include it yet), you
 can use the [al_have_opengl_extension] and
 [al_get_opengl_proc_address] functions instead.
 
+> *Note:* the exact extensions exposed depend on how Allegro was compiled. It
+is recommended to use [al_have_opengl_extension] and
+[al_get_opengl_proc_address] for the most stable experience.
+
 ## API: al_get_opengl_proc_address
 
 Helper to get the address of an OpenGL symbol
diff --git a/docs/src/refman/platform.txt b/docs/src/refman/platform.txt
index a96cb45..e802589 100644
--- a/docs/src/refman/platform.txt
+++ b/docs/src/refman/platform.txt
@@ -123,6 +123,39 @@ Android platform that the calling Allegro program is running on.
 
 Since: 5.1.2
 
+### API: al_android_get_jni_env
+
+Returns the Android JNI environment used by Allegro to call into Java.
+As a convenience this function provides it to the user so there is no
+need to obtain it yourself.
+
+For example if you have a Java method "void send(String message)" in
+your activity class, you could call it like this from C code:
+
+~~~~c
+JNIEnv * env = al_android_get_jni_env();
+jclass class_id = (* env)->GetObjectClass(env, al_android_get_activity());
+jmethodID method_id = (* env)->GetMethodID(env, class_id, "send",
+    "(Ljava/lang/String;)V");
+jstring jdata = (* env)->NewStringUTF(env, "Hello Java!");
+(* env)->CallVoidMethod(env, al_android_get_activity(), method_id, jdata);
+(* env)->DeleteLocalRef(env, jdata);
+~~~~
+
+Since: 5.2.2
+
+> *[Unstable API]:* This API is new and subject to refinement.
+
+### API: al_android_get_activity
+
+Returns the Java Android activity used by Allegro. This is the same
+object created by Android from the class you specify in your manifest
+and either an instance of AllegroActivity or a derived class.
+
+Since: 5.2.2
+
+> *[Unstable API]:* This API is new and subject to refinement.
+
 ## X11
 
 These functions are declared in the following header file:
diff --git a/docs/src/refman/transformations.txt b/docs/src/refman/transformations.txt
index 1d3209a..98a3127 100644
--- a/docs/src/refman/transformations.txt
+++ b/docs/src/refman/transformations.txt
@@ -75,7 +75,7 @@ al_identity_transform(&T);
 al_compose_transform(&T, &T1);
 al_compose_transform(&T, &T2);
 
-al_use_transform(T);
+al_use_transform(&T);
 ~~~~
 
 it does exactly the same as:
@@ -84,7 +84,7 @@ it does exactly the same as:
 al_identity_transform(&T);
 al_scale_transform(&T, 2, 2);
 al_translate_transform(&T, 100, 0);
-al_use_transform(T);
+al_use_transform(&T);
 ~~~~
 
 ## API: ALLEGRO_TRANSFORM
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 09c0fd7..05c7926 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -122,6 +122,7 @@ example(ex_compressed ${IMAGE} ${FONT} ${DATA_IMAGES})
 example(ex_convert CONSOLE ${IMAGE})
 example(ex_cpu ${FONT})
 example(ex_depth_mask ${IMAGE} ${TTF} ${DATA_IMAGES} ${DATA_TTF})
+example(ex_depth_target ${IMAGE} ${FONT} ${COLOR} ${PRIM})
 example(ex_disable_screensaver ${FONT})
 example(ex_display_events ${FONT} ${PRIM})
 example(ex_display_options ${FONT} ${PRIM})
@@ -151,6 +152,7 @@ example(ex_mouse_events ${FONT} ${IMAGE} ${PRIM} ${DATA_IMAGES})
 example(ex_mouse_focus)
 example(ex_mouse_warp ${FONT} ${PRIM})
 example(ex_multisample ${FONT} ${COLOR} ${PRIM})
+example(ex_multisample_target ${IMAGE} ${FONT} ${COLOR} ${PRIM})
 example(ex_multiwin ${IMAGE})
 example(ex_nodisplay ${IMAGE} ${DATA_IMAGES})
 example(ex_noframe ${IMAGE} ${DATA_IMAGES})
@@ -185,8 +187,8 @@ example(ex_winfull)
 example(ex_video ${AUDIO} ${FONT} ${PRIM} ${VIDEO})
 
 if(WANT_D3D AND D3DX9_FOUND)
-    example(ex_d3d ex_d3d.cpp ${D3DX9_LIBRARY})
-endif(WANT_D3D AND D3DX9_FOUND)
+    example(ex_d3d ex_d3d.cpp EXTRA_LIBS ${D3DX9_LIBRARY})
+endif()
 
 if(SUPPORT_OPENGL AND NOT IPHONE AND NOT ANDROID AND NOT ALLEGRO_RASPBERRYPI)
     example(ex_gldepth ${FONT} ${IMAGE})
@@ -236,13 +238,20 @@ if(WANT_CURL_EXAMPLE)
     if(CURL_FOUND)
         if(WIN32)
             # select() is in the Winsock library.
-            example(ex_curl ${CURL_LIBRARIES} ${IMAGE} ws2_32)
+            example(ex_curl ${IMAGE} EXTRA_LIBS ${CURL_LIBRARIES} ws2_32)
         else(WIN32)
-            example(ex_curl ${CURL_LIBRARIES} ${IMAGE})
+            example(ex_curl ${IMAGE} EXTRA_LIBS ${CURL_LIBRARIES})
         endif(WIN32)
     endif(CURL_FOUND)
 endif(WANT_CURL_EXAMPLE)
 
+# Only build the enet examples if libenet is installed
+find_package(ENet)
+if(ENET_FOUND)
+    example(ex_enet_client ${PRIM} EXTRA_LIBS ${ENET_LIBRARIES})
+    example(ex_enet_server EXTRA_LIBS ${ENET_LIBRARIES})
+endif()
+
 # example(ex_ogre3d ex_ogre3d.cpp)
 # include_directories(/usr/include/OGRE)
 # target_link_libraries(ex_ogre3d OgreMain)
diff --git a/examples/Helper.cmake b/examples/Helper.cmake
index 2947654..ed5d690 100644
--- a/examples/Helper.cmake
+++ b/examples/Helper.cmake
@@ -5,7 +5,7 @@ function(example name)
     # Use cmake_parse_arguments first.
     set(flags CONSOLE)
     set(single_args) # none
-    set(accum_args DATA)
+    set(accum_args DATA EXTRA_LIBS)
     cmake_parse_arguments(MYOPTS "${flags}" "${single_args}" "${accum_args}"
         ${ARGN})
 
@@ -51,6 +51,11 @@ function(example name)
         set(libs ${ALLEGRO_MONOLITH_LINK_WITH})
     endif()
 
+    # Append the extra, non-Allegro libraries.
+    foreach(lib ${MYOPTS_EXTRA_LIBS})
+        list(APPEND libs ${lib})
+    endforeach()
+
     list(REMOVE_DUPLICATES libs)
 
     if(WIN32)
diff --git a/examples/enet_common.h b/examples/enet_common.h
new file mode 100644
index 0000000..4b56b4f
--- /dev/null
+++ b/examples/enet_common.h
@@ -0,0 +1,48 @@
+#ifndef ENET_COMMON_H
+#define ENET_COMMON_H
+
+#include <allegro5/allegro.h>
+
+#define SCREEN_W 640
+#define SCREEN_H 480
+
+#define FPS 30           // framerate
+#define PLAYER_SIZE 16   // radius of player circle
+#define PLAYER_SPEED 200 // movement rate of player in pixels/sec
+#define MAX_PLAYER_COUNT 32
+#define DEFAULT_PORT 9234
+
+typedef enum
+{
+    PLAYER_JOIN,
+    PLAYER_LEAVE,
+    POSITION_UPDATE,
+} MESSAGE_TYPE;
+
+// message sent from client to server
+typedef struct
+{
+    int x; // requested x movement (-1, 0, or 1)
+    int y; // requested y movement (-1, 0, or 1)
+} ClientMessage;
+
+// message sent from server to client
+typedef struct
+{
+    int player_id;
+    MESSAGE_TYPE type;
+    int x;               // current position (x)
+    int y;               // current position (y)
+    ALLEGRO_COLOR color; // valid when type == PLAYER_JOIN
+} ServerMessage;
+
+// storage for all players
+struct
+{
+   bool active;
+   int x, y;   // current position
+   int dx, dy; // direction of movemnt
+   ALLEGRO_COLOR color;
+} players[MAX_PLAYER_COUNT];
+
+#endif
diff --git a/examples/ex_audio_props.cpp b/examples/ex_audio_props.cpp
index c06a21f..2462e3e 100644
--- a/examples/ex_audio_props.cpp
+++ b/examples/ex_audio_props.cpp
@@ -21,11 +21,14 @@ ALLEGRO_SAMPLE_INSTANCE *sample_inst;
 class Prog {
 private:
    Dialog d;
+   Label length_label;
+   HSlider length_slider;
    ToggleButton pan_button;
    HSlider pan_slider;
    Label speed_label;
    HSlider speed_slider;
    ToggleButton bidir_button;
+   ToggleButton play_button;
    Label gain_label;
    VSlider gain_slider;
    Label mixer_gain_label;
@@ -35,18 +38,21 @@ private:
    Label zero_label;
 
 public:
-   Prog(const Theme & theme, ALLEGRO_DISPLAY *display);
+   Prog(const Theme & theme, ALLEGRO_DISPLAY *display, unsigned int instance_len);
    void run();
    void update_properties();
 };
 
-Prog::Prog(const Theme & theme, ALLEGRO_DISPLAY *display) :
+Prog::Prog(const Theme & theme, ALLEGRO_DISPLAY *display, unsigned int instance_len) :
    d(Dialog(theme, display, 40, 20)),
+   length_label(Label("Length")),
+   length_slider(HSlider(instance_len, instance_len)),
    pan_button(ToggleButton("Pan")),
    pan_slider(HSlider(1000, 2000)),
    speed_label(Label("Speed")),
    speed_slider(HSlider(1000, 5000)),
    bidir_button(ToggleButton("Bidir")),
+   play_button(ToggleButton("Play")),
    gain_label(Label("Gain")),
    gain_slider(VSlider(1000, 2000)),
    mixer_gain_label(Label("Mixer gain")),
@@ -56,6 +62,11 @@ Prog::Prog(const Theme & theme, ALLEGRO_DISPLAY *display) :
    zero_label(Label("0.0"))
 {
    pan_button.set_pushed(true);
+   play_button.set_pushed(true);
+
+   d.add(length_label,  2, 8,  4, 1);
+   d.add(length_slider, 6, 8, 22, 1);
+
    d.add(pan_button, 2, 10,  4, 1);
    d.add(pan_slider, 6, 10, 22, 1);
 
@@ -63,6 +74,7 @@ Prog::Prog(const Theme & theme, ALLEGRO_DISPLAY *display) :
    d.add(speed_slider, 6, 12, 22, 1);
 
    d.add(bidir_button, 2, 14, 4, 1);
+   d.add(play_button, 6, 14, 4, 1);
 
    d.add(gain_label,  29, 1, 2,  1);
    d.add(gain_slider, 29, 2, 2, 17);
@@ -93,6 +105,7 @@ void Prog::run()
 
 void Prog::update_properties()
 {
+   int length;
    float pan;
    float speed;
    float gain;
@@ -107,11 +120,16 @@ void Prog::update_properties()
    speed = speed_slider.get_cur_value() / 1000.0f;
    al_set_sample_instance_speed(sample_inst, speed);
 
+   length = length_slider.get_cur_value();
+   al_set_sample_instance_length(sample_inst, length);
+
    if (bidir_button.get_pushed())
       al_set_sample_instance_playmode(sample_inst, ALLEGRO_PLAYMODE_BIDIR);
    else
       al_set_sample_instance_playmode(sample_inst, ALLEGRO_PLAYMODE_LOOP);
 
+   al_set_sample_instance_playing(sample_inst, play_button.get_pushed());
+
    gain = gain_slider.get_cur_value() / 1000.0f;
    al_set_sample_instance_gain(sample_inst, gain);
 
@@ -175,7 +193,7 @@ int main(int argc, char **argv)
    /* Don't remove these braces. */
    {
       Theme theme(font_gui);
-      Prog prog(theme, display);
+      Prog prog(theme, display, al_get_sample_instance_length(sample_inst));
       prog.run();
    }
 
diff --git a/examples/ex_bitmap_flip.c b/examples/ex_bitmap_flip.c
index 533dd00..75a6f46 100644
--- a/examples/ex_bitmap_flip.c
+++ b/examples/ex_bitmap_flip.c
@@ -6,6 +6,7 @@
 
 #include "common.c"
 
+/* Fire the update every 10 milliseconds. */
 #define INTERVAL 0.01
 
 
@@ -15,7 +16,7 @@ float bmp_dx = 96;
 float bmp_dy = 96;
 int bmp_flag = 0;
 
-
+/* Updates the bitmap velocity, orientation and position. */
 static void update(ALLEGRO_BITMAP *bmp)
 {
    ALLEGRO_BITMAP *target = al_get_target_bitmap();
@@ -67,6 +68,7 @@ int main(int argc, char **argv)
    bool done = false;
    bool redraw = true;
 
+   /* Silence unused arguments warnings. */
    (void)argc;
    (void)argv;
 
@@ -74,22 +76,35 @@ int main(int argc, char **argv)
       abort_example("Failed to init Allegro.\n");
    }
 
+   /* Initialize the image addon. Requires the allegro_image addon
+    * library.
+    */
    if (!al_init_image_addon()) {
       abort_example("Failed to init IIO addon.\n");
    }
 
+   /* Initialize the image font. Requires the allegro_font addon
+    * library.
+    */
    al_init_font_addon();
-   init_platform_specific();
+   init_platform_specific(); /* Helper functions from common.c. */
 
+   /* Create a new display that we can render the image to. */
    display = al_create_display(640, 480);
    if (!display) {
       abort_example("Error creating display.\n");
    }
 
+   /* Allegro requires installing drivers for all input devices before
+    * they can be used.
+    */
    if (!al_install_keyboard()) {
       abort_example("Error installing keyboard.\n");
    }
 
+   /* Loads a font from disk. This will use al_load_bitmap_font if you
+    * pass the name of a known bitmap format, or else al_load_ttf_font.
+    */
    font = al_load_font("data/fixed_font.tga", 0, 0);
    if (!font) {
       abort_example("Error loading data/fixed_font.tga\n");
@@ -117,13 +132,17 @@ int main(int argc, char **argv)
 
    al_start_timer(timer);
 
+   /* Default premultiplied aplha blending. */
    al_set_blender(ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_INVERSE_ALPHA);
 
+   /* Primary 'game' loop. */
    while (!done) {
       ALLEGRO_EVENT event;
 
+      /* If the timer has since been fired and the queue is empty, draw.*/
       if (redraw && al_is_event_queue_empty(queue)) {
          update(bmp);
+         /* Clear so we don't get trippy artifacts left after zoom. */
          al_clear_to_color(al_map_rgb_f(0, 0, 0));
          al_draw_tinted_bitmap(bmp, al_map_rgba_f(1, 1, 1, 0.5),
             bmp_x, bmp_y, bmp_flag);
@@ -138,6 +157,9 @@ int main(int argc, char **argv)
             if (event.keyboard.keycode == ALLEGRO_KEY_ESCAPE)
                done = true;
             else if (event.keyboard.keycode == ALLEGRO_KEY_SPACE) {
+               /* Spacebar toggles whether render from a memory bitmap
+                * or display bitamp.
+                */
                if (bmp == mem_bmp) {
                   bmp = disp_bmp;
                   text = "Display bitmap (space to change)";
diff --git a/examples/ex_camera.c b/examples/ex_camera.c
index 965866d..6e92616 100644
--- a/examples/ex_camera.c
+++ b/examples/ex_camera.c
@@ -58,6 +58,15 @@ static double vector_dot_product(Vector a, Vector b)
    return a.x * b.x + a.y * b.y + a.z * b.z;
 }
 
+/* Calculate the cross product of two vectors. This produces a normal to the
+ * plane containing the operands.
+ */
+static Vector vector_cross_product(Vector a, Vector b)
+{
+   Vector v = {a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x};
+   return v;
+}
+
 /* Return a vector multiplied by a scalar. */
 static Vector vector_mul(Vector a, float s)
 {
@@ -94,9 +103,14 @@ static void camera_rotate_around_axis(Camera *c, Vector axis, double radians)
    ALLEGRO_TRANSFORM t;
    al_identity_transform(&t);
    al_rotate_transform_3d(&t, axis.x, axis.y, axis.z, radians);
-   al_transform_coordinates_3d(&t, &c->xaxis.x, &c->xaxis.y, &c->xaxis.z);
    al_transform_coordinates_3d(&t, &c->yaxis.x, &c->yaxis.y, &c->yaxis.z);
    al_transform_coordinates_3d(&t, &c->zaxis.x, &c->zaxis.y, &c->zaxis.z);
+
+   /* Make sure the axes remain orthogonal to each other. */
+   c->zaxis = vector_normalize(c->zaxis);
+   c->xaxis = vector_cross_product(c->yaxis, c->zaxis);
+   c->xaxis = vector_normalize(c->xaxis);
+   c->yaxis = vector_cross_product(c->zaxis, c->xaxis);
 }
 
 /* Move the camera along its x axis and z axis (which corresponds to
@@ -247,30 +261,30 @@ static void add_skybox(void)
    ALLEGRO_COLOR c3 = al_color_name("white");
 
    /* Back skybox wall. */
-   add_quad(p.x - 50, 0, p.z - 50, 100, 0, 0, 0, 50, 0, c1, c2);
+   add_quad(p.x - 50, p.y, p.z - 50, 100, 0, 0, 0, 50, 0, c1, c2);
    /* Front skybox wall. */
-   add_quad(p.x - 50, 0, p.z + 50, 100, 0, 0, 0, 50, 0, c1, c2);
+   add_quad(p.x - 50, p.y, p.z + 50, 100, 0, 0, 0, 50, 0, c1, c2);
    /* Left skybox wall. */
-   add_quad(p.x - 50, 0, p.z - 50, 0, 0, 100, 0, 50, 0, c1, c2);
+   add_quad(p.x - 50, p.y, p.z - 50, 0, 0, 100, 0, 50, 0, c1, c2);
    /* Right skybox wall. */
-   add_quad(p.x + 50, 0, p.z - 50, 0, 0, 100, 0, 50, 0, c1, c2);
+   add_quad(p.x + 50, p.y, p.z - 50, 0, 0, 100, 0, 50, 0, c1, c2);
 
    /* Top of skybox. */
-   add_vertex(p.x - 50, 50, p.z - 50, c2);
-   add_vertex(p.x + 50, 50, p.z - 50, c2);
-   add_vertex(p.x, 50, p.z, c3);
+   add_vertex(p.x - 50, p.y + 50, p.z - 50, c2);
+   add_vertex(p.x + 50, p.y + 50, p.z - 50, c2);
+   add_vertex(p.x, p.y + 50, p.z, c3);
 
-   add_vertex(p.x + 50, 50, p.z - 50, c2);
-   add_vertex(p.x + 50, 50, p.z + 50, c2);
-   add_vertex(p.x, 50, p.z, c3);
+   add_vertex(p.x + 50, p.y + 50, p.z - 50, c2);
+   add_vertex(p.x + 50, p.y + 50, p.z + 50, c2);
+   add_vertex(p.x, p.y + 50, p.z, c3);
 
-   add_vertex(p.x + 50, 50, p.z + 50, c2);
-   add_vertex(p.x - 50, 50, p.z + 50, c2);
-   add_vertex(p.x, 50, p.z, c3);
+   add_vertex(p.x + 50, p.y + 50, p.z + 50, c2);
+   add_vertex(p.x - 50, p.y + 50, p.z + 50, c2);
+   add_vertex(p.x, p.y + 50, p.z, c3);
 
-   add_vertex(p.x - 50, 50, p.z + 50, c2);
-   add_vertex(p.x - 50, 50, p.z - 50, c2);
-   add_vertex(p.x, 50, p.z, c3);
+   add_vertex(p.x - 50, p.y + 50, p.z + 50, c2);
+   add_vertex(p.x - 50, p.y + 50, p.z - 50, c2);
+   add_vertex(p.x, p.y + 50, p.z, c3);
 }
 
 static void draw_scene(void)
@@ -315,6 +329,7 @@ static void draw_scene(void)
    al_identity_transform(&t);
    al_use_transform(&t);
    al_use_projection_transform(&projection);
+   al_set_render_state(ALLEGRO_DEPTH_TEST, 0);
 
    /* Draw some text. */
    th = al_get_font_line_height(ex.font);
@@ -402,7 +417,6 @@ static void handle_input(void)
          camera_move_along_direction(&ex.camera, ex.movement_speed * x,
             ex.movement_speed * y);
       }
-         
    }
 
    /* Rotate the camera, either freely or around world up only. */
diff --git a/examples/ex_depth_target.c b/examples/ex_depth_target.c
new file mode 100644
index 0000000..767ea9e
--- /dev/null
+++ b/examples/ex_depth_target.c
@@ -0,0 +1,236 @@
+#define ALLEGRO_UNSTABLE
+#include <allegro5/allegro.h>
+#include <allegro5/allegro_image.h>
+#include <allegro5/allegro_font.h>
+#include <allegro5/allegro_color.h>
+#include <allegro5/allegro_primitives.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include "common.c"
+
+#define FPS 60
+
+struct Example {
+   ALLEGRO_BITMAP *target_depth;
+   ALLEGRO_BITMAP *target_no_depth;
+   ALLEGRO_BITMAP *target_no_multisample;
+   ALLEGRO_FONT *font;
+   double t;
+   double direct_speed_measure;
+} example;
+
+static void draw_on_target(ALLEGRO_BITMAP *target)
+{
+   ALLEGRO_STATE state;
+   ALLEGRO_TRANSFORM transform;
+   
+   al_store_state(&state, ALLEGRO_STATE_TARGET_BITMAP |
+      ALLEGRO_STATE_TRANSFORM |
+      ALLEGRO_STATE_PROJECTION_TRANSFORM);
+
+   al_set_target_bitmap(target);
+   al_clear_to_color(al_map_rgba_f(0, 0, 0, 0));
+   al_clear_depth_buffer(1);
+
+   al_identity_transform(&transform);
+   al_translate_transform_3d(&transform, 0, 0, 0);
+   al_orthographic_transform(&transform,
+      -1, 1, -1, 1, -1, 1);
+   al_use_projection_transform(&transform);
+
+   al_draw_filled_rectangle(-0.75, -0.5, 0.75, 0.5, al_color_name("blue"));
+
+   al_set_render_state(ALLEGRO_DEPTH_TEST, true);
+
+   int i, j;
+   for (i = 0; i < 24; i++) {
+      for (j = 0; j < 2; j++) {
+         al_identity_transform(&transform);
+         al_translate_transform_3d(&transform, 0, 0, j * 0.01);
+         al_rotate_transform_3d(&transform, 0, 1, 0,
+            ALLEGRO_PI * (i / 12.0 + example.t / 2));
+         al_rotate_transform_3d(&transform, 1, 0, 0, ALLEGRO_PI * 0.25);
+         al_use_transform(&transform);
+         if (j == 0)
+            al_draw_filled_rectangle(0, -.5, .5, .5, i % 2 == 0 ?
+               al_color_name("yellow") : al_color_name("red"));
+         else
+            al_draw_filled_rectangle(0, -.5, .5, .5, i % 2 == 0 ?
+               al_color_name("goldenrod") : al_color_name("maroon"));
+      }
+   }
+
+   al_set_render_state(ALLEGRO_DEPTH_TEST, false);
+
+   al_identity_transform(&transform);
+   al_use_transform(&transform);
+  
+   al_draw_line(0.9, 0, 1, 0, al_color_name("black"), 0.05);
+   al_draw_line(-0.9, 0, -1, 0, al_color_name("black"), 0.05);
+   al_draw_line(0, 0.9, 0, 1, al_color_name("black"), 0.05);
+   al_draw_line(0, -0.9, 0, -1, al_color_name("black"), 0.05);
+
+   al_restore_state(&state);
+}
+
+static void redraw(void)
+{
+   double w = 512, h = 512;
+   ALLEGRO_COLOR black = al_color_name("black");
+   draw_on_target(example.target_depth);
+   draw_on_target(example.target_no_depth);
+   draw_on_target(example.target_no_multisample);
+
+   al_clear_to_color(al_color_name("green"));
+
+   ALLEGRO_TRANSFORM transform;
+
+   al_identity_transform(&transform);
+   al_use_transform(&transform);
+   al_translate_transform(&transform, -128, -128);
+   al_rotate_transform(&transform, example.t * ALLEGRO_PI / 3);
+   al_translate_transform(&transform, 512 + 128, 128);
+   al_use_transform(&transform);
+   al_draw_bitmap(example.target_no_depth, 0, 0, 0);
+   al_draw_text(example.font, black, 0, 0, 0, "no depth");
+
+   al_identity_transform(&transform);
+   al_use_transform(&transform);
+   al_translate_transform(&transform, -128, -128);
+   al_rotate_transform(&transform, example.t * ALLEGRO_PI / 3);
+   al_translate_transform(&transform, 512 + 128, 256 + 128);
+   al_use_transform(&transform);
+   al_draw_bitmap(example.target_no_multisample, 0, 0, 0);
+   al_draw_textf(example.font, black, 0, 0, 0, "no multisample");
+
+   al_identity_transform(&transform);
+   al_use_transform(&transform);
+   al_translate_transform(&transform, -256, -256);
+   al_rotate_transform(&transform, example.t * ALLEGRO_PI / 3);
+   al_translate_transform(&transform, 256, 256);
+   al_use_transform(&transform);
+   al_draw_bitmap(example.target_depth, 0, 0, 0);
+
+   al_draw_line(30, h / 2, 60, h / 2, black, 12);
+   al_draw_line(w - 30, h / 2, w - 60, h / 2, black, 12);
+   al_draw_line(w / 2, 30, w / 2, 60, black, 12);
+   al_draw_line(w / 2, h - 30, w / 2, h - 60, black, 12);
+   al_draw_text(example.font, black, 30, h / 2 - 16, 0, "back buffer");
+   al_draw_text(example.font, black, 0, h / 2 + 10, 0, "bitmap");
+
+   al_identity_transform(&transform);
+   al_use_transform(&transform);
+   al_draw_textf(example.font, black, w, 0,
+      ALLEGRO_ALIGN_RIGHT, "%.1f FPS", 1.0 / example.direct_speed_measure);
+}
+
+static void update(void)
+{
+   example.t += 1.0 / FPS;
+}
+
+static void init(void)
+{
+   al_set_new_bitmap_flags(ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR);
+   al_set_new_bitmap_depth(16);
+   al_set_new_bitmap_samples(4);
+   example.target_depth = al_create_bitmap(512, 512);
+   al_set_new_bitmap_depth(0);
+   example.target_no_depth = al_create_bitmap(256, 256);
+   al_set_new_bitmap_samples(0);
+   example.target_no_multisample = al_create_bitmap(256, 256);
+}
+
+int main(int argc, char **argv)
+{
+   ALLEGRO_TIMER *timer;
+   ALLEGRO_EVENT_QUEUE *queue;
+   ALLEGRO_DISPLAY *display;
+   int w = 512 + 256, h = 512;
+   bool done = false;
+   bool need_redraw = true;
+
+   (void)argc;
+   (void)argv;
+
+   if (!al_init()) {
+      abort_example("Failed to init Allegro.\n");
+   }
+
+   if (!al_init_image_addon()) {
+      abort_example("Failed to init IIO addon.\n");
+   }
+
+   al_init_font_addon();
+   example.font = al_create_builtin_font();
+
+   al_init_primitives_addon();
+
+   init_platform_specific();
+
+   al_set_new_display_option(ALLEGRO_DEPTH_SIZE, 16, ALLEGRO_SUGGEST);
+   al_set_new_display_flags(ALLEGRO_PROGRAMMABLE_PIPELINE);
+
+   display = al_create_display(w, h);
+   if (!display) {
+      abort_example("Error creating display.\n");
+   }
+
+   if (!al_install_keyboard()) {
+      abort_example("Error installing keyboard.\n");
+   }
+
+   init();
+
+   timer = al_create_timer(1.0 / FPS);
+
+   queue = al_create_event_queue();
+   al_register_event_source(queue, al_get_keyboard_event_source());
+
+   al_register_event_source(queue, al_get_timer_event_source(timer));
+   
+   al_register_event_source(queue, al_get_display_event_source(display));
+
+   al_start_timer(timer);
+
+   double t = -al_get_time();
+
+   while (!done) {
+      ALLEGRO_EVENT event;
+
+      if (need_redraw) {
+         t += al_get_time();
+         example.direct_speed_measure  = t;
+         t = -al_get_time();
+         redraw();
+         al_flip_display();
+         need_redraw = false;
+      }
+
+      while (true) {
+         al_wait_for_event(queue, &event);
+         switch (event.type) {
+            case ALLEGRO_EVENT_KEY_CHAR:
+               if (event.keyboard.keycode == ALLEGRO_KEY_ESCAPE)
+                  done = true;
+               break;
+
+            case ALLEGRO_EVENT_DISPLAY_CLOSE:
+               done = true;
+               break;
+
+            case ALLEGRO_EVENT_TIMER:
+               update();
+               need_redraw = true;
+               break;
+         }
+         if (al_is_event_queue_empty(queue))
+            break;
+      }
+   }
+
+   return 0;
+}
+
+/* vim: set sts=3 sw=3 et: */
diff --git a/examples/ex_enet_client.c b/examples/ex_enet_client.c
new file mode 100644
index 0000000..ad1b1c6
--- /dev/null
+++ b/examples/ex_enet_client.c
@@ -0,0 +1,259 @@
+/* Simple networked game example using ENet (http://enet.bespin.org/).
+ *
+ * You will need enet installed to run this demo.
+ *
+ * This example is based on http://enet.bespin.org/Tutorial.html
+ *
+ * To try this example, first run ex_enet_server.
+ * Then start multiple instances of ex_enet_client.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <enet/enet.h>
+#include "allegro5/allegro.h"
+#include "allegro5/allegro_primitives.h"
+
+#include "common.c"
+#include "enet_common.h"
+
+static ENetHost* create_client(void)
+{
+   ENetHost * client;
+   client = enet_host_create(NULL /* create a client host */,
+      1 /* only allow 1 outgoing connection */,
+      2 /* allow up 2 channels to be used, 0 and 1 */,
+      57600 / 8 /* 56K modem with 56 Kbps downstream bandwidth */,
+      14400 / 8 /* 56K modem with 14 Kbps upstream bandwidth */);
+
+   if (client == NULL)
+      abort_example("Client: Failed to create the client.\n");
+
+   return client;
+}
+
+static void disconnect_client(ENetHost *client, ENetPeer *server)
+{
+   enet_peer_disconnect(server, 0);
+
+   /* Allow up to 3 seconds for the disconnect to succeed
+    * and drop any packets received packets.
+    */
+   ENetEvent event;
+   while (enet_host_service (client, &event, 3000) > 0) {
+      switch (event.type) {
+         case ENET_EVENT_TYPE_RECEIVE:
+            enet_packet_destroy(event.packet);
+            break;
+         case ENET_EVENT_TYPE_DISCONNECT:
+            puts("Client: Disconnect succeeded.");
+            return;
+         case ENET_EVENT_TYPE_NONE:
+         case ENET_EVENT_TYPE_CONNECT:
+            break;
+      }
+   }
+
+   // failed to disconnect gracefully, force the connection closed
+   enet_peer_reset(server);
+}
+
+static ENetPeer* connect_client(ENetHost *client, int port)
+{
+   ENetAddress address;
+   ENetEvent event;
+   ENetPeer *server;
+   enet_address_set_host(&address, "localhost");
+   address.port = port;
+   /* Initiate the connection, allocating the two channels 0 and 1. */
+   server = enet_host_connect(client, &address, 2, 0);
+   if (server == NULL)
+      abort_example("Client: No available peers for initiating an ENet connection.\n");
+
+   /* Wait up to 5 seconds for the connection attempt to succeed. */
+   if (enet_host_service(client, &event, 5000) > 0 &&
+      event.type == ENET_EVENT_TYPE_CONNECT)
+   {
+      printf("Client: Connected to %x:%u.\n",
+         event.peer->address.host,
+         event.peer->address.port);
+   }
+   else
+   {
+      /* Either the 5 seconds are up or a disconnect event was */
+      /* received. Reset the peer in the event the 5 seconds   */
+      /* had run out without any significant event.            */
+      enet_peer_reset(server);
+      abort_example("Client: Connection to server failed.");
+   }
+
+   return server;
+}
+
+static void send_receive(ENetHost *client)
+{
+   ENetEvent event;
+   ServerMessage *msg;
+
+   // Check if we have any queued incoming messages, but do not wait otherwise.
+   // This also sends outgoing messages queued with enet_peer_send.
+   while (enet_host_service(client, &event, 0) > 0) {
+      // clients only care about incoming packets, they will not receive
+      // connect/disconnect events.
+      if (event.type == ENET_EVENT_TYPE_RECEIVE) {
+         msg = (ServerMessage*)event.packet->data;
+
+         switch (msg->type) {
+            case POSITION_UPDATE:
+               players[msg->player_id].x = msg->x;
+               players[msg->player_id].y = msg->y;
+               break;
+            case PLAYER_JOIN:
+               printf("Client: player #%d joined\n", msg->player_id);
+               players[msg->player_id].active = true;
+               players[msg->player_id].x = msg->x;
+               players[msg->player_id].y = msg->y;
+               players[msg->player_id].color = msg->color;
+               break;
+            case PLAYER_LEAVE:
+               printf("Client: player #%d left\n", msg->player_id);
+               players[msg->player_id].active = false;
+               break;
+         }
+
+         /* Clean up the packet now that we're done using it. */
+         enet_packet_destroy(event.packet);
+      }
+   }
+}
+
+int main(int argc, char **argv)
+{
+   ALLEGRO_DISPLAY *display;
+   ALLEGRO_TIMER *timer;
+   ALLEGRO_EVENT_QUEUE *queue;
+   ALLEGRO_EVENT event;
+   ENetHost *client;
+   ENetPeer *server;
+   bool update = true; // when true, update positions and render
+   bool done = false;  // when true, client exits
+   int dx = 0, dy = 0; // movement direction
+   int port = DEFAULT_PORT;
+   int i;
+
+   if (argc == 2) {
+      port = atoi(argv[1]);
+   }
+   else if (argc > 2)
+      abort_example("Usage: %s [portnum]", argv[0]);
+
+
+   // --- allegro setup ---
+   if (!al_init())
+      abort_example("Could not init Allegro.\n");
+
+   init_platform_specific();
+
+   al_install_keyboard();
+   al_init_primitives_addon();
+
+   // Create a new display that we can render the image to.
+   display = al_create_display(SCREEN_W, SCREEN_H);
+   if (!display)
+      abort_example("Error creating display\n");
+
+   timer = al_create_timer(1.0 / FPS); // Run at 30FPS
+   queue = al_create_event_queue();
+
+   al_register_event_source(queue, al_get_keyboard_event_source());
+   al_register_event_source(queue, al_get_display_event_source(display));
+   al_register_event_source(queue, al_get_timer_event_source(timer));
+   al_start_timer(timer);
+
+   // --- enet setup ---
+   if (enet_initialize() != 0)
+      abort_example("An error occurred while initializing ENet.\n");
+
+   client = create_client();
+   server = connect_client(client, port);
+
+   // --- game loop ---
+   bool direction_changed = false;
+   while (!done) {
+      al_wait_for_event(queue, &event); // Wait for and get an event.
+
+      switch (event.type) {
+         case ALLEGRO_EVENT_DISPLAY_CLOSE:
+            done = true;
+            break;
+         case ALLEGRO_EVENT_KEY_DOWN:
+            switch (event.keyboard.keycode) {
+               case ALLEGRO_KEY_UP:
+               case ALLEGRO_KEY_W: dy -= 1; direction_changed = true; break;
+               case ALLEGRO_KEY_DOWN:
+               case ALLEGRO_KEY_S: dy += 1; direction_changed = true; break;
+               case ALLEGRO_KEY_LEFT:
+               case ALLEGRO_KEY_A: dx -= 1; direction_changed = true; break;
+               case ALLEGRO_KEY_RIGHT:
+               case ALLEGRO_KEY_D: dx += 1; direction_changed = true; break;
+            }
+            break;
+         case ALLEGRO_EVENT_KEY_UP:
+            switch (event.keyboard.keycode) {
+               case ALLEGRO_KEY_UP:
+               case ALLEGRO_KEY_W: dy += 1; direction_changed = true; break;
+               case ALLEGRO_KEY_DOWN:
+               case ALLEGRO_KEY_S: dy -= 1; direction_changed = true; break;
+               case ALLEGRO_KEY_LEFT:
+               case ALLEGRO_KEY_A: dx += 1; direction_changed = true; break;
+               case ALLEGRO_KEY_RIGHT:
+               case ALLEGRO_KEY_D: dx -= 1; direction_changed = true; break;
+            }
+            break;
+         case (ALLEGRO_EVENT_TIMER):
+            update = true;
+            break;
+      }
+
+      // update, but only if the event queue is empty
+      if (update && al_is_event_queue_empty(queue)) {
+         update = false;
+
+         // if player changed direction this frame, notify the server.
+         // only check once per frame to stop clients from flooding the server
+         if (direction_changed) {
+            direction_changed = false;
+
+            ClientMessage msg = { dx, dy };
+
+            ENetPacket *packet = enet_packet_create(&msg,
+               sizeof(msg),
+               ENET_PACKET_FLAG_RELIABLE);
+
+            enet_peer_send(server, 0, packet);
+         }
+
+         // this will send our queued direction message if we have one, and get
+         // position updates for other clients
+         send_receive(client);
+
+         // draw each player
+         al_clear_to_color(al_map_rgb_f(0, 0, 0));
+         for (i = 0; i < MAX_PLAYER_COUNT; i++) {
+            if (!players[i].active) continue;
+
+            int x = players[i].x;
+            int y = players[i].y;
+            ALLEGRO_COLOR color = players[i].color;
+            al_draw_filled_circle(x, y, PLAYER_SIZE, color);
+         }
+         al_flip_display();
+      }
+   }
+
+   disconnect_client(client, server);
+   enet_host_destroy(client);
+   enet_deinitialize();
+   return 0;
+}
+
+/* vim: set sts=3 sw=3 et: */
diff --git a/examples/ex_enet_server.c b/examples/ex_enet_server.c
new file mode 100644
index 0000000..edb3e89
--- /dev/null
+++ b/examples/ex_enet_server.c
@@ -0,0 +1,240 @@
+/* Simple networked game example using ENet (http://enet.bespin.org/).
+ *
+ * You will need enet installed to run this demo.
+ *
+ * This example is based on http://enet.bespin.org/Tutorial.html
+ *
+ * This is the server, which you will want to start first. Once the server is
+ * running, run ex_enet_client to connect each client.
+ */
+#include <time.h>
+#include <stdio.h>
+#include <string.h>
+#include <enet/enet.h>
+#include <allegro5/allegro.h>
+
+#include "common.c"
+#include "enet_common.h"
+
+#define PLAYER_SPEED 200 // pixels / second
+
+const int port = 9234;
+
+static float rand01(void) { return rand() / (float)RAND_MAX; }
+
+static int init_player(void)
+{
+   int i;
+   // find the first open player slot
+   for (i = 0 ; i < MAX_PLAYER_COUNT ; ++i) {
+      if (!players[i].active) {
+         // assign a random color and position to this new player
+         players[i].active = true;
+         players[i].color = al_map_rgb_f(rand01(), rand01(), rand01());
+         players[i].x = rand01() * SCREEN_W;
+         players[i].y = rand01() * SCREEN_H;
+
+         return i;
+      }
+   }
+
+   abort_example("Cannot create more than %d clients", MAX_PLAYER_COUNT);
+   return -1;
+}
+
+static ServerMessage create_join_message(int player_id)
+{
+   ServerMessage msg_out;
+   msg_out.type = PLAYER_JOIN;
+   msg_out.player_id = player_id;
+   msg_out.color = players[player_id].color;
+   msg_out.x = players[player_id].x;
+   msg_out.y = players[player_id].y;
+   return msg_out;
+}
+
+static void send_receive(ENetHost *server)
+{
+   ClientMessage *msg_in;
+   ServerMessage msg_out;
+   ENetPacket *packet;
+   ENetEvent event;
+   int i;
+
+   // Process all messages in queue, exit as soon as it is empty
+   while (enet_host_service(server, &event, 0) > 0) {
+      switch (event.type) {
+         case ENET_EVENT_TYPE_NONE:
+            break;
+         case ENET_EVENT_TYPE_CONNECT:
+            printf("Server: A new client connected from %x:%u.\n",
+               event.peer->address.host,
+               event.peer->address.port);
+
+            int player_id = init_player();
+
+            // store the id with the peer we can correlate messages from this
+            // client with this ID
+            event.peer->data = malloc(sizeof(int));
+            *(int*)event.peer->data = player_id;
+
+            // notify all clients of the new player
+            msg_out = create_join_message(player_id);
+
+            printf("Server: created player #%d at %d,%d\n",
+               player_id,
+               players[player_id].x,
+               players[player_id].y);
+
+            packet = enet_packet_create(&msg_out,
+               sizeof(msg_out),
+               ENET_PACKET_FLAG_RELIABLE);
+
+            enet_host_broadcast(server, 0, packet);
+
+            // notify new client of all other existing players
+            for (i = 0 ; i < MAX_PLAYER_COUNT ; ++i) {
+               if (!players[i].active || i == player_id) continue;
+
+               msg_out = create_join_message(i);
+
+               packet = enet_packet_create(&msg_out,
+                  sizeof(msg_out),
+                  ENET_PACKET_FLAG_RELIABLE);
+               enet_peer_send(event.peer, 0, packet);
+            }
+
+            break;
+         case ENET_EVENT_TYPE_RECEIVE:
+            msg_in = (ClientMessage*)event.packet->data;
+
+            // update the player's movement
+            player_id = *(int*)event.peer->data;
+            players[player_id].dx = msg_in->x;
+            players[player_id].dy = msg_in->y;
+
+            /* Clean up the incoming packet now that we're done using it. */
+            enet_packet_destroy(event.packet);
+            break;
+         case ENET_EVENT_TYPE_DISCONNECT:
+            printf("Server: client #%d disconnected.\n", *((int*)event.peer->data));
+
+            // notify all other players that a player left
+            msg_out.type = PLAYER_LEAVE;
+            msg_out.player_id = *(int*)event.peer->data;
+
+            packet = enet_packet_create(&msg_out,
+               sizeof(msg_out),
+               ENET_PACKET_FLAG_RELIABLE);
+
+            enet_host_broadcast(server, 0, packet);
+
+            /* Reset the peer's server information. */
+            free(event.peer->data);
+            event.peer->data = NULL;
+      }
+   }
+}
+
+static void update_players(ENetHost *server, float time)
+{
+   int i;
+   for (i = 0 ; i < MAX_PLAYER_COUNT ; ++i) {
+      if (!players[i].active) continue;
+
+      players[i].x += players[i].dx * PLAYER_SPEED * time;
+      players[i].y += players[i].dy * PLAYER_SPEED * time;
+
+      // notify all clients of this player's new position
+      ServerMessage msg;
+      msg.type = POSITION_UPDATE;
+      msg.player_id = i;
+      msg.x = players[i].x;
+      msg.y = players[i].y;
+
+      ENetPacket *packet = enet_packet_create(&msg,
+         sizeof(ServerMessage),
+         ENET_PACKET_FLAG_RELIABLE);
+
+      enet_host_broadcast(server, 0, packet);
+   }
+}
+
+static ENetHost* create_server(int port)
+{
+   ENetAddress address;
+   ENetHost *server;
+   /* Bind the server to the default localhost.     */
+   /* A specific host address can be specified by   */
+   /* enet_address_set_host (&address, "x.x.x.x"); */
+   address.host = ENET_HOST_ANY;
+   /* Bind the server to port 1234. */
+   address.port = port;
+   server = enet_host_create(&address /* the address to bind the server host to */,
+      32      /* allow up to 32 clients and/or outgoing connections */,
+      2      /* allow up to 2 channels to be used, 0 and 1 */,
+      0      /* assume any amount of incoming bandwidth */,
+      0      /* assume any amount of outgoing bandwidth */);
+   if (server == NULL) {
+      fprintf(stderr, "Failed to create the server.\n");
+      exit(EXIT_FAILURE);
+   }
+
+   return server;
+}
+
+int main(int argc, char **argv)
+{
+   ALLEGRO_TIMER *timer;
+   ALLEGRO_EVENT_QUEUE *queue;
+   ALLEGRO_EVENT event;
+   double last_time; // time of last update
+   double cur_time;  // time of this update
+   srand(time(NULL));
+   ENetHost * server;
+   int port;
+
+   if (argc == 1)
+      port = DEFAULT_PORT;
+   else if (argc == 2)
+      port = atoi(argv[1]);
+   else
+      abort_example("Usage: %s [portnum]", argv[0]);
+
+   if (!al_init())
+      abort_example("Could not init Allegro.\n");
+
+   if (enet_initialize() != 0) {
+      fprintf(stderr, "An error occurred while initializing ENet.\n");
+      return EXIT_FAILURE;
+   }
+
+   timer = al_create_timer(1.0 / FPS); // Run at 30FPS
+   queue = al_create_event_queue();
+
+   al_register_event_source(queue, al_get_timer_event_source(timer));
+   al_start_timer(timer);
+
+   server = create_server(port);
+
+   last_time = al_get_time();
+
+   while(1)
+   {
+      al_wait_for_event(queue, &event); // Wait for and get an event.
+
+      if (event.type == ALLEGRO_EVENT_TIMER) {
+         cur_time = al_get_time();
+         update_players(server, cur_time - last_time);
+         last_time = cur_time;
+
+         send_receive(server);
+      }
+   }
+
+   enet_host_destroy(server);
+   enet_deinitialize();
+   return 0;
+}
+
+/* vim: set sts=3 sw=3 et: */
diff --git a/examples/ex_glext.c b/examples/ex_glext.c
index f13e57e..f1f1117 100644
--- a/examples/ex_glext.c
+++ b/examples/ex_glext.c
@@ -2,6 +2,8 @@
  * Taken from AllegroGL.
  */
 
+#define ALLEGRO_UNSTABLE
+
 #include <math.h>
 #include <string.h>
 #include <stdio.h>
diff --git a/examples/ex_multisample_target.c b/examples/ex_multisample_target.c
new file mode 100644
index 0000000..4b416ed
--- /dev/null
+++ b/examples/ex_multisample_target.c
@@ -0,0 +1,249 @@
+#define ALLEGRO_UNSTABLE
+#include <allegro5/allegro.h>
+#include <allegro5/allegro_image.h>
+#include <allegro5/allegro_font.h>
+#include <allegro5/allegro_color.h>
+#include <allegro5/allegro_primitives.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include "common.c"
+
+#define FPS 60
+
+static struct Example {
+   ALLEGRO_BITMAP *targets[4];
+   ALLEGRO_BITMAP *bitmap_normal;
+   ALLEGRO_BITMAP *bitmap_filter;
+   ALLEGRO_BITMAP *sub;
+   ALLEGRO_FONT *font;
+   float bitmap_x[8], bitmap_y[8];
+   float bitmap_t;
+   int step_t, step_x, step_y;
+   ALLEGRO_BITMAP *step[4];
+   bool update_step;
+} example;
+
+static ALLEGRO_BITMAP *create_bitmap(void)
+{
+   const int checkers_size = 8;
+   const int bitmap_size = 24;
+   ALLEGRO_BITMAP *bitmap;
+   ALLEGRO_LOCKED_REGION *locked;
+   int x, y, p;
+   unsigned char *rgba;
+
+   bitmap = al_create_bitmap(bitmap_size, bitmap_size);
+   locked = al_lock_bitmap(bitmap, ALLEGRO_PIXEL_FORMAT_ABGR_8888, 0);
+   rgba = locked->data;
+   p = locked->pitch;
+   for (y = 0; y < bitmap_size; y++) {
+      for (x = 0; x < bitmap_size; x++) {
+         int c = (((x / checkers_size) + (y / checkers_size)) & 1) * 255;
+         rgba[y * p + x * 4 + 0] = 0;
+         rgba[y * p + x * 4 + 1] = 0;
+         rgba[y * p + x * 4 + 2] = 0;
+         rgba[y * p + x * 4 + 3] = c;
+      }
+   }
+   al_unlock_bitmap(bitmap);
+   return bitmap;
+}
+
+static void init(void)
+{
+   al_set_new_bitmap_flags(ALLEGRO_MEMORY_BITMAP);
+   ALLEGRO_BITMAP *memory = create_bitmap();
+   al_set_new_bitmap_flags(0);
+
+   al_set_new_bitmap_samples(0);
+   example.targets[0] = al_create_bitmap(300, 200);
+   example.targets[1] = al_create_bitmap(300, 200);
+   al_set_new_bitmap_samples(4);
+   example.targets[2] = al_create_bitmap(300, 200);
+   example.targets[3] = al_create_bitmap(300, 200);
+   al_set_new_bitmap_samples(0);
+
+   al_set_new_bitmap_flags(ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR);
+   example.bitmap_filter = al_clone_bitmap(memory);
+   al_set_new_bitmap_flags(0);
+   example.bitmap_normal = al_clone_bitmap(memory);
+
+   example.sub = al_create_sub_bitmap(memory, 0, 0, 30, 30);
+   example.step[0] = al_create_bitmap(30, 30);
+   example.step[1] = al_create_bitmap(30, 30);
+   example.step[2] = al_create_bitmap(30, 30);
+   example.step[3] = al_create_bitmap(30, 30);
+}
+
+static void bitmap_move(void)
+{
+   int i;
+
+   example.bitmap_t++;
+   for (i = 0; i < 8; i++) {
+      float a = 2 * ALLEGRO_PI * i / 16;
+      float s = sin((example.bitmap_t + i * 40) / 180 * ALLEGRO_PI);
+      s *= 90;
+      example.bitmap_x[i] = 100 + s * cos(a);
+      example.bitmap_y[i] = 100 + s * sin(a);
+   }
+}
+ 
+static void draw(char const *text, ALLEGRO_BITMAP *bitmap)
+{
+   int i;
+
+   al_clear_to_color(al_color_name("white"));
+
+   al_draw_text(example.font, al_map_rgb(0, 0, 0), 0, 0, 0, text);
+
+   for (i = 0; i < 16; i++) {
+      float a = 2 * ALLEGRO_PI * i / 16;
+      ALLEGRO_COLOR c = al_color_hsv(i * 360 / 16, 1, 1);
+      al_draw_line(100 + cos(a) * 10, 100 + sin(a) * 10,
+         100 + cos(a) * 90, 100 + sin(a) * 90, c, 3);
+   }
+
+   for (i = 0; i < 8; i++) {
+      float a = 2 * ALLEGRO_PI * i / 16;
+      int s = al_get_bitmap_width(bitmap);
+      al_draw_rotated_bitmap(bitmap, s / 2, s / 2,
+         example.bitmap_x[i], example.bitmap_y[i], a, 0);
+   }
+}
+
+static void redraw(void)
+{
+   al_set_target_bitmap(example.targets[1]);
+   draw("filtered", example.bitmap_filter);
+   al_set_target_bitmap(example.targets[0]);
+   draw("no filter", example.bitmap_normal);
+   al_set_target_bitmap(example.targets[3]);
+   draw("filtered, multi-sample x4", example.bitmap_filter);
+   al_set_target_bitmap(example.targets[2]);
+   draw("no filter, multi-sample x4", example.bitmap_normal);
+
+   float x = example.step_x;
+   float y = example.step_y;
+
+   if (example.update_step) {
+      int i;
+      for (i = 0; i < 4; i++) {
+         al_set_target_bitmap(example.step[i]);
+         al_reparent_bitmap(example.sub, example.targets[i], x, y, 30, 30);
+         al_draw_bitmap(example.sub, 0, 0, 0);
+      }
+      example.update_step = false;
+   }
+
+   al_set_target_backbuffer(al_get_current_display());
+   al_clear_to_color(al_map_rgb_f(0.5, 0, 0));
+   al_draw_bitmap(example.targets[0], 20, 20, 0);
+   al_draw_bitmap(example.targets[1], 20, 240, 0);
+   al_draw_bitmap(example.targets[2], 340, 20, 0);
+   al_draw_bitmap(example.targets[3], 340, 240, 0);
+   
+   al_draw_scaled_rotated_bitmap(example.step[0], 15, 15, 320 - 50, 220 - 50, 4, 4, 0, 0);
+   al_draw_scaled_rotated_bitmap(example.step[1], 15, 15, 320 - 50, 440 - 50, 4, 4, 0, 0);
+   al_draw_scaled_rotated_bitmap(example.step[2], 15, 15, 640 - 50, 220 - 50, 4, 4, 0, 0);
+   al_draw_scaled_rotated_bitmap(example.step[3], 15, 15, 640 - 50, 440 - 50, 4, 4, 0, 0);
+
+}
+
+static void update(void)
+{
+   bitmap_move();
+   if (example.step_t == 0) {
+      example.step_x = example.bitmap_x[1] - 15;
+      example.step_y = example.bitmap_y[1] - 15;
+      example.step_t = 60;
+      example.update_step = true;
+   }
+   example.step_t--;
+}
+
+int main(int argc, char **argv)
+{
+   ALLEGRO_TIMER *timer;
+   ALLEGRO_EVENT_QUEUE *queue;
+   ALLEGRO_DISPLAY *display;
+   int w = 20 + 300 + 20 + 300 + 20, h = 20 + 200 + 20 + 200 + 20;
+   bool done = false;
+   bool need_redraw = true;
+
+   (void)argc;
+   (void)argv;
+
+   if (!al_init()) {
+      abort_example("Failed to init Allegro.\n");
+   }
+
+   if (!al_init_image_addon()) {
+      abort_example("Failed to init IIO addon.\n");
+   }
+
+   al_init_font_addon();
+   example.font = al_create_builtin_font();
+
+   al_init_primitives_addon();
+
+   init_platform_specific();
+
+   display = al_create_display(w, h);
+   if (!display) {
+      abort_example("Error creating display.\n");
+   }
+
+   if (!al_install_keyboard()) {
+      abort_example("Error installing keyboard.\n");
+   }
+
+   init();
+
+   timer = al_create_timer(1.0 / FPS);
+
+   queue = al_create_event_queue();
+   al_register_event_source(queue, al_get_keyboard_event_source());
+
+   al_register_event_source(queue, al_get_timer_event_source(timer));
+   
+   al_register_event_source(queue, al_get_display_event_source(display));
+
+   al_start_timer(timer);
+
+   while (!done) {
+      ALLEGRO_EVENT event;
+
+      if (need_redraw) {
+         redraw();
+         al_flip_display();
+         need_redraw = false;
+      }
+
+      while (true) {
+         al_wait_for_event(queue, &event);
+         switch (event.type) {
+            case ALLEGRO_EVENT_KEY_CHAR:
+               if (event.keyboard.keycode == ALLEGRO_KEY_ESCAPE)
+                  done = true;
+               break;
+
+            case ALLEGRO_EVENT_DISPLAY_CLOSE:
+               done = true;
+               break;
+
+            case ALLEGRO_EVENT_TIMER:
+               update();
+               need_redraw = true;
+               break;
+         }
+         if (al_is_event_queue_empty(queue))
+            break;
+      }
+   }
+
+   return 0;
+}
+
+/* vim: set sts=3 sw=3 et: */
diff --git a/examples/ex_opengl.c b/examples/ex_opengl.c
index a71283d..012281c 100644
--- a/examples/ex_opengl.c
+++ b/examples/ex_opengl.c
@@ -1,3 +1,5 @@
+#define ALLEGRO_UNSTABLE
+
 #include <stdio.h>
 #include <math.h>
 #include <allegro5/allegro.h>
diff --git a/examples/ex_opengl_pixel_shader.c b/examples/ex_opengl_pixel_shader.c
index 660802f..b8883bf 100644
--- a/examples/ex_opengl_pixel_shader.c
+++ b/examples/ex_opengl_pixel_shader.c
@@ -1,3 +1,5 @@
+#define ALLEGRO_UNSTABLE
+
 #include <allegro5/allegro.h>
 #include <allegro5/allegro_opengl.h>
 #include <allegro5/allegro_image.h>
diff --git a/examples/ex_stream_seek.c b/examples/ex_stream_seek.c
index 1bc3c53..69ed02c 100644
--- a/examples/ex_stream_seek.c
+++ b/examples/ex_stream_seek.c
@@ -134,7 +134,7 @@ static void render(void)
 static void myexit(void)
 {
    bool playing;
-   playing = al_get_mixer_playing(al_get_default_mixer());
+   playing = al_get_audio_stream_playing(music_stream);
    if (playing && music_stream)
       al_drain_audio_stream(music_stream);
    al_destroy_audio_stream(music_stream);
@@ -190,9 +190,9 @@ static void event_handler(const ALLEGRO_EVENT * event)
          }
          else if (event->keyboard.keycode == ALLEGRO_KEY_SPACE) {
             bool playing;
-            playing = al_get_mixer_playing(al_get_default_mixer());
+            playing = al_get_audio_stream_playing(music_stream);
             playing = !playing;
-            al_set_mixer_playing(al_get_default_mixer(), playing);
+            al_set_audio_stream_playing(music_stream, playing);
          }
          else if (event->keyboard.keycode == ALLEGRO_KEY_ESCAPE) {
             exiting = true;
@@ -219,6 +219,10 @@ static void event_handler(const ALLEGRO_EVENT * event)
          logic();
          render();
          break;
+
+      case ALLEGRO_EVENT_AUDIO_STREAM_FINISHED:
+         log_printf("Stream finished.\n");
+         break;
    }
 }
 
@@ -229,6 +233,7 @@ int main(int argc, char *argv[])
    unsigned buffer_count;
    unsigned samples;
    const char *s;
+   ALLEGRO_PLAYMODE playmode = ALLEGRO_PLAYMODE_LOOP;
 
    initialize();
 
@@ -246,6 +251,14 @@ int main(int argc, char *argv[])
       if ((s = al_get_config_value(config, "", "samples"))) {
          samples = atoi(s);
       }
+      if ((s = al_get_config_value(config, "", "playmode"))) {
+         if (!strcmp(s, "loop")) {
+            playmode = ALLEGRO_PLAYMODE_LOOP;
+         }
+         else if (!strcmp(s, "once")) {
+            playmode = ALLEGRO_PLAYMODE_ONCE;
+         }
+      }
       al_destroy_config(config);
    }
    if (buffer_count == 0) {
@@ -259,12 +272,13 @@ int main(int argc, char *argv[])
    if (!music_stream) {
       abort_example("Stream error!\n");
    }
+   al_register_event_source(queue, al_get_audio_stream_event_source(music_stream));
 
    loop_start = 0.0;
    loop_end = al_get_audio_stream_length_secs(music_stream);
    al_set_audio_stream_loop_secs(music_stream, loop_start, loop_end);
 
-   al_set_audio_stream_playmode(music_stream, ALLEGRO_PLAYMODE_LOOP);
+   al_set_audio_stream_playmode(music_stream, playmode);
    al_attach_audio_stream_to_mixer(music_stream, al_get_default_mixer());
    al_start_timer(timer);
 
diff --git a/examples/ex_ttf.c b/examples/ex_ttf.c
index da698f0..1ece490 100644
--- a/examples/ex_ttf.c
+++ b/examples/ex_ttf.c
@@ -1,3 +1,5 @@
+#define ALLEGRO_UNSTABLE
+
 #include <stdio.h>
 #include <allegro5/allegro.h>
 #include <allegro5/allegro_ttf.h>
@@ -61,6 +63,8 @@ static void render(void)
     ALLEGRO_USTR *tulip = al_ustr_new("Tulip");
     ALLEGRO_USTR *dimension_text = al_ustr_new("Tulip");
     ALLEGRO_USTR *vertical_text  = al_ustr_new("Rose.");
+    ALLEGRO_USTR *dimension_label = al_ustr_new("(dimensions)");
+    int prev_cp = -1;
 
     al_clear_to_color(white);
 
@@ -69,20 +73,29 @@ static void render(void)
     al_draw_textf(ex.f1, black, 50,  20, 0, "Tulip (kerning)");
     al_draw_textf(ex.f2, black, 50,  80, 0, "Tulip (no kerning)");
 
-    x = 50; 
-    y = 140;    
+    x = 50;
+    y = 140;
     for (index = 0; index < al_ustr_length(dimension_text); index ++) {
        int cp  = ustr_at(dimension_text, index);
        int bbx, bby, bbw, bbh;
-       al_get_glyph_dimensions(ex.f2, cp, &bbx, &bby, &bbw, &bbh);                   
-       al_draw_rectangle(x + bbx, y + bby, x + bbx + bbw, y + bby + bbh, blue, 1);
-       al_draw_rectangle(x, y, x + bbx + bbw, y + bby + bbh, green, 1);       
+       al_get_glyph_dimensions(ex.f2, cp, &bbx, &bby, &bbw, &bbh);
+       al_draw_rectangle(x + bbx + 0.5, y + bby + 0.5, x + bbx + bbw - 0.5, y + bby + bbh - 0.5, blue, 1);
+       al_draw_rectangle(x + 0.5, y + 0.5, x + bbx + bbw - 0.5, y + bby + bbh - 0.5, green, 1);
        al_draw_glyph(ex.f2, purple, x, y, cp);
        x += al_get_glyph_advance(ex.f2, cp, ALLEGRO_NO_KERNING);
     }
-    al_draw_line(50, y, x, y, red, 1);    
-    al_draw_textf(ex.f2, black, x + 10, y, 0, "(dimensions)");
-    
+    al_draw_line(50.5, y+0.5, x+0.5, y+0.5, red, 1);
+
+    for (index = 0; index < al_ustr_length(dimension_label); index++) {
+       int cp = ustr_at(dimension_label, index);
+       ALLEGRO_GLYPH g;
+       if (al_get_glyph(ex.f2, prev_cp, cp, &g)) {
+          al_draw_tinted_bitmap_region(g.bitmap, black, g.x, g.y, g.w, g.h, x + 10 + g.kerning + g.offset_x, y + g.offset_y, 0);
+          x += g.advance;
+       }
+       prev_cp = cp;
+    }
+
     al_draw_textf(ex.f3, black, 50, 200, 0, "This font has a size of 12 pixels, "
         "the one above has 48 pixels.");
 
@@ -90,7 +103,7 @@ static void render(void)
     al_hold_bitmap_drawing(true);
 
     al_draw_textf(ex.f3, red, 50, 220, 0, "The color can simply be changed.🐊← fallback glyph");
-        
+
     al_hold_bitmap_drawing(false);
     al_hold_bitmap_drawing(true);
 
@@ -115,21 +128,21 @@ static void render(void)
     /* Glyph rendering tests. */
     al_draw_textf(ex.f3, red, 50, 410, 0, "Glyph adv Tu: %d, draw: ",
                         al_get_glyph_advance(ex.f3, 'T', 'u'));
-    x = 50; 
-    y = 425; 
+    x = 50;
+    y = 425;
     for (index = 0; index < al_ustr_length(tulip); index ++) {
        int cp  = ustr_at(tulip, index);
        /* Use al_get_glyph_advance for the stride, with no kerning. */
        al_draw_glyph(ex.f3, red, x, y, cp);
        x += al_get_glyph_advance(ex.f3, cp, ALLEGRO_NO_KERNING);
     }
-   
-    x = 50; 
-    y = 440; 
-    /* First draw a red string using al_draw_text, that should be hidden 
-     * completely by the same text drawing in green per glyph 
+
+    x = 50;
+    y = 440;
+    /* First draw a red string using al_draw_text, that should be hidden
+     * completely by the same text drawing in green per glyph
      * using al_draw_glyph and al_get_glyph_advance below. */
-    al_draw_ustr(ex.f3, red, x, y, 0, tulip); 
+    al_draw_ustr(ex.f3, red, x, y, 0, tulip);
     for (index = 0; index < al_ustr_length(tulip); index ++) {
       int cp  = ustr_at(tulip, index);
       int ncp = (index < (al_ustr_length(tulip) - 1)) ?
@@ -138,45 +151,45 @@ static void render(void)
       al_draw_glyph(ex.f3, green, x, y, cp);
       x += al_get_glyph_advance(ex.f3, cp, ncp);
     }
-    
-    x = 50; 
-    y = 466; 
+
+    x = 50;
+    y = 466;
     al_draw_ustr(ex.f3, red, x, y, 0, tulip);
     for (index = 0; index < al_ustr_length(tulip); index ++) {
       int cp  = ustr_at(tulip, index);
       int bbx, bby, bbw, bbh;
-      al_get_glyph_dimensions(ex.f3, cp, &bbx, &bby, &bbw, &bbh);      
+      al_get_glyph_dimensions(ex.f3, cp, &bbx, &bby, &bbw, &bbh);
       al_draw_glyph(ex.f3, blue, x, y, cp);
       x += bbx + bbw;
     }
-    
-    
-    x = 10; 
-    y = 30; 
+
+
+    x = 10;
+    y = 30;
     for (index = 0; index < al_ustr_length(vertical_text); index ++) {
       int bbx, bby, bbw, bbh;
       int cp  = ustr_at(vertical_text, index);
-      /* Use al_get_glyph_dimensions for the height to apply. */      
+      /* Use al_get_glyph_dimensions for the height to apply. */
       al_get_glyph_dimensions(ex.f3, cp, &bbx, &bby, &bbw, &bbh);
-      al_draw_glyph(ex.f3, green, x, y, cp);      
+      al_draw_glyph(ex.f3, green, x, y, cp);
       y += bby;
       y += bbh;
     }
-    
-    
-    x = 30; 
-    y = 30; 
+
+
+    x = 30;
+    y = 30;
     for (index = 0; index < al_ustr_length(vertical_text); index ++) {
       int bbx, bby, bbw, bbh;
       int cp  = ustr_at(vertical_text, index);
-      /* Use al_get_glyph_dimensions for the height to apply, here bby is 
-       * omited for the wrong result. */      
+      /* Use al_get_glyph_dimensions for the height to apply, here bby is
+       * omited for the wrong result. */
       al_get_glyph_dimensions(ex.f3, cp, &bbx, &bby, &bbw, &bbh);
-      al_draw_glyph(ex.f3, red, x, y, cp);      
+      al_draw_glyph(ex.f3, red, x, y, cp);
       y += bbh;
     }
-    
-    
+
+
     al_hold_bitmap_drawing(false);
 
     target_w = al_get_bitmap_width(al_get_target_bitmap());
@@ -192,9 +205,9 @@ static void render(void)
     x += xpos;
     y += ypos;
 
-    al_draw_rectangle(x, y, x + w, y + h, black, 0);
-    al_draw_line(x, y + as, x + w, y + as, black, 0);
-    al_draw_line(x, y + as + de, x + w, y + as + de, black, 0);
+    al_draw_rectangle(x, y, x + w - 0.5, y + h - 0.5, black, 0);
+    al_draw_line(x+0.5, y + as + 0.5, x + w - 0.5, y + as + 0.5, black, 0);
+    al_draw_line(x + 0.5, y + as + de + 0.5, x + w - 0.5, y + as + de + 0.5, black, 0);
 
     al_hold_bitmap_drawing(true);
     al_draw_textf(ex.f4, blue, xpos, ypos, 0, "Allegro");
@@ -207,7 +220,7 @@ static void render(void)
 
     al_draw_textf(ex.f3, black, 0, 0, 0, "%s: %d unicode ranges", font_file,
        ex.ranges_count);
-       
+
     al_hold_bitmap_drawing(false);
 }
 
@@ -257,6 +270,9 @@ int main(int argc, char **argv)
     {
         int ranges[] = {0x1F40A, 0x1F40A};
         ALLEGRO_BITMAP *icon = al_load_bitmap("data/icon.png");
+		if (!icon) {
+			abort_example("Couldn't load data/icon.png.\n");
+		}
         ALLEGRO_BITMAP *glyph = al_create_bitmap(50, 50);
         al_set_target_bitmap(glyph);
         al_clear_to_color(al_map_rgba_f(0, 0, 0, 0));
diff --git a/include/allegro5/allegro_android.h b/include/allegro5/allegro_android.h
index e602e50..e8cf5c9 100644
--- a/include/allegro5/allegro_android.h
+++ b/include/allegro5/allegro_android.h
@@ -14,6 +14,8 @@
 #ifndef A5_ANDROID_ALLEGRO_H
 #define A5_ANDROID_ALLEGRO_H
 
+#include <jni.h>
+
 #ifdef __cplusplus
    extern "C" {
 #endif
@@ -24,6 +26,10 @@
 void al_android_set_apk_file_interface(void);
 const char *al_android_get_os_version(void);
 void al_android_set_apk_fs_interface(void);
+#if defined(ALLEGRO_UNSTABLE) || defined(ALLEGRO_INTERNAL_UNSTABLE) || defined(ALLEGRO_SRC)
+JNIEnv *al_android_get_jni_env(void);
+jobject al_android_get_activity(void);
+#endif
 
 /* XXX decide if this should be public */
 void _al_android_set_capture_volume_keys(ALLEGRO_DISPLAY *display, bool onoff);
diff --git a/include/allegro5/allegro_opengl.h b/include/allegro5/allegro_opengl.h
index 8de8310..0f86a67 100644
--- a/include/allegro5/allegro_opengl.h
+++ b/include/allegro5/allegro_opengl.h
@@ -32,6 +32,8 @@
 #include <OpenGLES/ES1/glext.h>
 #include <OpenGLES/ES2/gl.h>
 #include <OpenGLES/ES2/glext.h>
+#include <OpenGLES/ES3/gl.h>
+#include <OpenGLES/ES3/glext.h>
 
 /* Apple defines OES versions for these - however the separated alpha ones
  * don't seem to work on the device and just crash.
@@ -39,6 +41,7 @@
 #define glBlendEquation glBlendEquationOES
 #define glBlendFuncSeparate glBlendFuncSeparateOES
 #define glBlendEquationSeparate glBlendEquationSeparateOES
+#define glRenderbufferStorageMultisampleEXT glRenderbufferStorageMultisampleAPPLE
 #ifdef GL_FUNC_ADD
 #undef GL_FUNC_ADD
 #undef GL_FUNC_SUBTRACT
@@ -77,12 +80,14 @@
 #ifndef ALLEGRO_RASPBERRYPI
 #define GL_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_OES
 #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES
+#define GL_RENDERBUFFER_EXT GL_RENDERBUFFER_OES
 #define glBlendEquation glBlendEquationOES
 #define glBlendFuncSeparate glBlendFuncSeparateOES
 #define glBlendEquationSeparate glBlendEquationSeparateOES
 #define glGenerateMipmapEXT glGenerateMipmapOES
 #define glBindFramebufferEXT glBindFramebufferOES
 #define glDeleteFramebuffersEXT glDeleteFramebuffersOES
+#define GL_DEPTH_COMPONENT24 GL_DEPTH_COMPONENT24_OES
 #else
 #define GL_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING
 #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER
@@ -110,6 +115,9 @@
 #include <EGL/eglext.h>
 #endif
 
+#include "allegro5/bitmap.h"
+#include "allegro5/display.h"
+#include "allegro5/shader.h"
 #include "allegro5/opengl/gl_ext.h"
 
 #ifdef ALLEGRO_WINDOWS
diff --git a/include/allegro5/allegro_x.h b/include/allegro5/allegro_x.h
index 8b21d06..abc5d89 100644
--- a/include/allegro5/allegro_x.h
+++ b/include/allegro5/allegro_x.h
@@ -19,6 +19,9 @@
 
 #include <X11/Xlib.h>
 
+#include "allegro5/base.h"
+#include "allegro5/display.h"
+
 #ifdef __cplusplus
    extern "C" {
 #endif
diff --git a/include/allegro5/base.h b/include/allegro5/base.h
index de0b75d..808bfd7 100644
--- a/include/allegro5/base.h
+++ b/include/allegro5/base.h
@@ -55,7 +55,7 @@
 
 #define ALLEGRO_VERSION          5
 #define ALLEGRO_SUB_VERSION      2
-#define ALLEGRO_WIP_VERSION      0
+#define ALLEGRO_WIP_VERSION      2
 
 #ifdef ALLEGRO_UNSTABLE
    #define ALLEGRO_UNSTABLE_BIT  1 << 31
@@ -73,9 +73,9 @@
  */
 #define ALLEGRO_RELEASE_NUMBER   1
 
-#define ALLEGRO_VERSION_STR      "5.2.0"
+#define ALLEGRO_VERSION_STR      "5.2.2"
 #define ALLEGRO_DATE_STR         "2016"
-#define ALLEGRO_DATE             20160401    /* yyyymmdd */
+#define ALLEGRO_DATE             20161211    /* yyyymmdd */
 #define ALLEGRO_VERSION_INT \
     ((ALLEGRO_VERSION << 24) | (ALLEGRO_SUB_VERSION << 16) | \
     (ALLEGRO_WIP_VERSION << 8) | ALLEGRO_RELEASE_NUMBER | \
diff --git a/include/allegro5/bitmap.h b/include/allegro5/bitmap.h
index bb7cd12..02e44b3 100644
--- a/include/allegro5/bitmap.h
+++ b/include/allegro5/bitmap.h
@@ -37,11 +37,23 @@ AL_FUNC(int, al_get_new_bitmap_format, (void));
 AL_FUNC(int, al_get_new_bitmap_flags, (void));
 AL_FUNC(void, al_add_new_bitmap_flag, (int flag));
 
+#if defined(ALLEGRO_UNSTABLE) || defined(ALLEGRO_INTERNAL_UNSTABLE) || defined(ALLEGRO_SRC)
+AL_FUNC(int, al_get_new_bitmap_depth, (void));
+AL_FUNC(void, al_set_new_bitmap_depth, (int depth));
+AL_FUNC(int, al_get_new_bitmap_samples, (void));
+AL_FUNC(void, al_set_new_bitmap_samples, (int samples));
+#endif
+
 AL_FUNC(int, al_get_bitmap_width, (ALLEGRO_BITMAP *bitmap));
 AL_FUNC(int, al_get_bitmap_height, (ALLEGRO_BITMAP *bitmap));
 AL_FUNC(int, al_get_bitmap_format, (ALLEGRO_BITMAP *bitmap));
 AL_FUNC(int, al_get_bitmap_flags, (ALLEGRO_BITMAP *bitmap));
 
+#if defined(ALLEGRO_UNSTABLE) || defined(ALLEGRO_INTERNAL_UNSTABLE) || defined(ALLEGRO_SRC)
+AL_FUNC(int, al_get_bitmap_depth, (ALLEGRO_BITMAP *bitmap));
+AL_FUNC(int, al_get_bitmap_samples, (ALLEGRO_BITMAP *bitmap));
+#endif
+
 AL_FUNC(ALLEGRO_BITMAP*, al_create_bitmap, (int w, int h));
 AL_FUNC(void, al_destroy_bitmap, (ALLEGRO_BITMAP *bitmap));
 
@@ -70,6 +82,9 @@ AL_FUNC(void, al_reparent_bitmap, (ALLEGRO_BITMAP *bitmap,
 AL_FUNC(ALLEGRO_BITMAP *, al_clone_bitmap, (ALLEGRO_BITMAP *bitmap));
 AL_FUNC(void, al_convert_bitmap, (ALLEGRO_BITMAP *bitmap));
 AL_FUNC(void, al_convert_memory_bitmaps, (void));
+#if defined(ALLEGRO_UNSTABLE) || defined(ALLEGRO_INTERNAL_UNSTABLE) || defined(ALLEGRO_SRC)
+AL_FUNC(void, al_backup_dirty_bitmap, (ALLEGRO_BITMAP *bitmap));
+#endif
 
 #ifdef __cplusplus
    }
diff --git a/include/allegro5/blender.h b/include/allegro5/blender.h
index 120ed78..a36a3a3 100644
--- a/include/allegro5/blender.h
+++ b/include/allegro5/blender.h
@@ -1,6 +1,9 @@
 #ifndef __al_included_allegro5_blender_h
 #define __al_included_allegro5_blender_h
 
+#include "allegro5/base.h"
+#include "allegro5/color.h"
+
 #ifdef __cplusplus
    extern "C" {
 #endif
diff --git a/include/allegro5/display.h b/include/allegro5/display.h
index d61d52a..1265c48 100644
--- a/include/allegro5/display.h
+++ b/include/allegro5/display.h
@@ -172,8 +172,12 @@ AL_FUNC(int, al_get_display_option, (ALLEGRO_DISPLAY *display, int option));
 AL_FUNC(void, al_hold_bitmap_drawing, (bool hold));
 AL_FUNC(bool, al_is_bitmap_drawing_held, (void));
 
+/* Miscellaneous */
 AL_FUNC(void, al_acknowledge_drawing_halt, (ALLEGRO_DISPLAY *display));
 AL_FUNC(void, al_acknowledge_drawing_resume, (ALLEGRO_DISPLAY *display));
+#if defined(ALLEGRO_UNSTABLE) || defined(ALLEGRO_INTERNAL_UNSTABLE) || defined(ALLEGRO_SRC)
+AL_FUNC(void, al_backup_dirty_bitmaps, (ALLEGRO_DISPLAY *display));
+#endif
 
 #ifdef __cplusplus
    }
diff --git a/include/allegro5/fullscreen_mode.h b/include/allegro5/fullscreen_mode.h
index 4f5cb77..c158ce9 100644
--- a/include/allegro5/fullscreen_mode.h
+++ b/include/allegro5/fullscreen_mode.h
@@ -1,6 +1,8 @@
 #ifndef __al_included_allegro5_fullscreen_mode_h
 #define __al_included_allegro5_fullscreen_mode_h
 
+#include "allegro5/base.h"
+
 #ifdef __cplusplus
    extern "C" {
 #endif
diff --git a/include/allegro5/inline/fmaths.inl b/include/allegro5/inline/fmaths.inl
index ca669e8..6f17894 100644
--- a/include/allegro5/inline/fmaths.inl
+++ b/include/allegro5/inline/fmaths.inl
@@ -110,7 +110,7 @@ AL_INLINE(al_fixed, al_fixsub, (al_fixed x, al_fixed y),
  *
  * PS. Don't move the #ifs inside the AL_INLINE; BCC doesn't like it.
  */
-#if (defined ALLEGRO_I386) || (!defined LONG_LONG)
+#if defined ALLEGRO_I386
    AL_INLINE(al_fixed, al_fixmul, (al_fixed x, al_fixed y),
    {
       return al_ftofix(al_fixtof(x) * al_fixtof(y));
@@ -118,30 +118,30 @@ AL_INLINE(al_fixed, al_fixsub, (al_fixed x, al_fixed y),
 #else
    AL_INLINE(al_fixed, al_fixmul, (al_fixed x, al_fixed y),
    {
-      LONG_LONG lx = x;
-      LONG_LONG ly = y;
-      LONG_LONG lres = (lx*ly);
+      int64_t lx = x;
+      int64_t ly = y;
+      int64_t lres = (lx*ly);
 
       if (lres > 0x7FFFFFFF0000LL) {
-	 al_set_errno(ERANGE);
-	 return 0x7FFFFFFF;
+         al_set_errno(ERANGE);
+         return 0x7FFFFFFF;
       }
       else if (lres < -0x7FFFFFFF0000LL) {
-	 al_set_errno(ERANGE);
-	 return 0x80000000;
+         al_set_errno(ERANGE);
+         return 0x80000000;
       }
       else {
-	 int res = lres >> 16;
-	 return res;
+         int res = lres >> 16;
+         return res;
       }
    })
 #endif	    /* al_fixmul() C implementations */
 
 
-#if (defined ALLEGRO_CFG_NO_FPU) && (defined LONG_LONG)
+#if defined ALLEGRO_CFG_NO_FPU
 AL_INLINE(al_fixed, al_fixdiv, (al_fixed x, al_fixed y),
 {
-   LONG_LONG lres = x;
+   int64_t lres = x;
    if (y == 0) {
       al_set_errno(ERANGE);
       return (x < 0) ? -0x7FFFFFFF : 0x7FFFFFFF;
diff --git a/include/allegro5/internal/aintern_bitmap.h b/include/allegro5/internal/aintern_bitmap.h
index d6a491f..bead85f 100644
--- a/include/allegro5/internal/aintern_bitmap.h
+++ b/include/allegro5/internal/aintern_bitmap.h
@@ -6,6 +6,7 @@
 #include "allegro5/display.h"
 #include "allegro5/render_state.h"
 #include "allegro5/transformations.h"
+#include "allegro5/internal/aintern_list.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -25,6 +26,8 @@ struct ALLEGRO_BITMAP
     */
    int _format;
    int _flags;
+   int _depth;
+   int _samples;
    ALLEGRO_DISPLAY *_display;
    /* What format is used for the backing memory
     * (can be different from _format, for e.g. compressed bitmaps) */
@@ -95,6 +98,8 @@ struct ALLEGRO_BITMAP
    /* Extra data for display bitmaps, like texture id and so on. */
    void *extra;
 
+   _AL_LIST_ITEM *dtor_item;
+
    /* set_target_bitmap and lock_bitmap mark bitmaps as dirty for preservation */
    bool dirty;
 };
@@ -129,10 +134,13 @@ struct ALLEGRO_BITMAP_INTERFACE
 
    /* Used to update any dangling pointers the bitmap driver might keep. */
    void (*bitmap_pointer_changed)(ALLEGRO_BITMAP *bitmap, ALLEGRO_BITMAP *old);
+
+   /* Back up texture to system RAM */
+   void (*backup_dirty_bitmap)(ALLEGRO_BITMAP *bitmap);
 };
 
 ALLEGRO_BITMAP *_al_create_bitmap_params(ALLEGRO_DISPLAY *current_display,
-   int w, int h, int format, int flags);
+   int w, int h, int format, int flags, int depth, int samples);
 
 AL_FUNC(ALLEGRO_DISPLAY*, _al_get_bitmap_display, (ALLEGRO_BITMAP *bitmap));
 
diff --git a/include/allegro5/internal/aintern_display.h b/include/allegro5/internal/aintern_display.h
index ee61eaa..425a5a9 100644
--- a/include/allegro5/internal/aintern_display.h
+++ b/include/allegro5/internal/aintern_display.h
@@ -80,7 +80,6 @@ struct ALLEGRO_DISPLAY_INTERFACE
    char *(*get_clipboard_text)(ALLEGRO_DISPLAY *display);
    bool  (*set_clipboard_text)(ALLEGRO_DISPLAY *display, const char *text);
    bool  (*has_clipboard_text)(ALLEGRO_DISPLAY *display);
-   
 };
 
 
diff --git a/include/allegro5/internal/aintern_dtor.h b/include/allegro5/internal/aintern_dtor.h
index 8ec99b5..dfceb68 100644
--- a/include/allegro5/internal/aintern_dtor.h
+++ b/include/allegro5/internal/aintern_dtor.h
@@ -1,6 +1,8 @@
 #ifndef __al_included_allegro5_aintern_dtor_h
 #define __al_included_allegro5_aintern_dtor_h
 
+#include "allegro5/internal/aintern_list.h"
+
 #ifdef __cplusplus
    extern "C" {
 #endif
@@ -14,9 +16,9 @@ AL_FUNC(void, _al_push_destructor_owner, (void));
 AL_FUNC(void, _al_pop_destructor_owner, (void));
 AL_FUNC(void, _al_run_destructors, (_AL_DTOR_LIST *dtors));
 AL_FUNC(void, _al_shutdown_destructors, (_AL_DTOR_LIST *dtors));
-AL_FUNC(void, _al_register_destructor, (_AL_DTOR_LIST *dtors, char const *name,
+AL_FUNC(_AL_LIST_ITEM*, _al_register_destructor, (_AL_DTOR_LIST *dtors, char const *name,
    void *object, void (*func)(void*)));
-AL_FUNC(void, _al_unregister_destructor, (_AL_DTOR_LIST *dtors, void *object));
+AL_FUNC(void, _al_unregister_destructor, (_AL_DTOR_LIST *dtors, _AL_LIST_ITEM* dtor_item));
 AL_FUNC(void, _al_foreach_destructor, (_AL_DTOR_LIST *dtors,
                                           void (*callback)(void *object, void (*func)(void *), void *udata),
                                           void *userdata));
diff --git a/include/allegro5/internal/aintern_opengl.h b/include/allegro5/internal/aintern_opengl.h
index bb17c2f..489211b 100644
--- a/include/allegro5/internal/aintern_opengl.h
+++ b/include/allegro5/internal/aintern_opengl.h
@@ -36,10 +36,35 @@ enum {
    FBO_INFO_PERSISTENT  = 2   /* exclusive to the owner bitmap */
 };
 
+typedef struct ALLEGRO_FBO_BUFFERS
+{
+   /* It is not easy to determine the best lifetime for these. Unlike
+    * FBOs they are heavy objects and re-creating them can be costly.
+    * However if we make them part of ALLEGRO_BITMAP_EXTRA_OPENGL
+    * below, there is no way to release them. I.e. if you create
+    * many bitmaps in the beginning of your game and need depth and/or
+    * multisampling for them, the only way to free the buffers would be
+    * to copy those bitmaps and then destroy them.
+    *
+    * By tying them to the FBO struct, there is a limit of how many
+    * buffers Allegro will create before recycling them. This will
+    * work very well in the case where you only have one or a few
+    * bitmaps you regularly draw into.
+    */
+   GLuint depth_buffer;
+   int dw, dh, depth;
+   
+   GLuint multisample_buffer;
+   int mw, mh, samples;
+} ALLEGRO_FBO_BUFFERS;
+
 typedef struct ALLEGRO_FBO_INFO
 {
    int fbo_state;
    GLuint fbo;
+
+   ALLEGRO_FBO_BUFFERS buffers;
+      
    ALLEGRO_BITMAP *owner;
    double last_use_time;
 } ALLEGRO_FBO_INFO;
@@ -168,10 +193,13 @@ ALLEGRO_FBO_INFO *_al_ogl_persist_fbo(ALLEGRO_DISPLAY *display,
 void _al_ogl_setup_fbo(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitmap);
 bool _al_ogl_setup_fbo_non_backbuffer(ALLEGRO_DISPLAY *display,
                                       ALLEGRO_BITMAP *bitmap);
+void _al_ogl_del_fbo(ALLEGRO_FBO_INFO *info);
 
 /* common driver */
 void _al_ogl_setup_gl(ALLEGRO_DISPLAY *d);
 void _al_ogl_set_target_bitmap(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitmap);
+void _al_ogl_unset_target_bitmap(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitmap);
+void _al_ogl_finalize_fbo(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitmap);
 void _al_ogl_setup_bitmap_clipping(const ALLEGRO_BITMAP *bitmap);
 ALLEGRO_BITMAP *_al_ogl_get_backbuffer(ALLEGRO_DISPLAY *d);
 ALLEGRO_BITMAP* _al_ogl_create_backbuffer(ALLEGRO_DISPLAY *disp);
diff --git a/include/allegro5/internal/aintern_pixels.h b/include/allegro5/internal/aintern_pixels.h
index d9905ba..3ad0e37 100644
--- a/include/allegro5/internal/aintern_pixels.h
+++ b/include/allegro5/internal/aintern_pixels.h
@@ -57,7 +57,7 @@
          }                                                                    \
                                                                               \
          case ALLEGRO_PIXEL_FORMAT_RGB_888: {                                 \
-            uint32_t _gp_pixel = READ3BYTES(data);                            \
+            uint32_t _gp_pixel = _AL_READ3BYTES(data);                         \
             _AL_MAP_RGBA(color,                                               \
                (_gp_pixel & 0xFF0000) >> 16,                                  \
                (_gp_pixel & 0x00FF00) >>  8,                                  \
@@ -141,7 +141,7 @@
          }                                                                    \
                                                                               \
          case ALLEGRO_PIXEL_FORMAT_BGR_888: {                                 \
-            uint32_t _gp_pixel = READ3BYTES(data);                            \
+            uint32_t _gp_pixel = _AL_READ3BYTES(data);                         \
             _AL_MAP_RGBA(color,                                               \
                (_gp_pixel & 0x000000FF) >>  0,                                \
                (_gp_pixel & 0x0000FF00) >>  8,                                \
@@ -306,7 +306,7 @@
             _pp_pixel  = _al_fast_float_to_int(color.r * 255) << 16;          \
             _pp_pixel |= _al_fast_float_to_int(color.g * 255) << 8;           \
             _pp_pixel |= _al_fast_float_to_int(color.b * 255);                \
-            WRITE3BYTES(data, _pp_pixel);                                     \
+            _AL_WRITE3BYTES(data, _pp_pixel);                                  \
             if (advance)                                                      \
                data += 3;                                                     \
             break;                                                            \
@@ -373,7 +373,7 @@
             _pp_pixel  = _al_fast_float_to_int(color.b * 0xff) << 16;         \
             _pp_pixel |= _al_fast_float_to_int(color.g * 0xff) << 8;          \
             _pp_pixel |= _al_fast_float_to_int(color.r * 0xff);               \
-            WRITE3BYTES(data, _pp_pixel);                                     \
+            _AL_WRITE3BYTES(data, _pp_pixel);                                  \
             if (advance)                                                      \
                data += 3;                                                     \
             break;                                                            \
diff --git a/include/allegro5/internal/aintern_raspberrypi.h b/include/allegro5/internal/aintern_raspberrypi.h
index 6e34be0..defd81e 100644
--- a/include/allegro5/internal/aintern_raspberrypi.h
+++ b/include/allegro5/internal/aintern_raspberrypi.h
@@ -45,7 +45,8 @@ ALLEGRO_DISPLAY_INTERFACE *_al_get_raspberrypi_display_interface(void);
 void _al_raspberrypi_get_screen_info(int *dx, int *dy,
    int *screen_width, int *screen_height);
 
-bool _al_evdev_set_mouse_range(int x1, int y1, int x2, int y2);
+bool _al_evdev_set_mouse_range(int x1, int y1, int x2, int y2); // used by console mouse driver
+void _al_raspberrypi_get_mouse_scale_ratios(float *x, float *y); // used by X mouse driver
 
 ALLEGRO_MOUSE_DRIVER _al_mousedrv_linux_evdev;
 
diff --git a/include/allegro5/internal/aintern_shader.h b/include/allegro5/internal/aintern_shader.h
index 80bb3e0..b3648fd 100644
--- a/include/allegro5/internal/aintern_shader.h
+++ b/include/allegro5/internal/aintern_shader.h
@@ -1,6 +1,7 @@
 #ifndef __al_included_allegro5_internal_aintern_shader_h
 #define __al_included_allegro5_internal_aintern_shader_h
 
+#include "allegro5/internal/aintern_list.h"
 #include "allegro5/internal/aintern_vector.h"
 
 #ifdef __cplusplus
@@ -24,13 +25,13 @@ struct ALLEGRO_SHADER_INTERFACE
    bool (*set_shader_sampler)(ALLEGRO_SHADER *shader, const char *name,
          ALLEGRO_BITMAP *bitmap, int unit);
    bool (*set_shader_matrix)(ALLEGRO_SHADER *shader, const char *name,
-         ALLEGRO_TRANSFORM *matrix);
+         const ALLEGRO_TRANSFORM *matrix);
    bool (*set_shader_int)(ALLEGRO_SHADER *shader, const char *name, int i);
    bool (*set_shader_float)(ALLEGRO_SHADER *shader, const char *name, float f);
    bool (*set_shader_int_vector)(ALLEGRO_SHADER *shader, const char *name,
-         int elem_size, int *i, int num_elems);
+         int elem_size, const int *i, int num_elems);
    bool (*set_shader_float_vector)(ALLEGRO_SHADER *shader, const char *name,
-         int elem_size, float *f, int num_elems);
+         int elem_size, const float *f, int num_elems);
    bool (*set_shader_bool)(ALLEGRO_SHADER *shader, const char *name, bool b);
 };
 
@@ -42,6 +43,7 @@ struct ALLEGRO_SHADER
    ALLEGRO_SHADER_PLATFORM platform;
    ALLEGRO_SHADER_INTERFACE *vt;
    _AL_VECTOR bitmaps; /* of ALLEGRO_BITMAP pointers */
+   _AL_LIST_ITEM *dtor_item;
 };
 
 /* In most cases you should use _al_set_bitmap_shader_field. */
diff --git a/include/allegro5/internal/alconfig.h b/include/allegro5/internal/alconfig.h
index 3647569..19274e1 100644
--- a/include/allegro5/internal/alconfig.h
+++ b/include/allegro5/internal/alconfig.h
@@ -107,12 +107,9 @@
       #endif
    #endif
    
-   #ifndef LONG_LONG
-      #define LONG_LONG       long long
-      #ifdef ALLEGRO_GUESS_INTTYPES_OK
-         #define int64_t      signed long long
-         #define uint64_t     unsigned long long
-      #endif
+   #ifdef ALLEGRO_GUESS_INTTYPES_OK
+      #define int64_t      signed long long
+      #define uint64_t     unsigned long long
    #endif
 
    #ifdef __i386__
@@ -225,43 +222,31 @@
    extern "C" {
 #endif
 
-
 /* endian-independent 3-byte accessor macros */
 #ifdef ALLEGRO_LITTLE_ENDIAN
 
-   #define READ3BYTES(p)  ((*(unsigned char *)(p))               \
-                           | (*((unsigned char *)(p) + 1) << 8)  \
-                           | (*((unsigned char *)(p) + 2) << 16))
+   #define _AL_READ3BYTES(p)   ((*(unsigned char *)(p))            \
+                             | (*((unsigned char *)(p) + 1) << 8)  \
+                             | (*((unsigned char *)(p) + 2) << 16))
 
-   #define WRITE3BYTES(p,c)  ((*(unsigned char *)(p) = (c)),             \
-                              (*((unsigned char *)(p) + 1) = (c) >> 8),  \
-                              (*((unsigned char *)(p) + 2) = (c) >> 16))
+   #define _AL_WRITE3BYTES(p,c) ((*(unsigned char *)(p) = (c)),             \
+                                 (*((unsigned char *)(p) + 1) = (c) >> 8),  \
+                                 (*((unsigned char *)(p) + 2) = (c) >> 16))
 
 #elif defined ALLEGRO_BIG_ENDIAN
 
-   #define READ3BYTES(p)  ((*(unsigned char *)(p) << 16)         \
-                           | (*((unsigned char *)(p) + 1) << 8)  \
-                           | (*((unsigned char *)(p) + 2)))
+   #define _AL_READ3BYTES(p)  ((*(unsigned char *)(p) << 16)       \
+                             | (*((unsigned char *)(p) + 1) << 8)  \
+                             | (*((unsigned char *)(p) + 2)))
 
-   #define WRITE3BYTES(p,c)  ((*(unsigned char *)(p) = (c) >> 16),       \
-                              (*((unsigned char *)(p) + 1) = (c) >> 8),  \
-                              (*((unsigned char *)(p) + 2) = (c)))
+   #define _AL_WRITE3BYTES(p,c) ((*(unsigned char *)(p) = (c) >> 16),       \
+                                 (*((unsigned char *)(p) + 1) = (c) >> 8),  \
+                                 (*((unsigned char *)(p) + 2) = (c)))
 
 #else
    #error endianess not defined
 #endif
 
-
-/* generic versions of the video memory access helpers */
-/* FIXME: why do we need macros for this? */
-#define bmp_write16(addr, c)        (*((uint16_t *)(addr)) = (c))
-#define bmp_write32(addr, c)        (*((uint32_t *)(addr)) = (c))
-
-#define bmp_read16(addr)            (*((uint16_t *)(addr)))
-#define bmp_read32(addr)            (*((uint32_t *)(addr)))
-
-
-
 #ifdef __cplusplus
    }
 #endif
diff --git a/include/allegro5/memory.h b/include/allegro5/memory.h
index 697557c..869f6c2 100644
--- a/include/allegro5/memory.h
+++ b/include/allegro5/memory.h
@@ -16,6 +16,8 @@
 #ifndef __al_included_allegro5_memory_h
 #define __al_included_allegro5_memory_h
 
+#include "allegro5/base.h"
+
 #ifdef __cplusplus
    extern "C" {
 #endif
diff --git a/include/allegro5/monitor.h b/include/allegro5/monitor.h
index 2e939da..fcbb527 100644
--- a/include/allegro5/monitor.h
+++ b/include/allegro5/monitor.h
@@ -1,6 +1,8 @@
 #ifndef __al_included_allegro5_monitor_h
 #define __al_included_allegro5_monitor_h
 
+#include "allegro5/base.h"
+
 #ifdef __cplusplus
    extern "C" {
 #endif
diff --git a/include/allegro5/opengl/GLext/gl_ext_defs.h b/include/allegro5/opengl/GLext/gl_ext_defs.h
index 855963b..4443b94 100644
--- a/include/allegro5/opengl/GLext/gl_ext_defs.h
+++ b/include/allegro5/opengl/GLext/gl_ext_defs.h
@@ -4203,6 +4203,54 @@ typedef int GLclampx;
 #define _ALLEGRO_GL_OES_query_matrix
 #endif
 
+#ifndef GL_OES_framebuffer_object
+#define GL_OES_framebuffer_object
+#define GL_FRAMEBUFFER_OES                     0x8D40
+#define GL_RENDERBUFFER_OES                    0x8D41
+#define GL_DEPTH_COMPONENT16_OES               0x81A5
+#define GL_RGBA4_OES                           0x8056
+#define GL_RGB5_A1_OES                         0x8057
+#define GL_RGB565_OES                          0x8D62
+#define GL_STENCIL_INDEX1_OES                  0x8D46
+#define GL_STENCIL_INDEX4_OES                  0x8D47
+#define GL_STENCIL_INDEX8_OES                  0x8D48
+#define GL_RENDERBUFFER_WIDTH_OES              0x8D42
+#define GL_RENDERBUFFER_HEIGHT_OES             0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES    0x8D44
+#define GL_RENDERBUFFER_RED_SIZE_OES           0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE_OES         0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE_OES          0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE_OES         0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE_OES         0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE_OES       0x8D55
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES            0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES            0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES          0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES  0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES     0x8CD4
+#define GL_COLOR_ATTACHMENT0_OES                0x8CE0
+#define GL_DEPTH_ATTACHMENT_OES                 0x8D00
+#define GL_STENCIL_ATTACHMENT_OES               0x8D20
+#define GL_GL_NONE_OES                          0
+#define GL_FRAMEBUFFER_COMPLETE_OES                          0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES             0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES     0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES             0x8CD9
+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES                0x8CDA
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES            0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES            0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED_OES                       0x8CDD
+#define GL_FRAMEBUFFER_BINDING_OES             0x8CA6
+#define GL_RENDERBUFFER_BINDING_OES            0x8CA7
+#define GL_MAX_RENDERBUFFER_SIZE_OES           0x84E8
+#define GL_INVALID_FRAMEBUFFER_OPERATION_OES   0x0506
+#endif
+
+#ifndef GL_OES_depth24
+#define GL_OES_depth24
+#define DEPTH_COMPONENT24_OES                 0x81A6
+#endif
+
 #ifndef GL_EXT_depth_bounds_test
 #define GL_EXT_depth_bounds_test
 #define _ALLEGRO_GL_EXT_depth_bounds_test
diff --git a/include/allegro5/opengl/gl_ext.h b/include/allegro5/opengl/gl_ext.h
index df8cc55..61efc5e 100644
--- a/include/allegro5/opengl/gl_ext.h
+++ b/include/allegro5/opengl/gl_ext.h
@@ -2,6 +2,9 @@
 #ifndef __al_included_allegro5_gl_ext_h
 #define __al_included_allegro5_gl_ext_h
 
+typedef struct ALLEGRO_OGL_EXT_LIST ALLEGRO_OGL_EXT_LIST;
+
+#if defined(ALLEGRO_UNSTABLE) || defined(ALLEGRO_INTERNAL_UNSTABLE) || defined(ALLEGRO_SRC)
 
 /*
  * MSVC declares the following extensions and MinGW doesn't. In order to
@@ -134,7 +137,7 @@ typedef struct ALLEGRO_OGL_EXT_API {
 #endif
 } ALLEGRO_OGL_EXT_API;
 
-
+#endif
 
 #endif
 
diff --git a/include/allegro5/platform/albcc32.h b/include/allegro5/platform/albcc32.h
index 102eec8..ca6bbc2 100644
--- a/include/allegro5/platform/albcc32.h
+++ b/include/allegro5/platform/albcc32.h
@@ -75,7 +75,6 @@
 #define AL_INLINE(type, name, args, code)        extern __inline type __cdecl name args code END_OF_INLINE(name)
 #define AL_INLINE_STATIC(type, name, args, code) static __inline type name args code END_OF_INLINE(name)
 
-#define LONG_LONG    __int64
 #define int64_t      signed __int64
 #define uint64_t     unsigned __int64
 
diff --git a/include/allegro5/platform/almsvc.h b/include/allegro5/platform/almsvc.h
index 906a95f..9a3cdf5 100644
--- a/include/allegro5/platform/almsvc.h
+++ b/include/allegro5/platform/almsvc.h
@@ -74,8 +74,6 @@
 
 #define INLINE       __inline
 
-#define LONG_LONG    __int64
-
 /* VC10 is the first version to define int64_t and uint64_t */
 #if _MSC_VER < 1600
 #define int64_t      signed __int64
diff --git a/include/allegro5/platform/alosx.h b/include/allegro5/platform/alosx.h
index 0c36c84..c9278ec 100644
--- a/include/allegro5/platform/alosx.h
+++ b/include/allegro5/platform/alosx.h
@@ -40,7 +40,6 @@
    #import <CoreAudio/CoreAudio.h>
    #import <AudioUnit/AudioUnit.h>
    #import <AudioToolbox/AudioToolbox.h>
-   #import <QuickTime/QuickTime.h>
    #import <IOKit/IOKitLib.h>
    #import <IOKit/IOCFPlugIn.h>
    #import <IOKit/hid/IOHIDLib.h>
diff --git a/include/allegro5/platform/alplatf.h.cmake b/include/allegro5/platform/alplatf.h.cmake
index 8cdf62a..ef65413 100644
--- a/include/allegro5/platform/alplatf.h.cmake
+++ b/include/allegro5/platform/alplatf.h.cmake
@@ -19,6 +19,7 @@
 #cmakedefine ALLEGRO_CFG_OPENGL
 #cmakedefine ALLEGRO_CFG_OPENGLES
 #cmakedefine ALLEGRO_CFG_OPENGLES2
+#cmakedefine ALLEGRO_CFG_OPENGLES3
 #cmakedefine ALLEGRO_CFG_OPENGL_PROGRAMMABLE_PIPELINE
 #cmakedefine ALLEGRO_CFG_SHADER_GLSL
 #cmakedefine ALLEGRO_CFG_SHADER_HLSL
diff --git a/include/allegro5/platform/alwatcom.h b/include/allegro5/platform/alwatcom.h
index 2e5b0bc..f2d0771 100644
--- a/include/allegro5/platform/alwatcom.h
+++ b/include/allegro5/platform/alwatcom.h
@@ -50,7 +50,6 @@
 #define ALLEGRO_I386
 #define ALLEGRO_LITTLE_ENDIAN
 
-#define LONG_LONG    long long
 #ifdef ALLEGRO_GUESS_INTTYPES_OK
    #define int64_t   signed long long
    #define uint64_t  unsigned long long
diff --git a/include/allegro5/render_state.h b/include/allegro5/render_state.h
index fad924d..99c0764 100644
--- a/include/allegro5/render_state.h
+++ b/include/allegro5/render_state.h
@@ -1,6 +1,8 @@
 #ifndef __al_included_allegro5_render_state_h
 #define __al_included_allegro5_render_state_h
 
+#include "allegro5/base.h"
+
 #ifdef __cplusplus
    extern "C" {
 #endif
diff --git a/include/allegro5/shader.h b/include/allegro5/shader.h
index 32fc071..97183be 100644
--- a/include/allegro5/shader.h
+++ b/include/allegro5/shader.h
@@ -57,13 +57,13 @@ AL_FUNC(void, al_destroy_shader, (ALLEGRO_SHADER *shader));
 AL_FUNC(bool, al_set_shader_sampler, (const char *name, ALLEGRO_BITMAP *bitmap,
    int unit));
 AL_FUNC(bool, al_set_shader_matrix, (const char *name,
-   ALLEGRO_TRANSFORM *matrix));
+   const ALLEGRO_TRANSFORM *matrix));
 AL_FUNC(bool, al_set_shader_int, (const char *name, int i));
 AL_FUNC(bool, al_set_shader_float, (const char *name, float f));
 AL_FUNC(bool, al_set_shader_int_vector, (const char *name, int num_components,
-   int *i, int num_elems));
+   const int *i, int num_elems));
 AL_FUNC(bool, al_set_shader_float_vector, (const char *name, int num_components,
-   float *f, int num_elems));
+   const float *f, int num_elems));
 AL_FUNC(bool, al_set_shader_bool, (const char *name, bool b));
 
 AL_FUNC(char const *, al_get_default_shader_source, (ALLEGRO_SHADER_PLATFORM platform,
diff --git a/include/allegro5/timer.h b/include/allegro5/timer.h
index 60db65a..1d6bffd 100644
--- a/include/allegro5/timer.h
+++ b/include/allegro5/timer.h
@@ -17,6 +17,7 @@
 #define __al_included_allegro5_timer_h
 
 #include "allegro5/base.h"
+#include "allegro5/events.h"
 
 #ifdef __cplusplus
    extern "C" {
diff --git a/misc/Allegro5_iOS/Allegro5_iOS.xcodeproj/project.pbxproj b/misc/Allegro5_iOS/Allegro5_iOS.xcodeproj/project.pbxproj
index 00958b9..216985c 100644
--- a/misc/Allegro5_iOS/Allegro5_iOS.xcodeproj/project.pbxproj
+++ b/misc/Allegro5_iOS/Allegro5_iOS.xcodeproj/project.pbxproj
@@ -8,6 +8,8 @@
 
 /* Begin PBXBuildFile section */
 		968608761B6B12960008BD29 /* dds.c in Sources */ = {isa = PBXBuildFile; fileRef = 968608751B6B12960008BD29 /* dds.c */; };
+		96A12D031D2F3C3E00F245D9 /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 96A12D021D2F3C3E00F245D9 /* png.c */; };
+		96A12D051D2F3F9300F245D9 /* identify.c in Sources */ = {isa = PBXBuildFile; fileRef = 96A12D041D2F3F9300F245D9 /* identify.c */; };
 		96A3016E1B9A874F002E2D1C /* clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 96A3016D1B9A874F002E2D1C /* clipboard.c */; };
 		96A301701B9A8778002E2D1C /* iphone_clipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 96A3016F1B9A8778002E2D1C /* iphone_clipboard.m */; };
 		96CE34EB1B6B059C00705360 /* allegro.c in Sources */ = {isa = PBXBuildFile; fileRef = 96CE34BB1B6B059C00705360 /* allegro.c */; };
@@ -91,7 +93,6 @@
 		96CE35591B6B066100705360 /* text.c in Sources */ = {isa = PBXBuildFile; fileRef = 96CE35551B6B066100705360 /* text.c */; };
 		96CE355F1B6B068800705360 /* bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 96CE355A1B6B068800705360 /* bmp.c */; };
 		96CE35601B6B068800705360 /* iio.c in Sources */ = {isa = PBXBuildFile; fileRef = 96CE355B1B6B068800705360 /* iio.c */; };
-		96CE35611B6B068800705360 /* iphone.m in Sources */ = {isa = PBXBuildFile; fileRef = 96CE355C1B6B068800705360 /* iphone.m */; };
 		96CE35621B6B068800705360 /* pcx.c in Sources */ = {isa = PBXBuildFile; fileRef = 96CE355D1B6B068800705360 /* pcx.c */; };
 		96CE35631B6B068800705360 /* tga.c in Sources */ = {isa = PBXBuildFile; fileRef = 96CE355E1B6B068800705360 /* tga.c */; };
 		96CE35651B6B069700705360 /* generic_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 96CE35641B6B069700705360 /* generic_main.c */; };
@@ -128,6 +129,8 @@
 /* Begin PBXFileReference section */
 		964130EF1A6353E700184496 /* libAllegro5_iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAllegro5_iOS.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		968608751B6B12960008BD29 /* dds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dds.c; path = ../../addons/image/dds.c; sourceTree = "<group>"; };
+		96A12D021D2F3C3E00F245D9 /* png.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = png.c; path = ../../addons/image/png.c; sourceTree = "<group>"; };
+		96A12D041D2F3F9300F245D9 /* identify.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = identify.c; path = ../../addons/image/identify.c; sourceTree = "<group>"; };
 		96A3016D1B9A874F002E2D1C /* clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = clipboard.c; path = ../../src/clipboard.c; sourceTree = "<group>"; };
 		96A3016F1B9A8778002E2D1C /* iphone_clipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iphone_clipboard.m; path = ../../src/iphone/iphone_clipboard.m; sourceTree = "<group>"; };
 		96CE34BB1B6B059C00705360 /* allegro.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = allegro.c; path = ../../src/allegro.c; sourceTree = "<group>"; };
@@ -212,7 +215,6 @@
 		96CE35551B6B066100705360 /* text.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = text.c; path = ../../addons/font/text.c; sourceTree = "<group>"; };
 		96CE355A1B6B068800705360 /* bmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bmp.c; path = ../../addons/image/bmp.c; sourceTree = "<group>"; };
 		96CE355B1B6B068800705360 /* iio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = iio.c; path = ../../addons/image/iio.c; sourceTree = "<group>"; };
-		96CE355C1B6B068800705360 /* iphone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iphone.m; path = ../../addons/image/iphone.m; sourceTree = "<group>"; };
 		96CE355D1B6B068800705360 /* pcx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pcx.c; path = ../../addons/image/pcx.c; sourceTree = "<group>"; };
 		96CE355E1B6B068800705360 /* tga.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tga.c; path = ../../addons/image/tga.c; sourceTree = "<group>"; };
 		96CE35641B6B069700705360 /* generic_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = generic_main.c; path = ../../addons/main/generic_main.c; sourceTree = "<group>"; };
@@ -265,6 +267,8 @@
 		96CE34BA1B6B055300705360 /* src  */ = {
 			isa = PBXGroup;
 			children = (
+				96A12D041D2F3F9300F245D9 /* identify.c */,
+				96A12D021D2F3C3E00F245D9 /* png.c */,
 				96A3016F1B9A8778002E2D1C /* iphone_clipboard.m */,
 				96A3016D1B9A874F002E2D1C /* clipboard.c */,
 				96CE356C1B6B06EF00705360 /* directx_shaders.cpp */,
@@ -285,7 +289,6 @@
 				96CE35641B6B069700705360 /* generic_main.c */,
 				96CE355A1B6B068800705360 /* bmp.c */,
 				96CE355B1B6B068800705360 /* iio.c */,
-				96CE355C1B6B068800705360 /* iphone.m */,
 				96CE355D1B6B068800705360 /* pcx.c */,
 				96CE355E1B6B068800705360 /* tga.c */,
 				968608751B6B12960008BD29 /* dds.c */,
@@ -462,6 +465,7 @@
 				96CE35621B6B068800705360 /* pcx.c in Sources */,
 				96CE357F1B6B06EF00705360 /* polyline.c in Sources */,
 				96CE352C1B6B05F900705360 /* ogl_fbo.c in Sources */,
+				96A12D051D2F3F9300F245D9 /* identify.c in Sources */,
 				96CE354F1B6B063800705360 /* ViewController.m in Sources */,
 				96CE34FD1B6B059C00705360 /* file_slice.c in Sources */,
 				96CE35481B6B063800705360 /* iphone_joystick.m in Sources */,
@@ -472,6 +476,7 @@
 				96CE34FB1B6B059C00705360 /* evtsrc.c in Sources */,
 				96CE35001B6B059C00705360 /* fshook_stdio.c in Sources */,
 				96CE35021B6B059C00705360 /* fullscreen_mode.c in Sources */,
+				96A12D031D2F3C3E00F245D9 /* png.c in Sources */,
 				96CE34F81B6B059C00705360 /* drawing.c in Sources */,
 				96CE350D1B6B059C00705360 /* mouse_cursor.c in Sources */,
 				96CE350C1B6B059C00705360 /* monitor.c in Sources */,
@@ -531,7 +536,6 @@
 				96CE35071B6B059C00705360 /* libc.c in Sources */,
 				96CE35121B6B059C00705360 /* system.c in Sources */,
 				96CE34EE1B6B059C00705360 /* bitmap_lock.c in Sources */,
-				96CE35611B6B068800705360 /* iphone.m in Sources */,
 				96CE35361B6B061200705360 /* aatree.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -620,7 +624,11 @@
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++98";
 				CLANG_CXX_LIBRARY = "libstdc++";
 				CLANG_ENABLE_OBJC_ARC = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = "ALLEGRO_LIB_BUILD=1";
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					ALLEGRO_LIB_BUILD,
+					ALLEGRO_UNSTABLE,
+					ALLEGRO_INTERNAL_UNSTABLE,
+				);
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
 					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
@@ -634,9 +642,10 @@
 					../../addons/physfs,
 					../../addons/primitives,
 					../../addons/ttf,
-					../../deps/include/freetype2,
+					../../misc/Allegro5_iOS,
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
+				IPHONEOS_DEPLOYMENT_TARGET = 6.1;
+				LIBRARY_SEARCH_PATHS = "";
 				OTHER_LDFLAGS = "-ObjC";
 				PRODUCT_NAME = Allegro5_iOS;
 				SKIP_INSTALL = YES;
@@ -652,7 +661,12 @@
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++98";
 				CLANG_CXX_LIBRARY = "libstdc++";
 				CLANG_ENABLE_OBJC_ARC = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = "ALLEGRO_LIB_BUILD=1";
+				GCC_OPTIMIZATION_LEVEL = s;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					ALLEGRO_LIB_BUILD,
+					ALLEGRO_UNSTABLE,
+					ALLEGRO_INTERNAL_UNSTABLE,
+				);
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
 					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
@@ -666,12 +680,13 @@
 					../../addons/physfs,
 					../../addons/primitives,
 					../../addons/ttf,
-					../../deps/include/freetype2,
+					../../misc/Allegro5_iOS,
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
+				IPHONEOS_DEPLOYMENT_TARGET = 6.1;
+				LIBRARY_SEARCH_PATHS = "";
 				OTHER_LDFLAGS = "-ObjC";
 				PRODUCT_NAME = Allegro5_iOS;
-				SKIP_INSTALL = YES;
+				SKIP_INSTALL = NO;
 				TARGETED_DEVICE_FAMILY = "1,2";
 				VALID_ARCHS = "arm64 armv7";
 			};
diff --git a/misc/Allegro5_iOS/allegro5/internal/aintern_image_cfg.h b/misc/Allegro5_iOS/allegro5/internal/aintern_image_cfg.h
index dd804a6..70f7cd8 100644
--- a/misc/Allegro5_iOS/allegro5/internal/aintern_image_cfg.h
+++ b/misc/Allegro5_iOS/allegro5/internal/aintern_image_cfg.h
@@ -1,4 +1,4 @@
-#define ALLEGRO_CFG_WANT_NATIVE_IMAGE_LOADER
+/* #define ALLEGRO_CFG_WANT_NATIVE_IMAGE_LOADER */
 
 /* which libraries are present and needed? */
 /* #undef ALLEGRO_CFG_IIO_HAVE_GDIPLUS */
@@ -7,6 +7,8 @@
 /* #undef ALLEGRO_CFG_IIO_HAVE_PNG */
 /* #undef ALLEGRO_CFG_IIO_HAVE_JPG */
 
+#define ALLEGRO_CFG_IIO_HAVE_PNG
+
 /* which formats are supported and wanted? */
 #define ALLEGRO_CFG_IIO_SUPPORT_PNG
-#define ALLEGRO_CFG_IIO_SUPPORT_JPG
+//#define ALLEGRO_CFG_IIO_SUPPORT_JPG
diff --git a/misc/install_test.c b/misc/install_test.c
new file mode 100644
index 0000000..8334dc1
--- /dev/null
+++ b/misc/install_test.c
@@ -0,0 +1,50 @@
+/*
+ * A small test program that you can compile and run to verify that Allegro was
+ * installed correctly. It assumes you installed all the addons.
+ */
+
+#include <allegro5/allegro.h>
+#include <allegro5/allegro_font.h>
+#include <allegro5/allegro_ttf.h>
+#include <allegro5/allegro_image.h>
+#include <allegro5/allegro_audio.h>
+#include <allegro5/allegro_acodec.h>
+#include <allegro5/allegro_native_dialog.h>
+#include <allegro5/allegro_primitives.h>
+#include <allegro5/allegro_video.h>
+#include <allegro5/allegro_color.h>
+#include <allegro5/allegro_physfs.h>
+#include <allegro5/allegro_memfile.h>
+
+#include <stdio.h>
+
+int main() {
+   uint32_t version = al_get_allegro_version();
+   int major = version >> 24;
+   int minor = (version >> 16) & 255;
+   int revision = (version >> 8) & 255;
+   int release = version & 255;
+
+   fprintf(stderr, "Library version: %d.%d.%d.%d\n", major, minor, revision, release);
+   fprintf(stderr, "Header version: %d.%d.%d.%d\n", ALLEGRO_VERSION, ALLEGRO_SUB_VERSION, ALLEGRO_WIP_VERSION, ALLEGRO_RELEASE_NUMBER);
+   fprintf(stderr, "Header version string: %s\n", ALLEGRO_VERSION_STR);
+
+   if (!al_init()) {
+      fprintf(stderr, "Failed to initialize Allegro, probably a header/shared library version mismatch.\n");
+      return -1;
+   }
+
+#define INIT_CHECK(init_function, addon_name) do { if (!init_function()) { fprintf(stderr, "Failed to initialize the " addon_name " addon.\n"); return -1; } } while (0)
+
+   INIT_CHECK(al_init_font_addon, "font");
+   INIT_CHECK(al_init_ttf_addon, "TTF");
+   INIT_CHECK(al_init_image_addon, "image");
+   INIT_CHECK(al_install_audio, "audio");
+   INIT_CHECK(al_init_acodec_addon, "acodec");
+   INIT_CHECK(al_init_native_dialog_addon, "native dialog");
+   INIT_CHECK(al_init_primitives_addon, "primitives");
+   INIT_CHECK(al_init_video_addon, "video");
+
+   fprintf(stderr, "Everything looks good!\n");
+   return 0;
+}
diff --git a/misc/make_android_project.py b/misc/make_android_project.py
index e0e2f08..1fd382a 100755
--- a/misc/make_android_project.py
+++ b/misc/make_android_project.py
@@ -111,7 +111,7 @@ def touch_manifest(options):
     activity = tree.find("./application/activity")
     activity.set("android:launchMode", "singleTask")
     activity.set("android:screenOrientation", "unspecified")
-    activity.set("android:configChanges", "screenLayout|uiMode|orientation")
+    activity.set("android:configChanges", "screenLayout|uiMode|orientation|screenSize")
     tree.write(filename, "utf-8", xml_declaration=True)
 
 def touch_strings(options):
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 9ef7755..f802d5a 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -4,7 +4,7 @@ include(FindPythonInterp)
 # the Python API.
 foreach(x ${MONOLITH_SOURCES} ${MONOLITH_HEADERS} ${ALLEGRO_PUBLIC_HEADERS})
     if(NOT ${x} MATCHES "^/.*")
-        file(RELATIVE_PATH xrel ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/${x})
+        file(RELATIVE_PATH xrel ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/${x})
         list(APPEND SOURCES ${xrel})
     endif()
 endforeach()
@@ -13,21 +13,21 @@ if(WIN32)
     add_custom_command(
         OUTPUT python_protos
         DEPENDS ${SOURCES}
-        COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/python/checkdocs.py
+        COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/python/checkdocs.py
             -c ${CMAKE_C_COMPILER}
             -p python_protos
-            -b ${CMAKE_BINARY_DIR}
-            -s ${CMAKE_SOURCE_DIR}
+            -b ${PROJECT_BINARY_DIR}
+            -s ${PROJECT_SOURCE_DIR}
             -w
         )
 else(WIN32)
     add_custom_command(
         OUTPUT python_protos
         DEPENDS ${SOURCES}
-        COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/python/checkdocs.py
+        COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/python/checkdocs.py
             -p python_protos
-            -b ${CMAKE_BINARY_DIR}
-            -s ${CMAKE_SOURCE_DIR}
+            -b ${PROJECT_BINARY_DIR}
+            -s ${PROJECT_SOURCE_DIR}
         )
 endif(WIN32)
 
@@ -39,7 +39,7 @@ SET(version "${ALLEGRO_SOVERSION}")
 add_custom_command(
     OUTPUT allegro.py
     DEPENDS python_protos
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/python/generate_python_ctypes.py
+    COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/python/generate_python_ctypes.py
         -p python_protos
         -o allegro.py
         -t \"${release}\"
diff --git a/python/checkdocs.py b/python/checkdocs.py
index cc5b67c..8dd8aec 100755
--- a/python/checkdocs.py
+++ b/python/checkdocs.py
@@ -175,7 +175,7 @@ def parse_header(lines, filename):
                     if not fname in functions:
                         functions[fname] = line
                     n += 1
-            except AttributeError, e:
+            except AttributeError as e:
                 print("Cannot parse in " + filename)
                 print("Line is: " + line)
                 print(e)
@@ -207,9 +207,10 @@ def parse_all_headers():
     for header in headers:
         p = subprocess.Popen(options.compiler + " -E -dD - " + includes,
             stdout=subprocess.PIPE, stdin=subprocess.PIPE, shell=True)
-        p.stdin.write("#include <allegro5/allegro.h>\n" + open(header).read())
+        filename = "#include <allegro5/allegro.h>\n" + open(header).read()
+        p.stdin.write(filename.encode('utf-8'))
         p.stdin.close()
-        text = p.stdout.read()
+        text = p.stdout.read().decode("utf-8")
         parse_header(text.splitlines(), header)
         #print("%d definitions in %s" % (n, header))
 
diff --git a/python/generate_python_ctypes.py b/python/generate_python_ctypes.py
index 96ad28c..3888af8 100755
--- a/python/generate_python_ctypes.py
+++ b/python/generate_python_ctypes.py
@@ -168,7 +168,7 @@ class Allegro:
                 f.restype = self.get_type(ret)
             try:
                 f.argtypes = plist
-            except TypeError, e:
+            except TypeError as e:
                 print(e)
                 print(name)
                 print(plist)
diff --git a/src/android/android_clipboard.c b/src/android/android_clipboard.c
index 9408b89..d5255f0 100644
--- a/src/android/android_clipboard.c
+++ b/src/android/android_clipboard.c
@@ -45,8 +45,9 @@ static char *android_get_clipboard_text(ALLEGRO_DISPLAY *display)
    char * text =  al_malloc(len+1);
    (void) display;
 
-   text = _al_sane_strncpy(text, str, len+1);
+   text = _al_sane_strncpy(text, str, len);
    _jni_callv(env, ReleaseStringUTFChars, jtext, str);
+   _jni_callv(env, DeleteLocalRef, jtext);
 
    return text;
 }
diff --git a/src/android/android_display.c b/src/android/android_display.c
index 542705e..87794b2 100644
--- a/src/android/android_display.c
+++ b/src/android/android_display.c
@@ -664,7 +664,7 @@ static void android_flip_display(ALLEGRO_DISPLAY *dpy)
    /* Backup bitmaps created without ALLEGRO_NO_PRESERVE_TEXTURE that are
     * dirty, to system memory.
     */
-   _al_opengl_backup_dirty_bitmaps(dpy, true);
+   al_backup_dirty_bitmaps(dpy);
 }
 
 static void android_update_display_region(ALLEGRO_DISPLAY *dpy, int x, int y,
diff --git a/src/android/android_system.c b/src/android/android_system.c
index 9d3f771..2ba8913 100644
--- a/src/android/android_system.c
+++ b/src/android/android_system.c
@@ -120,6 +120,8 @@ static void android_cleanup(bool uninstall_system)
       return;
    }
 
+   already_cleaned_up = true;
+
    if (uninstall_system) {
       /* I don't think android calls our atexit() stuff since we're in a shared lib
          so make sure al_uninstall_system is called */
@@ -129,8 +131,6 @@ static void android_cleanup(bool uninstall_system)
    finish_activity(_al_android_get_jnienv());
 
    (*javavm)->DetachCurrentThread(javavm);
-
-   already_cleaned_up = true;
 }
 
 static void *android_app_trampoline(ALLEGRO_THREAD *thr, void *arg)
@@ -285,7 +285,8 @@ JNI_FUNC(bool, AllegroActivity, nativeOnCreate, (JNIEnv *env, jobject obj))
 
 JNI_FUNC(void, AllegroActivity, nativeOnPause, (JNIEnv *env, jobject obj))
 {
-   (void)env; (void)obj;
+   (void)env;
+   (void)obj;
 
    ALLEGRO_DEBUG("pause activity\n");
 
@@ -293,12 +294,15 @@ JNI_FUNC(void, AllegroActivity, nativeOnPause, (JNIEnv *env, jobject obj))
 
    ALLEGRO_SYSTEM *sys = (void *)al_get_system_driver();
 
-   if(!system_data.system || !sys) {
+   if (!system_data.system || !sys) {
       ALLEGRO_DEBUG("no system driver");
       return;
    }
 
-   // ASSERT(sys != NULL);
+   if (!_al_vector_size(&sys->displays)) {
+      ALLEGRO_DEBUG("no display, not sending SWITCH_OUT event");
+      return;
+   }
 
    ALLEGRO_DISPLAY *display = *(ALLEGRO_DISPLAY**)_al_vector_ref(&sys->displays, 0);
 
@@ -358,6 +362,7 @@ JNI_FUNC(void, AllegroActivity, nativeOnResume, (JNIEnv *env, jobject obj))
    }
 }
 
+/* NOTE: don't put any ALLEGRO_DEBUG in here! */
 JNI_FUNC(void, AllegroActivity, nativeOnDestroy, (JNIEnv *env, jobject obj))
 {
    (void)obj;
@@ -377,20 +382,17 @@ JNI_FUNC(void, AllegroActivity, nativeOnDestroy, (JNIEnv *env, jobject obj))
       "getMainReturned",
       "()Z"
    );
+
    if (!main_returned) {
-      android_cleanup(false);
-      return;
+      exit(0);
    }
 
-   ALLEGRO_DEBUG("destroy activity");
    if(!system_data.user_lib) {
-      ALLEGRO_DEBUG("user lib not loaded.");
       return;
    }
 
    system_data.user_main = NULL;
    if(dlclose(system_data.user_lib) != 0) {
-      ALLEGRO_ERROR("failed to unload user lib: %s", dlerror());
       return;
    }
 
@@ -461,11 +463,10 @@ JNI_FUNC(void, AllegroActivity, nativeSendJoystickConfigurationEvent, (JNIEnv *e
    _al_event_source_unlock(es);
 }
 
+/* NOTE: don't put any ALLEGRO_DEBUG in here! */
 static void finish_activity(JNIEnv *env)
 {
-   ALLEGRO_DEBUG("pre post");
    _jni_callVoidMethod(env, system_data.activity_object, "postFinish");
-   ALLEGRO_DEBUG("post post");
 }
 
 static ALLEGRO_SYSTEM *android_initialize(int flags)
@@ -647,4 +648,18 @@ void _al_register_system_interfaces(void)
    /* TODO: add the non native activity driver */
 }
 
+/* Function: al_android_get_jni_env
+ */
+JNIEnv *al_android_get_jni_env(void)
+{
+   return _al_android_get_jnienv();
+}
+
+/* Function: al_android_get_activity
+ */
+jobject al_android_get_activity(void)
+{
+   return _al_android_activity_object();
+}
+
 /* vim: set sts=3 sw=3 et: */
diff --git a/src/bitmap.c b/src/bitmap.c
index c556a11..1b0b65f 100644
--- a/src/bitmap.c
+++ b/src/bitmap.c
@@ -93,7 +93,7 @@ static void destroy_memory_bitmap(ALLEGRO_BITMAP *bmp)
 
 
 ALLEGRO_BITMAP *_al_create_bitmap_params(ALLEGRO_DISPLAY *current_display,
-   int w, int h, int format, int flags)
+   int w, int h, int format, int flags, int depth, int samples)
 {
    ALLEGRO_SYSTEM *system = al_get_system_driver();
    ALLEGRO_BITMAP *bitmap;
@@ -149,6 +149,8 @@ ALLEGRO_BITMAP *_al_create_bitmap_params(ALLEGRO_DISPLAY *current_display,
    bitmap->yofs = 0;
    bitmap->_flags |= ALLEGRO_VIDEO_BITMAP;
    bitmap->dirty = !(bitmap->_flags & ALLEGRO_NO_PRESERVE_TEXTURE);
+   bitmap->_depth = depth;
+   bitmap->_samples = samples;
 
    /* The display driver should have set the bitmap->memory field if
     * appropriate; video bitmaps may leave it NULL.
@@ -183,9 +185,10 @@ ALLEGRO_BITMAP *al_create_bitmap(int w, int h)
    ALLEGRO_BITMAP *bitmap;
 
    bitmap = _al_create_bitmap_params(al_get_current_display(), w, h,
-      al_get_new_bitmap_format(), al_get_new_bitmap_flags());
+      al_get_new_bitmap_format(), al_get_new_bitmap_flags(),
+      al_get_new_bitmap_depth(), al_get_new_bitmap_samples());
    if (bitmap) {
-      _al_register_destructor(_al_dtor_list, "bitmap", bitmap,
+      bitmap->dtor_item = _al_register_destructor(_al_dtor_list, "bitmap", bitmap,
          (void (*)(void *))al_destroy_bitmap);
    }
 
@@ -214,7 +217,7 @@ void al_destroy_bitmap(ALLEGRO_BITMAP *bitmap)
 
    _al_set_bitmap_shader_field(bitmap, NULL);
 
-   _al_unregister_destructor(_al_dtor_list, bitmap);
+   _al_unregister_destructor(_al_dtor_list, bitmap->dtor_item);
 
    if (!al_is_sub_bitmap(bitmap)) {
       ALLEGRO_DISPLAY* disp = _al_get_bitmap_display(bitmap);
@@ -336,6 +339,29 @@ ALLEGRO_DISPLAY *_al_get_bitmap_display(ALLEGRO_BITMAP *bitmap)
       return bitmap->_display;
 }
 
+
+/* Function: al_get_bitmap_depth
+ */
+int al_get_bitmap_depth(ALLEGRO_BITMAP *bitmap)
+{
+   if (bitmap->parent)
+      return bitmap->parent->_depth;
+   else
+      return bitmap->_depth;
+}
+
+
+/* Function: al_get_bitmap_samples
+ */
+int al_get_bitmap_samples(ALLEGRO_BITMAP *bitmap)
+{
+   if (bitmap->parent)
+      return bitmap->parent->_samples;
+   else
+      return bitmap->_samples;
+}
+
+
 /* Function: al_set_clipping_rectangle
  */
 void al_set_clipping_rectangle(int x, int y, int width, int height)
@@ -442,7 +468,7 @@ ALLEGRO_BITMAP *al_create_sub_bitmap(ALLEGRO_BITMAP *parent,
    bitmap->yofs = y;
    bitmap->memory = NULL;
 
-   _al_register_destructor(_al_dtor_list, "sub_bitmap", bitmap,
+   bitmap->dtor_item = _al_register_destructor(_al_dtor_list, "sub_bitmap", bitmap,
       (void (*)(void *))al_destroy_bitmap);
 
    return bitmap;
@@ -647,4 +673,12 @@ ALLEGRO_BITMAP *al_clone_bitmap(ALLEGRO_BITMAP *bitmap)
    return clone;
 }
 
+/* Function: al_backup_dirty_bitmap
+ */
+void al_backup_dirty_bitmap(ALLEGRO_BITMAP *bitmap)
+{
+   if (bitmap->vt && bitmap->vt->backup_dirty_bitmap)
+      bitmap->vt->backup_dirty_bitmap(bitmap);
+}
+
 /* vim: set ts=8 sts=3 sw=3 et: */
diff --git a/src/bitmap_io.c b/src/bitmap_io.c
index e278232..921bf85 100644
--- a/src/bitmap_io.c
+++ b/src/bitmap_io.c
@@ -205,7 +205,7 @@ ALLEGRO_BITMAP *al_load_bitmap_flags(const char *filename, int flags)
    }
 
    h = find_handler(ext, false);
-   if (h) {
+   if (h && h->loader) {
       ret = h->loader(filename, flags);
       if (!ret)
          ALLEGRO_WARN("Failed loading %s with %s handler.\n", filename,
@@ -233,7 +233,7 @@ bool al_save_bitmap(const char *filename, ALLEGRO_BITMAP *bitmap)
       return false;
 
    h = find_handler(ext, false);
-   if (h)
+   if (h && h->saver)
       return h->saver(filename, bitmap);
    else {
       ALLEGRO_WARN("No handler for image %s found\n", filename);
@@ -269,7 +269,7 @@ ALLEGRO_BITMAP *al_load_bitmap_flags_f(ALLEGRO_FILE *fp,
       h = find_handler(ident, false);
    else
       h = find_handler_for_file(fp);
-   if (h)
+   if (h && h->fs_loader)
       return h->fs_loader(fp, flags);
    else
       return NULL;
@@ -282,7 +282,7 @@ bool al_save_bitmap_f(ALLEGRO_FILE *fp, const char *ident,
    ALLEGRO_BITMAP *bitmap)
 {
    Handler *h = find_handler(ident, false);
-   if (h)
+   if (h && h->fs_saver)
       return h->fs_saver(fp, bitmap);
    else {
       ALLEGRO_WARN("No handler for image %s found\n", ident);
diff --git a/src/bitmap_type.c b/src/bitmap_type.c
index cf1a355..c23c984 100644
--- a/src/bitmap_type.c
+++ b/src/bitmap_type.c
@@ -85,6 +85,8 @@ void _al_unregister_convert_bitmap(ALLEGRO_BITMAP *bitmap)
 static void swap_bitmaps(ALLEGRO_BITMAP *bitmap, ALLEGRO_BITMAP *other)
 {
    ALLEGRO_BITMAP temp;
+   _AL_LIST_ITEM *bitmap_dtor_item = bitmap->dtor_item;
+   _AL_LIST_ITEM *other_dtor_item = other->dtor_item;
    ALLEGRO_DISPLAY *bitmap_display, *other_display;
 
    _al_unregister_convert_bitmap(bitmap);
@@ -99,6 +101,12 @@ static void swap_bitmaps(ALLEGRO_BITMAP *bitmap, ALLEGRO_BITMAP *other)
    *bitmap = *other;
    *other = temp;
 
+   /* Re-associate the destructors back, as they are tied to the object
+    * pointers.
+    */
+   bitmap->dtor_item = bitmap_dtor_item;
+   other->dtor_item = other_dtor_item;
+
    bitmap_display = _al_get_bitmap_display(bitmap);
    other_display = _al_get_bitmap_display(other);
 
diff --git a/src/display.c b/src/display.c
index 4d16a73..4e0e244 100644
--- a/src/display.c
+++ b/src/display.c
@@ -121,10 +121,6 @@ ALLEGRO_DISPLAY *al_create_display(int w, int h)
 #endif
    }
 
-   // TODO: Remove this once all the implementations set the title correctly themselves.
-   // Issue #544.
-   al_set_window_title(display, al_get_new_window_title());
-   
    if (settings->settings[ALLEGRO_AUTO_CONVERT_BITMAPS]) {
       /* We convert video bitmaps to memory bitmaps when the display is
        * destroyed, so seems only fair to re-convertt hem when the
@@ -628,4 +624,21 @@ void al_set_render_state(ALLEGRO_RENDER_STATE state, int value)
    }
 }
 
+/* Function: al_backup_dirty_bitmaps
+ */
+void al_backup_dirty_bitmaps(ALLEGRO_DISPLAY *display)
+{
+   unsigned int i;
+
+   for (i = 0; i < display->bitmaps._size; i++) {
+      ALLEGRO_BITMAP **bptr = (ALLEGRO_BITMAP **)_al_vector_ref(&display->bitmaps, i);
+      ALLEGRO_BITMAP *bmp = *bptr;
+      if (_al_get_bitmap_display(bmp) == display) {
+         if (bmp->vt && bmp->vt->backup_dirty_bitmap) {
+            bmp->vt->backup_dirty_bitmap(bmp);
+	 }
+      }
+   }
+}
+
 /* vim: set sts=3 sw=3 et: */
diff --git a/src/dtor.c b/src/dtor.c
index 53253e4..b966a12 100644
--- a/src/dtor.c
+++ b/src/dtor.c
@@ -29,7 +29,7 @@
 #include "allegro5/internal/aintern_dtor.h"
 #include "allegro5/internal/aintern_thread.h"
 #include "allegro5/internal/aintern_tls.h"
-#include "allegro5/internal/aintern_vector.h"
+#include "allegro5/internal/aintern_list.h"
 
 /* XXX The dependency on tls.c is not nice but the DllMain stuff for Windows
  * does not it easy to make abstract away TLS API differences.
@@ -40,7 +40,7 @@ ALLEGRO_DEBUG_CHANNEL("dtor")
 
 struct _AL_DTOR_LIST {
    _AL_MUTEX mutex;
-   _AL_VECTOR dtors;
+   _AL_LIST* dtors;
 };
 
 
@@ -60,7 +60,7 @@ _AL_DTOR_LIST *_al_init_destructors(void)
 
    _AL_MARK_MUTEX_UNINITED(dtors->mutex);
    _al_mutex_init(&dtors->mutex);
-   _al_vector_init(&dtors->dtors, sizeof(DTOR));
+   dtors->dtors = _al_list_create();
 
    return dtors;
 }
@@ -107,8 +107,9 @@ void _al_run_destructors(_AL_DTOR_LIST *dtors)
    /* call the destructors in reverse order */
    _al_mutex_lock(&dtors->mutex);
    {
-      while (!_al_vector_is_empty(&dtors->dtors)) {
-         DTOR *dtor = _al_vector_ref_back(&dtors->dtors);
+      _AL_LIST_ITEM *iter = _al_list_back(dtors->dtors);
+      while (iter) {
+         DTOR *dtor = _al_list_item_data(iter);
          void *object = dtor->object;
          void (*func)(void *) = dtor->func;
 
@@ -119,6 +120,9 @@ void _al_run_destructors(_AL_DTOR_LIST *dtors)
             (*func)(object);
          }
          _al_mutex_lock(&dtors->mutex);
+         /* Don't do normal iteration as the destructors will possibly run
+          * multiple destructors at once. */
+         iter = _al_list_back(dtors->dtors);
       }
    }
    _al_mutex_unlock(&dtors->mutex);
@@ -136,8 +140,8 @@ void _al_shutdown_destructors(_AL_DTOR_LIST *dtors)
    }
 
    /* free resources used by the destructor subsystem */
-   ASSERT(_al_vector_size(&dtors->dtors) == 0);
-   _al_vector_free(&dtors->dtors);
+   ASSERT(_al_list_is_empty(dtors->dtors));
+   _al_list_destroy(dtors->dtors);
 
    _al_mutex_destroy(&dtors->mutex);
 
@@ -150,42 +154,48 @@ void _al_shutdown_destructors(_AL_DTOR_LIST *dtors)
  *  Register OBJECT to be destroyed by FUNC during Allegro shutdown.
  *  This would be done in the object's constructor function.
  *
+ *  Returns a list item representing the destructor's position in the list
+ *  (possibly null).
+ *
  *  [thread-safe]
  */
-void _al_register_destructor(_AL_DTOR_LIST *dtors, char const *name,
+_AL_LIST_ITEM *_al_register_destructor(_AL_DTOR_LIST *dtors, char const *name,
    void *object, void (*func)(void*))
 {
    int *dtor_owner_count;
+   _AL_LIST_ITEM *ret = NULL;
    ASSERT(object);
    ASSERT(func);
 
    dtor_owner_count = _al_tls_get_dtor_owner_count();
    if (*dtor_owner_count > 0)
-      return;
+      return NULL;
 
    _al_mutex_lock(&dtors->mutex);
    {
 #ifdef DEBUGMODE
       /* make sure the object is not registered twice */
       {
-         unsigned int i;
+         _AL_LIST_ITEM *iter = _al_list_front(dtors->dtors);
 
-         for (i = 0; i < _al_vector_size(&dtors->dtors); i++) {
-            DTOR *dtor = _al_vector_ref(&dtors->dtors, i);
+         while (iter) {
+            DTOR *dtor = _al_list_item_data(iter);
             ASSERT(dtor->object != object);
+            iter = _al_list_next(dtors->dtors, iter);
          }
       }
 #endif /* DEBUGMODE */
 
       /* add the destructor to the list */
       {
-         DTOR *new_dtor = _al_vector_alloc_back(&dtors->dtors);
+         DTOR *new_dtor = al_malloc(sizeof(DTOR));
          if (new_dtor) {
             new_dtor->object = object;
             new_dtor->func = func;
             new_dtor->name = name;
             ALLEGRO_DEBUG("added dtor for %s %p, func %p\n", name,
                object, func);
+            ret = _al_list_push_back(dtors->dtors, new_dtor);
          }
          else {
             ALLEGRO_WARN("failed to add dtor for %s %p\n", name,
@@ -194,6 +204,7 @@ void _al_register_destructor(_AL_DTOR_LIST *dtors, char const *name,
       }
    }
    _al_mutex_unlock(&dtors->mutex);
+   return ret;
 }
 
 
@@ -204,27 +215,18 @@ void _al_register_destructor(_AL_DTOR_LIST *dtors, char const *name,
  *
  *  [thread-safe]
  */
-void _al_unregister_destructor(_AL_DTOR_LIST *dtors, void *object)
+void _al_unregister_destructor(_AL_DTOR_LIST *dtors, _AL_LIST_ITEM *dtor_item)
 {
-   ASSERT(object);
+   if (!dtor_item) {
+      return;
+   }
 
    _al_mutex_lock(&dtors->mutex);
    {
-      unsigned int i;
-
-      for (i = 0; i < _al_vector_size(&dtors->dtors); i++) {
-         DTOR *dtor = _al_vector_ref(&dtors->dtors, i);
-         if (dtor->object == object) {
-            char const *name = dtor->name;
-            _al_vector_delete_at(&dtors->dtors, i);
-            ALLEGRO_DEBUG("removed dtor for %s %p\n", name, object);
-            break;
-         }
-      }
-
-      /* We cannot assert that the destructor was found because it might not
-       * have been registered if the owner count was non-zero at the time.
-       */
+      DTOR *dtor = _al_list_item_data(dtor_item);
+      ALLEGRO_DEBUG("removed dtor for %s %p\n", dtor->name, dtor->object);
+      al_free(dtor);
+      _al_list_erase(dtors->dtors, dtor_item);
    }
    _al_mutex_unlock(&dtors->mutex);
 }
@@ -241,11 +243,12 @@ void _al_foreach_destructor(_AL_DTOR_LIST *dtors,
 {
    _al_mutex_lock(&dtors->mutex);
    {
-      unsigned int i;
+      _AL_LIST_ITEM *iter = _al_list_front(dtors->dtors);
 
-      for (i = 0; i < _al_vector_size(&dtors->dtors); i++) {
-         DTOR *dtor = _al_vector_ref(&dtors->dtors, i);
+      while (iter) {
+         DTOR *dtor = _al_list_item_data(iter);
          callback(dtor->object, dtor->func, userdata);
+         iter = _al_list_next(dtors->dtors, iter);
       }
    }
    _al_mutex_unlock(&dtors->mutex);
diff --git a/src/events.c b/src/events.c
index 849aaf3..bb53dd8 100644
--- a/src/events.c
+++ b/src/events.c
@@ -42,6 +42,7 @@ struct ALLEGRO_EVENT_QUEUE
    bool paused;
    _AL_MUTEX mutex;
    _AL_COND cond;
+   _AL_LIST_ITEM *dtor_item;
 };
 
 
@@ -105,7 +106,7 @@ ALLEGRO_EVENT_QUEUE *al_create_event_queue(void)
       _al_mutex_init(&queue->mutex);
       _al_cond_init(&queue->cond);
 
-      _al_register_destructor(_al_dtor_list, "queue", queue,
+      queue->dtor_item = _al_register_destructor(_al_dtor_list, "queue", queue,
          (void (*)(void *)) al_destroy_event_queue);
    }
 
@@ -120,7 +121,7 @@ void al_destroy_event_queue(ALLEGRO_EVENT_QUEUE *queue)
 {
    ASSERT(queue);
 
-   _al_unregister_destructor(_al_dtor_list, queue);
+   _al_unregister_destructor(_al_dtor_list, queue->dtor_item);
 
    /* Unregister any event sources registered with this queue.  */
    while (_al_vector_is_nonempty(&queue->sources)) {
diff --git a/src/file_stdio.c b/src/file_stdio.c
index 9b765c2..cf67b99 100644
--- a/src/file_stdio.c
+++ b/src/file_stdio.c
@@ -43,6 +43,10 @@ ALLEGRO_DEBUG_CHANNEL("stdio")
 /* forward declaration */
 const struct ALLEGRO_FILE_INTERFACE _al_file_interface_stdio;
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 
 typedef struct
 {
diff --git a/src/fshook_stdio.c b/src/fshook_stdio.c
index ccd7d50..2b083d8 100644
--- a/src/fshook_stdio.c
+++ b/src/fshook_stdio.c
@@ -124,6 +124,10 @@ ALLEGRO_DEBUG_CHANNEL("fshook")
    #define WRAP_READDIR(d)          (readdir(d))
 #endif
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 
 typedef struct ALLEGRO_FS_ENTRY_STDIO ALLEGRO_FS_ENTRY_STDIO;
 
diff --git a/src/iphone/iphone_clipboard.m b/src/iphone/iphone_clipboard.m
index e700bde..8ab60ef 100644
--- a/src/iphone/iphone_clipboard.m
+++ b/src/iphone/iphone_clipboard.m
@@ -26,8 +26,7 @@
 
 #include "iphone.h"
 #include "allegroAppDelegate.h"
-
- at import MobileCoreServices;
+#include <MobileCoreServices/MobileCoreServices.h>
 
 ALLEGRO_DEBUG_CHANNEL("iphone")
 
diff --git a/src/iphone/iphone_display.m b/src/iphone/iphone_display.m
index c9cc606..7eb74c9 100644
--- a/src/iphone/iphone_display.m
+++ b/src/iphone/iphone_display.m
@@ -350,13 +350,6 @@ static bool iphone_wait_for_vsync(ALLEGRO_DISPLAY *display)
 
 static void iphone_flip_display(ALLEGRO_DISPLAY *d)
 {
-   /* Preserve pixels of bitmaps without ALLEGRO_NO_PRESERVE_TEXTURE flag */
-   al_lock_mutex(_al_iphone_display_hotplug_mutex);
-   if (_al_iphone_is_display_connected(d)) {
-      _al_opengl_backup_dirty_bitmaps(d, false);
-   }
-   al_unlock_mutex(_al_iphone_display_hotplug_mutex);
-
     _al_iphone_flip_view(d);
 }
 
diff --git a/src/linux/lmseev.c b/src/linux/lmseev.c
index 945ee60..da83804 100644
--- a/src/linux/lmseev.c
+++ b/src/linux/lmseev.c
@@ -571,16 +571,6 @@ static bool mouse_init (void)
    /* Start watching for data on the fd. */
    _al_unix_start_watching_fd(the_mouse.fd, process_new_data, &the_mouse);
 
-#ifdef ALLEGRO_RASPBERRYPI
-   ALLEGRO_SYSTEM *s = al_get_system_driver();
-   if (s && s->displays._size > 0) {
-      ALLEGRO_DISPLAY *d = _al_vector_ref(&s->displays, 0);
-      if (d) {
-         _al_evdev_set_mouse_range(0, 0, d->w-1, d->h-1);
-      }
-   }
-#endif
-
    return true;
 }
 
diff --git a/src/macosx/osx_app_delegate.m b/src/macosx/osx_app_delegate.m
index 7336578..d99e11a 100644
--- a/src/macosx/osx_app_delegate.m
+++ b/src/macosx/osx_app_delegate.m
@@ -130,8 +130,11 @@ static BOOL in_bundle(void)
         unsigned int len = 1 + [data length];
         arg1 = al_malloc(len);
         memset(arg1, 0, len);
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1100
+        [data getBytes: arg1 length:len];
+#else
         [data getBytes: arg1];
-        
+#endif
         return YES;
     }
     else {
diff --git a/src/macosx/osxgl.m b/src/macosx/osxgl.m
index cbfcf65..f3d4cf6 100644
--- a/src/macosx/osxgl.m
+++ b/src/macosx/osxgl.m
@@ -60,21 +60,17 @@ static BOOL _osx_mouse_installed = NO, _osx_keyboard_installed = NO;
 static NSPoint last_window_pos;
 static unsigned int next_display_group = 1;
 
-/* New window locations are set in threat-local storage by the user with
- * al_set_new_window_position, however, our window creation routine in
- * initialiseDisplay (in ALDisplayHelper) calls al_get_new_window_position
- * from a different threat (the main threat). The "proper" fix for this
- * situation is to call al_get_new_window position() before invoking
- * initialiseDisplay and passing these values as parameters. It's a little
- * tedious to do, however, so we use two global variables instead. This can
- * lead to a race condition if two windows are created simultaneously from
- * different threats. Unlikely, but it's possible.
- * FIXME: do this the proper way!
+/* The parameters are passed to initialiseDisplay manually, as it runs
+ * in a separate thread which renders TLS values incorrect.
  */
-static int new_window_pos_x;
-static int new_window_pos_y;
-
-static int new_display_adapter;
+typedef struct OSX_DISPLAY_PARAMS {
+   ALLEGRO_DISPLAY_OSX_WIN* dpy;
+   int new_window_pos_x;
+   int new_window_pos_y;
+   int new_display_adapter;
+   /* A copy of the new window title. */
+   char* new_window_title;
+} OSX_DISPLAY_PARAMS;
 
 /* Dictionary to map Allegro's DISPLAY_OPTIONS to OS X
  * PixelFormatAttributes.
@@ -271,8 +267,7 @@ void _al_osx_keyboard_was_installed(BOOL install) {
    NSRect *rc = [[array objectAtIndex:0] pointerValue];
    NSWindow *win = [[array objectAtIndex:1] pointerValue];
 
-   // Couldn't resist animating it!
-   [win setFrame:*rc display:YES animate:YES];
+   [win setFrame:*rc display:YES animate:NO];
 }
 @end
 
@@ -377,56 +372,59 @@ void _al_osx_mouse_was_installed(BOOL install) {
 -(void) mouseUp: (NSEvent*) evt
 {
    if (_osx_mouse_installed)
-   _al_osx_mouse_generate_event(evt, dpy_ptr);
+      _al_osx_mouse_generate_event(evt, dpy_ptr);
 }
 -(void) mouseDragged: (NSEvent*) evt
 {
    if (_osx_mouse_installed)
-   _al_osx_mouse_generate_event(evt, dpy_ptr);
+      _al_osx_mouse_generate_event(evt, dpy_ptr);
 }
 -(void) rightMouseDown: (NSEvent*) evt
 {
-   if (_osx_mouse_installed)
+      if (_osx_mouse_installed)
    _al_osx_mouse_generate_event(evt, dpy_ptr);
 }
 -(void) rightMouseUp: (NSEvent*) evt
 {
    if (_osx_mouse_installed)
-   _al_osx_mouse_generate_event(evt, dpy_ptr);
+      _al_osx_mouse_generate_event(evt, dpy_ptr);
 }
 -(void) rightMouseDragged: (NSEvent*) evt
 {
    if (_osx_mouse_installed)
-   _al_osx_mouse_generate_event(evt, dpy_ptr);
+      _al_osx_mouse_generate_event(evt, dpy_ptr);
 }
 -(void) otherMouseDown: (NSEvent*) evt
 {
    if (_osx_mouse_installed)
-   _al_osx_mouse_generate_event(evt, dpy_ptr);
+      _al_osx_mouse_generate_event(evt, dpy_ptr);
 }
 -(void) otherMouseUp: (NSEvent*) evt
 {
    if (_osx_mouse_installed)
-   _al_osx_mouse_generate_event(evt, dpy_ptr);
+      _al_osx_mouse_generate_event(evt, dpy_ptr);
 }
 -(void) otherMouseDragged: (NSEvent*) evt
 {
    if (_osx_mouse_installed)
-   _al_osx_mouse_generate_event(evt, dpy_ptr);
+      _al_osx_mouse_generate_event(evt, dpy_ptr);
 }
 -(void) mouseMoved: (NSEvent*) evt
 {
    if (_osx_mouse_installed)
-   _al_osx_mouse_generate_event(evt, dpy_ptr);
+      _al_osx_mouse_generate_event(evt, dpy_ptr);
 }
 -(void) scrollWheel: (NSEvent*) evt
 {
    if (_osx_mouse_installed)
-   _al_osx_mouse_generate_event(evt, dpy_ptr);
+      _al_osx_mouse_generate_event(evt, dpy_ptr);
 }
 /* Cursor handling */
 - (void) viewDidMoveToWindow {
    ALLEGRO_DISPLAY_OSX_WIN* dpy =  (ALLEGRO_DISPLAY_OSX_WIN*) dpy_ptr;
+   if (dpy->tracking) {
+      [self removeTrackingArea: dpy->tracking];
+   }
    dpy->tracking = create_tracking_area(self);
    [self addTrackingArea: dpy->tracking];
 }
@@ -667,7 +665,7 @@ static NSView* osx_view_from_display(ALLEGRO_DISPLAY* disp)
 /* set_current_display:
 * Set the current windowed display to be current.
 */
-bool set_current_display(ALLEGRO_DISPLAY* d) {
+static bool set_current_display(ALLEGRO_DISPLAY* d) {
    ALLEGRO_DISPLAY_OSX_WIN* dpy = (ALLEGRO_DISPLAY_OSX_WIN*) d;
    if (dpy->ctx != nil) {
       [dpy->ctx makeCurrentContext];
@@ -946,7 +944,8 @@ static void osx_get_opengl_pixelformat_attributes(ALLEGRO_DISPLAY_OSX_WIN *dpy)
 
 @implementation ALDisplayHelper
 +(void) initialiseDisplay: (NSValue*) display_object {
-   ALLEGRO_DISPLAY_OSX_WIN* dpy = [display_object pointerValue];
+   OSX_DISPLAY_PARAMS* dpy_params = [display_object pointerValue];
+   ALLEGRO_DISPLAY_OSX_WIN* dpy = dpy_params->dpy;
    NSRect rc = NSMakeRect(0, 0, dpy->parent.w,  dpy->parent.h);
    ALWindow *alwin = dpy->win = [ALWindow alloc];
    NSWindow* win = alwin;
@@ -958,8 +957,9 @@ static void osx_get_opengl_pixelformat_attributes(ALLEGRO_DISPLAY_OSX_WIN *dpy)
    if (dpy->parent.flags & ALLEGRO_FULLSCREEN)
       mask |= NSResizableWindowMask;
 
-   if ((new_display_adapter >= 0) && (new_display_adapter < al_get_num_video_adapters())) {
-      screen = [[NSScreen screens] objectAtIndex: new_display_adapter];
+   if ((dpy_params->new_display_adapter >= 0) &&
+       (dpy_params->new_display_adapter < al_get_num_video_adapters())) {
+      screen = [[NSScreen screens] objectAtIndex: dpy_params->new_display_adapter];
    } else {
       screen = [NSScreen mainScreen];
    }
@@ -1003,7 +1003,7 @@ static void osx_get_opengl_pixelformat_attributes(ALLEGRO_DISPLAY_OSX_WIN *dpy)
    [win setDelegate: view];
    [win setReleasedWhenClosed: YES];
    [win setAcceptsMouseMovedEvents: _osx_mouse_installed];
-   [win setTitle: @"Allegro"];
+   [win setTitle: [NSString stringWithUTF8String:dpy_params->new_window_title]];
    /* Set minimum size, otherwise the window can be resized so small we can't
     * grab the handle any more to make it bigger
     */
@@ -1020,26 +1020,19 @@ static void osx_get_opengl_pixelformat_attributes(ALLEGRO_DISPLAY_OSX_WIN *dpy)
     * signed 16 bit integer). Should we check for this?
     */
 
-   if ((new_window_pos_x != INT_MAX) && (new_window_pos_y != INT_MAX)) {
+   if ((dpy_params->new_window_pos_x != INT_MAX) && (dpy_params->new_window_pos_y != INT_MAX)) {
       /* The user gave us window coordinates */
       NSRect rc = [win frame];
       NSRect sc = [[win screen] frame];
       NSPoint origin;
 
       /* We need to modify the y coordinate, cf. set_window_position */
-      origin.x = sc.origin.x + new_window_pos_x / screen_scale_factor;
-      origin.y = sc.origin.y + sc.size.height - rc.size.height - new_window_pos_y / screen_scale_factor;
+      origin.x = sc.origin.x + dpy_params->new_window_pos_x / screen_scale_factor;
+      origin.y = sc.origin.y + sc.size.height - rc.size.height - dpy_params->new_window_pos_y / screen_scale_factor;
       [win setFrameOrigin: origin];
    }
    else {
-      /* Center the window */
-      NSRect rc = [win frame];
-      NSRect sc = [[win screen] frame];
-      NSPoint origin;
-
-      origin.x = sc.origin.x + sc.size.width/2 - rc.size.width/2;
-      origin.y = sc.origin.y + sc.size.height/2 - rc.size.height/2;
-      [win setFrameOrigin: origin];
+      [win center];
    }
    [win makeKeyAndOrderFront:self];
    if (mask != NSBorderlessWindowMask) [win makeMainWindow];
@@ -1069,6 +1062,13 @@ static void osx_get_opengl_pixelformat_attributes(ALLEGRO_DISPLAY_OSX_WIN *dpy)
       CGDisplayRelease(dpy->display_id);
       dpy->in_fullscreen = false;
    }
+   else if (dpy->parent.flags & ALLEGRO_FULLSCREEN_WINDOW) {
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
+      if (dpy->win) {
+         [[dpy->win contentView] exitFullScreenModeWithOptions: nil];
+      }
+#endif
+   }
    if (dpy->win) {
       // Destroy the containing window if there is one
       [dpy->win close];
@@ -1302,6 +1302,7 @@ static ALLEGRO_DISPLAY* create_display_fs(int w, int h)
    NSRect rect = NSMakeRect(0, 0, w, h);
 
    dpy->win = [[ALWindow alloc] initWithContentRect:rect styleMask:(IS_LION ? NSBorderlessWindowMask : 0) backing:NSBackingStoreBuffered defer:NO];
+   [dpy->win setTitle: [NSString stringWithUTF8String:al_get_new_window_title()]];
    [dpy->win setAcceptsMouseMovedEvents:YES];
    [dpy->win setViewsNeedDisplay:NO];
 
@@ -1552,17 +1553,21 @@ static ALLEGRO_DISPLAY* create_display_win(int w, int h) {
 
    /* Get the new window position. This is stored in TLS, so we need to do
     * this before calling initialiseDisplay, which runs on a different
-    * threat.
+    * thread.
     */
-   al_get_new_window_position(&new_window_pos_x, &new_window_pos_y);
-
-   new_display_adapter = al_get_new_display_adapter();
+   OSX_DISPLAY_PARAMS dpy_params;
+   al_get_new_window_position(&dpy_params.new_window_pos_x, &dpy_params.new_window_pos_y);
+   dpy_params.new_display_adapter = al_get_new_display_adapter();
+   dpy_params.dpy = dpy;
+   dpy_params.new_window_title = strdup(al_get_new_window_title());
 
    /* OSX specific part - finish the initialisation on the main thread */
    [ALDisplayHelper performSelectorOnMainThread: @selector(initialiseDisplay:)
-      withObject: [NSValue valueWithPointer:dpy]
+      withObject: [NSValue valueWithPointer:&dpy_params]
       waitUntilDone: YES];
 
+   free(dpy_params.new_window_title);
+
    if (dpy->parent.flags & ALLEGRO_FULLSCREEN_WINDOW) {
       NSRect sc = [[dpy->win screen] frame];
       dpy->parent.w = sc.size.width;
@@ -1961,6 +1966,9 @@ static bool resize_display_win(ALLEGRO_DISPLAY *d, int w, int h)
                                   waitUntilDone: YES];
 
    [pool drain];
+
+   clear_to_black(dpy->ctx);
+
    return acknowledge_resize_display_win(d);
 }
 
@@ -2191,7 +2199,8 @@ static bool set_display_flag(ALLEGRO_DISPLAY *display, int flag, bool onoff)
    if (!win)
       return false;
 
-   @autoreleasepool {
+   {
+      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
       switch (flag) {
          case ALLEGRO_FRAMELESS: {
             if (onoff)
@@ -2269,6 +2278,7 @@ static bool set_display_flag(ALLEGRO_DISPLAY *display, int flag, bool onoff)
             return true;
          }
       }
+      [pool release];
    }
 
    return false;
diff --git a/src/macosx/qzmouse.m b/src/macosx/qzmouse.m
index 1b0c9fd..7579940 100644
--- a/src/macosx/qzmouse.m
+++ b/src/macosx/qzmouse.m
@@ -162,7 +162,7 @@ void _al_osx_mouse_generate_event(NSEvent* evt, ALLEGRO_DISPLAY* dpy)
       // Y-coordinates in OS X start from the bottom.
       pos.y = NSHeight(frm) - pos.y;
 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-      scaling_factor = [[[evt window] contentView] backingScaleFactor];
+      scaling_factor = [[evt window] backingScaleFactor];
 #endif
    }
    else
@@ -174,8 +174,10 @@ void _al_osx_mouse_generate_event(NSEvent* evt, ALLEGRO_DISPLAY* dpy)
    }
    dx *= scaling_factor;
    dy *= scaling_factor;
-   if (osx_mouse.warped) {
-      osx_mouse.warped = FALSE;
+   if (osx_mouse.warped && type == ALLEGRO_EVENT_MOUSE_AXES) {
+       dx -= osx_mouse.warped_x;
+       dy -= osx_mouse.warped_y;
+       osx_mouse.warped = FALSE;
    }
    _al_event_source_lock(&osx_mouse.parent.es);
    if ((within || b_change || type == ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY)
@@ -187,7 +189,7 @@ void _al_osx_mouse_generate_event(NSEvent* evt, ALLEGRO_DISPLAY* dpy)
       // Note: we use 'allegro time' rather than the time stamp
       // from the event
       mouse_event->timestamp = al_get_time();
-                mouse_event->display = dpy;
+      mouse_event->display = dpy;
       mouse_event->button = b;
       mouse_event->x = pos.x * scaling_factor;
       mouse_event->y = pos.y * scaling_factor;
@@ -340,7 +342,7 @@ static bool osx_set_mouse_xy(ALLEGRO_DISPLAY *dpy_, int x, int y)
 
       CGPoint point_pos = CGPointMake(x, y);
 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-      point_pos = [[window contentView] convertPointFromBacking: point_pos];
+      point_pos = NSPointToCGPoint([[window contentView] convertPointFromBacking: NSPointFromCGPoint(point_pos)]);
 #endif
       pos.x = content.origin.x + point_pos.x;
       pos.y = rect.size.height - content.origin.y - content.size.height + point_pos.y;
diff --git a/src/memdraw.c b/src/memdraw.c
index 0f036b1..847e245 100644
--- a/src/memdraw.c
+++ b/src/memdraw.c
@@ -22,6 +22,13 @@
 #include "allegro5/internal/aintern_memdraw.h"
 #include "allegro5/internal/aintern_pixels.h"
 
+/* generic versions of the video memory access helpers */
+/* FIXME: why do we need macros for this? */
+#define bmp_write16(addr, c)        (*((uint16_t *)(addr)) = (c))
+#define bmp_write32(addr, c)        (*((uint32_t *)(addr)) = (c))
+
+#define bmp_read16(addr)            (*((uint16_t *)(addr)))
+#define bmp_read32(addr)            (*((uint32_t *)(addr)))
 
 typedef struct {
    float x[4];
@@ -96,7 +103,7 @@ void _al_clear_bitmap_by_locking(ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR *color)
       }
 
       case 3: {
-         int pixel_value = READ3BYTES(line_ptr);
+         int pixel_value = _AL_READ3BYTES(line_ptr);
          for (y = y1; y < y1 + h; y++) {
             unsigned char *data = (unsigned char *)line_ptr;
             if (pixel_value == 0) {    /* fast path */
@@ -104,7 +111,7 @@ void _al_clear_bitmap_by_locking(ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR *color)
             }
             else {
                for (x = 0; x < w; x++) {
-                  WRITE3BYTES(data, pixel_value);
+                  _AL_WRITE3BYTES(data, pixel_value);
                   data += 3;
                }
             }
diff --git a/src/opengl/extensions.c b/src/opengl/extensions.c
index c1d9e08..91857b6 100644
--- a/src/opengl/extensions.c
+++ b/src/opengl/extensions.c
@@ -15,6 +15,7 @@
  *      Based on AllegroGL extensions management.
  */
 
+#include <ctype.h>
 #include <math.h>
 #include <stdio.h>
 #include <string.h>
@@ -91,7 +92,6 @@ ALLEGRO_DEBUG_CHANNEL("opengl")
 
 
 
-#if !defined ALLEGRO_CFG_OPENGLES
 static uint32_t parse_opengl_version(const char *s)
 {
    char *p = (char *) s;
@@ -99,6 +99,15 @@ static uint32_t parse_opengl_version(const char *s)
    int n;
    uint32_t ver;
 
+   /* For OpenGL ES version strings have the form:
+    * "OpenGL ES-<profile> <major>.<minor>"
+    * So for example: "OpenGL ES-CM 2.0". We simply skip any non-digit
+    * characters and then parse it like for normal OpenGL.
+    */
+   while (*p && !isdigit(*p)) {
+      p++;
+   }
+
    /* e.g. "4.0.0 Vendor blah blah" */
    for (n = 0; n < 4; n++) {
       char *end;
@@ -118,16 +127,12 @@ static uint32_t parse_opengl_version(const char *s)
    ALLEGRO_DEBUG("Parsed '%s' as 0x%08x\n", s, ver);
    return ver;
 }
-#endif
 
 
 
 /* Reads version info out of glGetString(GL_VERSION) */
 static uint32_t _al_ogl_version(void)
 {
-#if !defined ALLEGRO_CFG_OPENGLES
-   const char *str;
-
    char const *value = al_get_config_value(al_get_system_config(), "opengl",
       "force_opengl_version");
    if (value) {
@@ -140,8 +145,15 @@ static uint32_t _al_ogl_version(void)
       return v;
    }
 
+   const char *str;
+
    str = (const char *)glGetString(GL_VERSION);
    if (str) {
+      #ifdef ALLEGRO_CFG_OPENGLES
+      char *str2 = strstr(str, "ES ");
+      if (str2)
+         str = str2 + 3;
+      #endif
       return parse_opengl_version(str);
    }
    else {
@@ -150,16 +162,7 @@ static uint32_t _al_ogl_version(void)
        */
       return _ALLEGRO_OPENGL_VERSION_1_0;
    }
-#else
-   /* XXX this is asking for trouble, and should be documented */
-   const char *s = (char *)glGetString(GL_VERSION);
-   if (strstr(s, "2.0"))
-      return _ALLEGRO_OPENGL_VERSION_2_0;
-   else if (strstr(s, "1.1"))
-      return _ALLEGRO_OPENGL_VERSION_1_1;
-   else
-      return _ALLEGRO_OPENGL_VERSION_0;
-#endif
+
 }
 
 
@@ -832,17 +835,6 @@ void _al_ogl_manage_extensions(ALLEGRO_DISPLAY *gl_disp)
 #undef AGL_EXT
 #endif
 
-    /* TODO: use these somewhere */
-#if 0
-   for (i = 0; i < 5; i++) {
-      __allegro_gl_texture_read_format[i] = -1;
-      __allegro_gl_texture_components[i] = GL_RGB;
-   }
-   __allegro_gl_texture_read_format[3] = GL_UNSIGNED_BYTE;
-   __allegro_gl_texture_read_format[4] = GL_UNSIGNED_BYTE;
-   __allegro_gl_texture_components[4] = GL_RGBA;
-#endif /* #if 0 */
-
    /* Get max texture size */
    glGetIntegerv(GL_MAX_TEXTURE_SIZE,
                  (GLint *) & gl_disp->ogl_extras->ogl_info.max_texture_size);
diff --git a/src/opengl/ogl_bitmap.c b/src/opengl/ogl_bitmap.c
index ac5c97e..cf76a1c 100644
--- a/src/opengl/ogl_bitmap.c
+++ b/src/opengl/ogl_bitmap.c
@@ -364,10 +364,8 @@ static void ogl_draw_bitmap_region(ALLEGRO_BITMAP *bitmap,
       }
    }
    if (disp->ogl_extras->opengl_target == target) {
-      if (_al_opengl_set_blender(disp)) {
-         draw_quad(bitmap, tint, sx, sy, sw, sh, flags);
-         return;
-      }
+      draw_quad(bitmap, tint, sx, sy, sw, sh, flags);
+      return;
    }
 
    /* If all else fails, fall back to software implementation. */
@@ -935,6 +933,45 @@ EXIT:
    ogl_bitmap->lock_buffer = NULL;
 }
 
+static void ogl_backup_dirty_bitmap(ALLEGRO_BITMAP *b)
+{
+   ALLEGRO_BITMAP_EXTRA_OPENGL *ogl_bitmap = b->extra;
+   ALLEGRO_LOCKED_REGION *lr;
+   int bitmap_flags = al_get_bitmap_flags(b);
+
+   if (b->parent)
+      return;
+
+   if ((bitmap_flags & ALLEGRO_MEMORY_BITMAP) ||
+      (bitmap_flags & ALLEGRO_NO_PRESERVE_TEXTURE) ||
+      !b->dirty ||
+      ogl_bitmap->is_backbuffer)
+      return;
+
+   ALLEGRO_DEBUG("Backing up dirty bitmap %p\n", b);
+
+   lr = al_lock_bitmap(
+      b,
+      _al_get_bitmap_memory_format(b),
+      ALLEGRO_LOCK_READONLY
+   );
+
+   if (lr) {
+      int line_size = al_get_pixel_size(lr->format) * b->w;
+      int y;
+      for (y = 0; y < b->h; y++) {
+         unsigned char *p = ((unsigned char *)lr->data) + lr->pitch * y;
+         unsigned char *p2;
+         p2 = ((unsigned char *)b->memory) + line_size * (b->h-1-y);
+         memcpy(p2, p, line_size);
+      }
+      al_unlock_bitmap(b);
+      b->dirty = false;
+   }
+   else {
+      ALLEGRO_WARN("Failed to lock dirty bitmap %p\n", b);
+   }
+}
 
 /* Obtain a reference to this driver. */
 static ALLEGRO_BITMAP_INTERFACE *ogl_bitmap_driver(void)
@@ -957,6 +994,7 @@ static ALLEGRO_BITMAP_INTERFACE *ogl_bitmap_driver(void)
 #endif
    glbmp_vt.lock_compressed_region = ogl_lock_compressed_region;
    glbmp_vt.unlock_compressed_region = ogl_unlock_compressed_region;
+   glbmp_vt.backup_dirty_bitmap = ogl_backup_dirty_bitmap;
 
    return &glbmp_vt;
 }
@@ -1060,7 +1098,7 @@ void _al_ogl_upload_bitmap_memory(ALLEGRO_BITMAP *bitmap, int format, void *ptr)
    ASSERT(al_get_current_display() == _al_get_bitmap_display(bitmap));
 
    tmp = _al_create_bitmap_params(_al_get_bitmap_display(bitmap), w, h, format,
-      al_get_bitmap_flags(bitmap));
+      al_get_bitmap_flags(bitmap), 0, 0);
    ASSERT(tmp);
 
    lr = al_lock_bitmap(tmp, format, ALLEGRO_LOCK_WRITEONLY);
@@ -1112,23 +1150,16 @@ void al_remove_opengl_fbo(ALLEGRO_BITMAP *bitmap)
 
    ASSERT(ogl_bitmap->fbo_info->fbo_state > FBO_INFO_UNUSED);
    ASSERT(ogl_bitmap->fbo_info->fbo != 0);
-   ALLEGRO_DEBUG("Deleting FBO: %u\n", ogl_bitmap->fbo_info->fbo);
 
-   if (ANDROID_PROGRAMMABLE_PIPELINE(al_get_current_display())) {
-      glDeleteFramebuffers(1, &ogl_bitmap->fbo_info->fbo);
-   }
-   else {
-      glDeleteFramebuffersEXT(1, &ogl_bitmap->fbo_info->fbo);
-   }
-   ogl_bitmap->fbo_info->fbo = 0;
+   ALLEGRO_FBO_INFO *info = ogl_bitmap->fbo_info;
+   _al_ogl_del_fbo(info);
 
-   if (ogl_bitmap->fbo_info->fbo_state == FBO_INFO_PERSISTENT) {
-      al_free(ogl_bitmap->fbo_info);
+   if (info->fbo_state == FBO_INFO_PERSISTENT) {
+      al_free(info);
    }
    else {
-      _al_ogl_reset_fbo_info(ogl_bitmap->fbo_info);
+      _al_ogl_reset_fbo_info(info);
    }
-   ogl_bitmap->fbo_info = NULL;
 }
 
 /* Function: al_get_opengl_fbo
@@ -1193,49 +1224,4 @@ void al_get_opengl_texture_position(ALLEGRO_BITMAP *bitmap, int *u, int *v)
    *v = bitmap->yofs;
 }
 
-void _al_opengl_backup_dirty_bitmaps(ALLEGRO_DISPLAY *d, bool flip)
-{
-   int i, y;
-
-   for (i = 0; i < (int)d->bitmaps._size; i++) {
-      ALLEGRO_BITMAP **bptr = (ALLEGRO_BITMAP **)_al_vector_ref(&d->bitmaps, i);
-      ALLEGRO_BITMAP *b = *bptr;
-      ALLEGRO_BITMAP_EXTRA_OPENGL *ogl_bitmap = b->extra;
-      ALLEGRO_LOCKED_REGION *lr;
-      int bitmap_flags = al_get_bitmap_flags(b);
-      if (b->parent)
-         continue;
-      if ((bitmap_flags & ALLEGRO_MEMORY_BITMAP) ||
-         (bitmap_flags & ALLEGRO_NO_PRESERVE_TEXTURE) ||
-         !b->dirty ||
-         ogl_bitmap->is_backbuffer)
-         continue;
-      ALLEGRO_DEBUG("Backing up dirty bitmap %p\n", b);
-      lr = al_lock_bitmap(
-         b,
-         _al_get_bitmap_memory_format(b),
-         ALLEGRO_LOCK_READONLY
-      );
-      if (lr) {
-         int line_size = al_get_pixel_size(lr->format) * b->w;
-         for (y = 0; y < b->h; y++) {
-            unsigned char *p = ((unsigned char *)lr->data) + lr->pitch * y;
-            unsigned char *p2;
-            if (flip) {
-               p2 = ((unsigned char *)b->memory) + line_size * (b->h-1-y);
-            }
-            else {
-               p2 = ((unsigned char *)b->memory) + line_size * y;
-            }
-            memcpy(p2, p, line_size);
-         }
-         al_unlock_bitmap(b);
-         b->dirty = false;
-      }
-      else {
-         ALLEGRO_WARN("Failed to lock dirty bitmap %p\n", b);
-      }
-   }
-}
-
 /* vim: set sts=3 sw=3 et: */
diff --git a/src/opengl/ogl_display.c b/src/opengl/ogl_display.c
index 1a1013a..7ae4db2 100644
--- a/src/opengl/ogl_display.c
+++ b/src/opengl/ogl_display.c
@@ -76,6 +76,15 @@ void _al_ogl_set_target_bitmap(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitmap)
 }
 
 
+void _al_ogl_unset_target_bitmap(ALLEGRO_DISPLAY *display,
+   ALLEGRO_BITMAP *target)
+{
+   if (!target)
+      return;
+   _al_ogl_finalize_fbo(display, target);
+}
+
+
 /* Function: al_set_current_opengl_context
  */
 void al_set_current_opengl_context(ALLEGRO_DISPLAY *display)
@@ -176,16 +185,7 @@ bool _al_ogl_resize_backbuffer(ALLEGRO_BITMAP *b, int w, int h)
    extra->true_w = w;
    extra->true_h = h;
 
-   if (!IS_IPHONE) {
-      b->memory = NULL;
-   }
-   else {
-      /* iPhone port still expects the buffer to be present. */
-      /* FIXME: lazily manage memory */
-      size_t bytes = pitch * h;
-      al_free(b->memory);
-      b->memory = al_calloc(1, bytes);
-   }
+   b->memory = NULL;
 
    return true;
 }
diff --git a/src/opengl/ogl_draw.c b/src/opengl/ogl_draw.c
index 77ca186..f9c7ca3 100644
--- a/src/opengl/ogl_draw.c
+++ b/src/opengl/ogl_draw.c
@@ -36,6 +36,22 @@ ALLEGRO_DEBUG_CHANNEL("opengl")
 #endif
 #endif
 
+static void try_const_color(ALLEGRO_DISPLAY *ogl_disp, ALLEGRO_COLOR *c)
+{
+   #ifdef ALLEGRO_CFG_OPENGLES
+      #ifndef ALLEGRO_CFG_OPENGLES2
+         return;
+      #endif
+      // Only OpenGL ES 2.0 has glBlendColor
+      if (ogl_disp->ogl_extras->ogl_info.version < _ALLEGRO_OPENGL_VERSION_2_0) {
+         return;
+      }
+   #else
+   (void)ogl_disp;
+   #endif
+   glBlendColor(c->r, c->g, c->b, c->a);
+}
+
 bool _al_opengl_set_blender(ALLEGRO_DISPLAY *ogl_disp)
 {
    int op, src_color, dst_color, op_alpha, src_alpha, dst_alpha;
@@ -75,11 +91,7 @@ bool _al_opengl_set_blender(ALLEGRO_DISPLAY *ogl_disp)
 #endif
 #endif
       glEnable(GL_BLEND);
-#if defined(ALLEGRO_CFG_OPENGLES2) || !defined(ALLEGRO_CFG_OPENGLES)
-   #ifndef ALLEGRO_ANDROID_HACK_X86_64
-      glBlendColor(const_color.r, const_color.g, const_color.b, const_color.a);
-   #endif
-#endif
+      try_const_color(ogl_disp, &const_color);
       glBlendFuncSeparate(blend_modes[src_color], blend_modes[dst_color],
          blend_modes[src_alpha], blend_modes[dst_alpha]);
       if (ogl_disp->ogl_extras->ogl_info.version >= _ALLEGRO_OPENGL_VERSION_2_0) {
@@ -94,11 +106,7 @@ bool _al_opengl_set_blender(ALLEGRO_DISPLAY *ogl_disp)
    else {
       if (src_color == src_alpha && dst_color == dst_alpha) {
          glEnable(GL_BLEND);
-#if defined(ALLEGRO_CFG_OPENGLES2) || !defined(ALLEGRO_CFG_OPENGLES)
-   #ifndef ALLEGRO_ANDROID_HACK_X86_64
-         glBlendColor(const_color.r, const_color.g, const_color.b, const_color.a);
-   #endif
-#endif
+         try_const_color(ogl_disp, &const_color);
          glBlendFunc(blend_modes[src_color], blend_modes[dst_color]);
       }
       else {
@@ -363,6 +371,11 @@ static void ogl_flush_vertex_cache(ALLEGRO_DISPLAY *disp)
    if (disp->num_cache_vertices == 0)
       return;
 
+   if (!_al_opengl_set_blender(disp)) {
+      disp->num_cache_vertices = 0;
+      return;
+   }
+
    if (disp->flags & ALLEGRO_PROGRAMMABLE_PIPELINE) {
 #ifdef ALLEGRO_CFG_OPENGL_PROGRAMMABLE_PIPELINE
       if (disp->ogl_extras->varlocs.use_tex_loc >= 0) {
diff --git a/src/opengl/ogl_fbo.c b/src/opengl/ogl_fbo.c
index 4b6b0ae..2dea528 100644
--- a/src/opengl/ogl_fbo.c
+++ b/src/opengl/ogl_fbo.c
@@ -93,11 +93,209 @@ void _al_ogl_reset_fbo_info(ALLEGRO_FBO_INFO *info)
 {
    info->fbo_state = FBO_INFO_UNUSED;
    info->fbo = 0;
+   info->buffers.depth_buffer = 0;
+   info->buffers.multisample_buffer = 0;
+   info->buffers.dw = 0;
+   info->buffers.dh = 0;
+   info->buffers.mw = 0;
+   info->buffers.mh = 0;
    info->owner = NULL;
    info->last_use_time = 0.0;
 }
 
 
+#if !defined ALLEGRO_RASPBERRYPI && (!defined ALLEGRO_ANDROID || defined ALLEGRO_CFG_OPENGLES3) && !defined ALLEGRO_CFG_OPENGLES
+static void check_gl_error(void)
+{
+   GLint e = glGetError();
+   if (e) {
+      ALLEGRO_ERROR("OpenGL call failed! (%s)\n",
+       _al_gl_error_string(e));
+   }
+}
+#endif
+
+
+static void detach_depth_buffer(ALLEGRO_FBO_INFO *info)
+{
+#ifndef ALLEGRO_RASPBERRYPI
+   if (info->buffers.depth_buffer == 0)
+      return;
+   ALLEGRO_DEBUG("Deleting depth render buffer: %u\n",
+            info->buffers.depth_buffer);
+   glDeleteRenderbuffersEXT(1, &info->buffers.depth_buffer);
+   info->buffers.depth_buffer = 0;
+    info->buffers.dw = 0;
+   info->buffers.dh = 0;
+   info->buffers.depth = 0;
+#endif
+}
+
+
+static void detach_multisample_buffer(ALLEGRO_FBO_INFO *info)
+{
+#ifndef ALLEGRO_RASPBERRYPI
+   if (info->buffers.multisample_buffer == 0)
+      return;
+   ALLEGRO_DEBUG("Deleting multisample render buffer: %u\n",
+            info->buffers.depth_buffer);
+   glDeleteRenderbuffersEXT(1, &info->buffers.multisample_buffer);
+   info->buffers.multisample_buffer = 0;
+   info->buffers.mw = 0;
+   info->buffers.mh = 0;
+   info->buffers.samples = 0;
+#endif
+}
+
+
+
+static void attach_depth_buffer(ALLEGRO_FBO_INFO *info)
+{
+#if !defined ALLEGRO_RASPBERRYPI
+   GLuint rb;
+   GLenum gldepth = GL_DEPTH_COMPONENT16;
+
+   ALLEGRO_BITMAP *b = info->owner;
+   int bits = al_get_bitmap_depth(b);
+
+   if (info->buffers.depth_buffer != 0) {
+
+      if (info->buffers.depth != bits ||
+            info->buffers.dw != al_get_bitmap_width(b) ||
+            info->buffers.dh != al_get_bitmap_height(b)) {
+         detach_depth_buffer(info);
+      }
+   }
+   
+   if (!bits)
+      return;
+
+   if (info->buffers.depth_buffer == 0) {
+      ALLEGRO_DISPLAY *display = _al_get_bitmap_display(info->owner);
+      int w = al_get_bitmap_width(info->owner);
+      int h = al_get_bitmap_height(info->owner);
+
+      if (bits == 24) gldepth = GL_DEPTH_COMPONENT24;
+   
+      glGenRenderbuffersEXT(1, &rb);
+      glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, rb);
+
+      int samples = al_get_bitmap_samples(info->owner);
+
+      bool extension_supported;
+#ifdef ALLEGRO_CFG_OPENGLES
+      (void)display;
+      extension_supported = al_have_opengl_extension("EXT_multisampled_render_to_texture");
+#else
+      extension_supported = display->ogl_extras->extension_list->ALLEGRO_GL_EXT_framebuffer_multisample;
+#endif
+
+      if (samples == 0 || !extension_supported)
+         glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, gldepth, w, h);
+#if !defined ALLEGRO_ANDROID || defined ALLEGRO_CFG_OPENGLES3
+      else
+         glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT,
+            samples, gldepth, w, h);
+#else
+      else {
+         return;
+      }
+#endif
+
+      info->buffers.depth_buffer = rb;
+      info->buffers.dw = w;
+      info->buffers.dw = h;
+      info->buffers.depth = bits;
+      GLint e = glGetError();
+      if (e) {
+         ALLEGRO_ERROR("glRenderbufferStorage failed! bits=%d w=%d h=%d (%s)\n",
+            bits, w, h, _al_gl_error_string(e));
+      }
+      else {
+         ALLEGRO_DEBUG("Depth render buffer created: %u\n",
+            info->buffers.depth_buffer);
+      }
+   
+      glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
+          GL_RENDERBUFFER_EXT, rb);
+      if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) != GL_FRAMEBUFFER_COMPLETE_EXT) {
+         ALLEGRO_ERROR("attaching depth renderbuffer failed\n");
+      }
+
+      glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
+   }
+#endif
+}
+
+
+static void attach_multisample_buffer(ALLEGRO_FBO_INFO *info)
+{
+#if !defined ALLEGRO_RASPBERRYPI && (!defined ALLEGRO_ANDROID || defined ALLEGRO_CFG_OPENGLES3)
+   ALLEGRO_BITMAP *b = info->owner;
+   int samples = al_get_bitmap_samples(b);
+
+   if (info->buffers.multisample_buffer != 0) {
+
+      if (info->buffers.samples != samples ||
+            info->buffers.mw != al_get_bitmap_width(b) ||
+            info->buffers.mh != al_get_bitmap_height(b)) {
+         detach_multisample_buffer(info);
+      }
+   }
+   
+   if (!samples)
+      return;
+   ALLEGRO_DISPLAY *display = _al_get_bitmap_display(info->owner);
+   if (!display->ogl_extras->extension_list->ALLEGRO_GL_EXT_framebuffer_multisample)
+      return;
+
+#ifdef ALLEGRO_CFG_OPENGLES
+   (void)display;
+#else
+
+   if (info->buffers.multisample_buffer == 0) {
+      GLuint rb;
+      GLint e;
+      int w = al_get_bitmap_width(info->owner);
+      int h = al_get_bitmap_height(info->owner);
+
+      glGenRenderbuffersEXT(1, &rb);
+      glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, rb);
+      check_gl_error();
+
+      glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT,
+         samples, _al_ogl_get_glformat(
+            al_get_bitmap_format(info->owner), 0), w, h);
+      info->buffers.multisample_buffer = rb;
+      info->buffers.mw = w;
+      info->buffers.mh = h;
+      info->buffers.samples = samples;
+      e = glGetError();
+      if (e) {
+         ALLEGRO_ERROR("glRenderbufferStorage failed! samples=%d w=%d h=%d (%s)\n",
+            samples, w, h, _al_gl_error_string(e));
+      }
+      else {
+         ALLEGRO_DEBUG("Multisample render buffer created: %u\n",
+            info->buffers.multisample_buffer);
+      }
+
+      glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,
+         GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, rb);
+
+      if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) != GL_FRAMEBUFFER_COMPLETE_EXT) {
+         ALLEGRO_ERROR("attaching multisample renderbuffer failed\n");
+      }
+
+      glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
+   }
+   #endif
+#else
+   (void)info;
+#endif
+}
+
+
 bool _al_ogl_create_persistent_fbo(ALLEGRO_BITMAP *bitmap)
 {
    ALLEGRO_BITMAP_EXTRA_OPENGL *ogl_bitmap;
@@ -121,6 +319,7 @@ bool _al_ogl_create_persistent_fbo(ALLEGRO_BITMAP *bitmap)
    ASSERT(!ogl_bitmap->fbo_info);
 
    info = al_malloc(sizeof(ALLEGRO_FBO_INFO));
+   info->owner = bitmap;
    if (ANDROID_PROGRAMMABLE_PIPELINE(al_get_current_display())) {
       glGenFramebuffers(1, &info->fbo);
    }
@@ -149,6 +348,8 @@ bool _al_ogl_create_persistent_fbo(ALLEGRO_BITMAP *bitmap)
          info->fbo, ogl_bitmap->texture, _al_gl_error_string(e));
    }
 
+   attach_depth_buffer(info);
+
    /* You'll see this a couple times in this file: some ES 1.1 functions aren't
     * implemented on Android. This is an ugly workaround.
     */
@@ -165,7 +366,6 @@ bool _al_ogl_create_persistent_fbo(ALLEGRO_BITMAP *bitmap)
    _al_ogl_bind_framebuffer(old_fbo);
 
    info->fbo_state = FBO_INFO_PERSISTENT;
-   info->owner = bitmap;
    info->last_use_time = al_get_time();
    ogl_bitmap->fbo_info = info;
    ALLEGRO_DEBUG("Persistent FBO: %u\n", info->fbo);
@@ -216,6 +416,25 @@ static ALLEGRO_FBO_INFO *ogl_find_unused_fbo(ALLEGRO_DISPLAY *display)
 }
 
 
+void _al_ogl_del_fbo(ALLEGRO_FBO_INFO *info)
+{
+   ALLEGRO_BITMAP_EXTRA_OPENGL *extra = info->owner->extra;
+   extra->fbo_info = NULL;
+   ALLEGRO_DEBUG("Deleting FBO: %u\n", info->fbo);
+   if (ANDROID_PROGRAMMABLE_PIPELINE(al_get_current_display())) {
+      glDeleteFramebuffers(1, &info->fbo);
+   }
+   else {
+      glDeleteFramebuffersEXT(1, &info->fbo);
+   }
+
+   detach_depth_buffer(info);
+   detach_multisample_buffer(info);
+
+   info->fbo = 0;
+}
+
+
 static ALLEGRO_FBO_INFO *ogl_new_fbo(ALLEGRO_DISPLAY *display)
 {
    ALLEGRO_FBO_INFO *info;
@@ -225,15 +444,7 @@ static ALLEGRO_FBO_INFO *ogl_new_fbo(ALLEGRO_DISPLAY *display)
    ASSERT(info->fbo_state != FBO_INFO_PERSISTENT);
 
    if (info->fbo_state == FBO_INFO_TRANSIENT) {
-      ALLEGRO_BITMAP_EXTRA_OPENGL *extra = info->owner->extra;
-      extra->fbo_info = NULL;
-      ALLEGRO_DEBUG("Deleting FBO: %u\n", info->fbo);
-      if (ANDROID_PROGRAMMABLE_PIPELINE(al_get_current_display())) {
-         glDeleteFramebuffers(1, &info->fbo);
-      }
-      else {
-         glDeleteFramebuffersEXT(1, &info->fbo);
-      }
+      _al_ogl_del_fbo(info);
       _al_ogl_reset_fbo_info(info);
    }
    else {
@@ -273,6 +484,8 @@ void _al_ogl_setup_fbo(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitmap)
    if (false && display->ogl_extras->opengl_target == bitmap)
       return;
 
+   _al_ogl_unset_target_bitmap(display, display->ogl_extras->opengl_target);
+
    if (ogl_bitmap->is_backbuffer)
       setup_fbo_backbuffer(display, bitmap);
    else
@@ -280,6 +493,49 @@ void _al_ogl_setup_fbo(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitmap)
 }
 
 
+/* With the framebuffer_multisample extension, the absolutely one and
+ * only way to ever access the multisample buffer is with the
+ * framebuffer_blit extension. [1]
+ *
+ * This is what we do in this function - if there is a multisample
+ * buffer, downsample it back into the texture.
+ *
+ * [1] https://www.opengl.org/registry/specs/EXT/framebuffer_multisample.txt 
+ */
+void _al_ogl_finalize_fbo(ALLEGRO_DISPLAY *display,
+   ALLEGRO_BITMAP *bitmap)
+{
+   ALLEGRO_BITMAP_EXTRA_OPENGL *extra = bitmap->extra;
+   if (!extra)
+      return;
+   ALLEGRO_FBO_INFO *info = extra->fbo_info;
+   (void)display;
+   if (!info)
+      return;
+   if (!info->buffers.multisample_buffer)
+      return;
+   #ifndef ALLEGRO_CFG_OPENGLES
+   int w = al_get_bitmap_width(bitmap);
+   int h = al_get_bitmap_height(bitmap);
+
+   GLuint blit_fbo;
+   glGenFramebuffersEXT(1, &blit_fbo);
+   glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, blit_fbo);
+   glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
+      GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, extra->texture, 0);
+
+   glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, info->fbo);
+   glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, blit_fbo);
+   glBlitFramebufferEXT(0, 0, w, h, 0, 0, w, h, GL_COLOR_BUFFER_BIT, GL_NEAREST);
+   check_gl_error();
+
+   glDeleteFramebuffersEXT(1, &blit_fbo);
+   #else
+   (void)bitmap;
+   #endif
+}
+
+
 static void setup_fbo_backbuffer(ALLEGRO_DISPLAY *display,
    ALLEGRO_BITMAP *bitmap)
 {
@@ -347,19 +603,43 @@ static void use_fbo_for_bitmap(ALLEGRO_DISPLAY *display,
    /* Bind to the FBO. */
    _al_ogl_bind_framebuffer(info->fbo);
 
-   /* Attach the texture. */
-   if (ANDROID_PROGRAMMABLE_PIPELINE(al_get_current_display())) {
-      glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
-         GL_TEXTURE_2D, ogl_bitmap->texture, 0);
-   }
-   else {
-      glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
-         GL_TEXTURE_2D, ogl_bitmap->texture, 0);
-   }
-   e = glGetError();
-   if (e) {
-      ALLEGRO_DEBUG("glFrameBufferTexture2DEXT failed! fbo=%d texture=%d (%s)\n",
-         info->fbo, ogl_bitmap->texture, _al_gl_error_string(e));
+   attach_multisample_buffer(info);
+   attach_depth_buffer(info);
+
+   /* If we have a multisample renderbuffer, we can only syncronize
+    * it back to the texture once we stop drawing into it - i.e.
+    * when the target bitmap is changed to something else.
+    */
+   if (!info->buffers.multisample_buffer) {
+
+      /* Attach the texture. */
+#ifdef ALLEGRO_CFG_OPENGLES
+      if (ANDROID_PROGRAMMABLE_PIPELINE(al_get_current_display())) {
+         if (al_get_bitmap_samples(bitmap) == 0 || !al_have_opengl_extension("EXT_multisampled_render_to_texture")) {
+            glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+               GL_TEXTURE_2D, ogl_bitmap->texture, 0);
+         }
+#if !defined ALLEGRO_IPHONE && (!defined ALLEGRO_ANDROID || defined ALLEGRO_CFG_OPENGLES3)
+         else {
+            glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER,
+               GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, ogl_bitmap->texture, 
+               0, al_get_bitmap_samples(bitmap));
+      
+         }
+#endif
+      }
+      else
+#endif
+      {
+         glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
+            GL_TEXTURE_2D, ogl_bitmap->texture, 0);
+      }
+      
+      e = glGetError();
+      if (e) {
+         ALLEGRO_DEBUG("glFrameBufferTexture2DEXT failed! fbo=%d texture=%d (%s)\n",
+            info->fbo, ogl_bitmap->texture, _al_gl_error_string(e));
+      }
    }
 
    /* See comment about unimplemented functions on Android above */
diff --git a/src/opengl/ogl_helpers.h b/src/opengl/ogl_helpers.h
index b02975c..c01c13d 100644
--- a/src/opengl/ogl_helpers.h
+++ b/src/opengl/ogl_helpers.h
@@ -56,10 +56,20 @@
    #define glGenerateMipmapEXT         glGenerateMipmap
    #define glOrtho                     glOrthof
 #elif defined ALLEGRO_CFG_OPENGLES
+   /* Note: This works because all the constants are the same, e.g.
+    * GL_FRAMEBUFFER_OES == GL_FRAMEBUFFER_EXT == 0x8D40
+    * And so we can use the OpenGL framebuffer extension in the same was
+    * as the OpenGL ES framebuffer extension.
+    */
+#ifndef GL_EXT_draw_buffers
    #define GL_COLOR_ATTACHMENT0_EXT    GL_COLOR_ATTACHMENT0_OES
+#endif
    #define GL_FRAMEBUFFER_BINDING_EXT  GL_FRAMEBUFFER_BINDING_OES
    #define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE_OES
    #define GL_FRAMEBUFFER_EXT          GL_FRAMEBUFFER_OES
+   #define GL_RENDERBUFFER_EXT         GL_RENDERBUFFER_OES
+   #define GL_DEPTH_ATTACHMENT_EXT     GL_DEPTH_ATTACHMENT_OES
+
    #define glBindFramebufferEXT        glBindFramebufferOES
    #define glCheckFramebufferStatusEXT glCheckFramebufferStatusOES
    #define glDeleteFramebuffersEXT     glDeleteFramebuffersOES
@@ -67,6 +77,12 @@
    #define glGenFramebuffersEXT        glGenFramebuffersOES
    #define glGenerateMipmapEXT         glGenerateMipmapOES
    #define glOrtho                     glOrthof
+   #define glGenRenderbuffersEXT       glGenRenderbuffersOES
+   #define glBindRenderbufferEXT       glBindRenderbufferOES
+   #define glRenderbufferStorageEXT    glRenderbufferStorageOES
+   #define glFramebufferRenderbufferEXT glFramebufferRenderbufferOES
+   #define glOrtho                     glOrthof
+   #define glDeleteRenderbuffersEXT     glDeleteRenderbuffersOES
 #endif
 
 #endif
diff --git a/src/opengl/ogl_lock_es.c b/src/opengl/ogl_lock_es.c
index b58afa3..b08da22 100644
--- a/src/opengl/ogl_lock_es.c
+++ b/src/opengl/ogl_lock_es.c
@@ -171,7 +171,8 @@ static ALLEGRO_LOCKED_REGION *ogl_lock_region_bb_proxy(ALLEGRO_BITMAP *bitmap,
 
    ALLEGRO_DEBUG("Creating backbuffer proxy bitmap\n");
    proxy = _al_create_bitmap_params(al_get_current_display(),
-      w, h, real_format, ALLEGRO_VIDEO_BITMAP|ALLEGRO_NO_PRESERVE_TEXTURE);
+      w, h, real_format, ALLEGRO_VIDEO_BITMAP|ALLEGRO_NO_PRESERVE_TEXTURE,
+      0, 0);
    if (!proxy) {
       return NULL;
    }
diff --git a/src/opengl/ogl_shader.c b/src/opengl/ogl_shader.c
index 2bbea3a..94da7d8 100644
--- a/src/opengl/ogl_shader.c
+++ b/src/opengl/ogl_shader.c
@@ -284,7 +284,7 @@ static bool glsl_set_shader_sampler(ALLEGRO_SHADER *shader,
 }
 
 static bool glsl_set_shader_matrix(ALLEGRO_SHADER *shader,
-   const char *name, ALLEGRO_TRANSFORM *matrix)
+   const char *name, const ALLEGRO_TRANSFORM *matrix)
 {
    ALLEGRO_SHADER_GLSL_S *gl_shader = (ALLEGRO_SHADER_GLSL_S *)shader;
    GLint handle;
@@ -296,7 +296,7 @@ static bool glsl_set_shader_matrix(ALLEGRO_SHADER *shader,
       return false;
    }
 
-   glUniformMatrix4fv(handle, 1, false, (float *)matrix->m);
+   glUniformMatrix4fv(handle, 1, false, (const float *)matrix->m);
 
    return check_gl_error(name);
 }
@@ -338,7 +338,7 @@ static bool glsl_set_shader_float(ALLEGRO_SHADER *shader,
 }
 
 static bool glsl_set_shader_int_vector(ALLEGRO_SHADER *shader,
-   const char *name, int num_components, int *i, int num_elems)
+   const char *name, int num_components, const int *i, int num_elems)
 {
    ALLEGRO_SHADER_GLSL_S *gl_shader = (ALLEGRO_SHADER_GLSL_S *)shader;
    GLint handle;
@@ -372,7 +372,7 @@ static bool glsl_set_shader_int_vector(ALLEGRO_SHADER *shader,
 }
 
 static bool glsl_set_shader_float_vector(ALLEGRO_SHADER *shader,
-   const char *name, int num_components, float *f, int num_elems)
+   const char *name, int num_components, const float *f, int num_elems)
 {
    ALLEGRO_SHADER_GLSL_S *gl_shader = (ALLEGRO_SHADER_GLSL_S *)shader;
    GLint handle;
diff --git a/src/raspberrypi/picursor.h b/src/raspberrypi/picursor.h
index ff54700..fa07531 100644
--- a/src/raspberrypi/picursor.h
+++ b/src/raspberrypi/picursor.h
@@ -1,82 +1,30 @@
 static uint32_t default_cursor[] = {
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0xff000000,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0xff000000,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0xff000000,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0xff000000,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0x00000000,0xff000000,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0x00000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
-	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,
-	0xff000000,0x00000000,0x00000000,0x00000000,0xff000000,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0xff000000,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,
-	0xffffffff,0xffffffff,0xff000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,
-	0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,
-	0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0xff000000,0xffffffff,0xff000000,0xff000000,0x00000000,
-	0x00000000,0x00000000,0xff000000,0xff000000,0xffffffff,0xffffffff,
-	0xffffffff,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,
-	0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,
-	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xff000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
-	0x00000000,0xff000000,0xff000000,0xff000000,0xff000000,0x00000000,
-	0x00000000,0x00000000
+	0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,
+	0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000,
+	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xff000000,0x00000000,0x00000000,0x00000000,
+	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,0xff000000,0xffffffff,0xffffffff,0xff000000,0x00000000,0x00000000,0x00000000,
+	0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,0xff000000,0xff000000,0xff000000,0x00000000,0x00000000,0x00000000
 };
diff --git a/src/raspberrypi/pidisplay.c b/src/raspberrypi/pidisplay.c
index 91982fb..806f44f 100644
--- a/src/raspberrypi/pidisplay.c
+++ b/src/raspberrypi/pidisplay.c
@@ -2,7 +2,6 @@
 
 #include "allegro5/allegro.h"
 #include "allegro5/allegro_opengl.h"
-#include "allegro5/internal/aintern_iphone.h"
 #include "allegro5/internal/aintern_opengl.h"
 #include "allegro5/internal/aintern_vector.h"
 #include "allegro5/internal/aintern_raspberrypi.h"
@@ -31,6 +30,7 @@ static DISPMANX_ELEMENT_HANDLE_T cursor_element;
 static VC_RECT_T dst_rect;
 static VC_RECT_T src_rect;
 static bool cursor_added = false;
+static float mouse_scale_ratio_x = 1.0f, mouse_scale_ratio_y = 1.0f;
 
 struct ALLEGRO_DISPLAY_RASPBERRYPI_EXTRA {
 };
@@ -68,58 +68,89 @@ static void delete_cursor_data(ALLEGRO_DISPLAY_RASPBERRYPI *d)
 
 static void show_cursor(ALLEGRO_DISPLAY_RASPBERRYPI *d)
 {
-   if (d->cursor_data == NULL || cursor_added) {
+   if (d->cursor_data == NULL) {
       return;
    }
 
    int width = d->cursor_width;
    int height = d->cursor_height;
 
-   uint32_t unused;
-   cursor_resource = vc_dispmanx_resource_create(VC_IMAGE_ARGB8888, width, height, &unused);
-
-   VC_RECT_T r;
-   r.x = 0;
-   r.y = 0;
-   r.width = width;
-   r.height = height;
-   
-   int dpitch = pot(sizeof(uint32_t) * width);
-
-   dispman_update = vc_dispmanx_update_start(0);
-   vc_dispmanx_resource_write_data(cursor_resource, VC_IMAGE_ARGB8888, dpitch, d->cursor_data, &r);
-   vc_dispmanx_update_submit_sync(dispman_update);
-
-   ALLEGRO_MOUSE_STATE state;
-   al_get_mouse_state(&state);
-
-   dst_rect.x = state.x+d->cursor_offset_x;
-   dst_rect.y = state.y+d->cursor_offset_y;
-   dst_rect.width = width;
-   dst_rect.height = height;
-   src_rect.x = 0;
-   src_rect.y = 0;
-   src_rect.width = width << 16;
-   src_rect.height = height << 16;
-
-   dispman_update = vc_dispmanx_update_start(0);
-
-   cursor_element = vc_dispmanx_element_add(
-      dispman_update,
-      dispman_display,
-      0/*layer*/,
-      &dst_rect,
-      cursor_resource,
-      &src_rect,
-      DISPMANX_PROTECTION_NONE,
-      0 /*alpha*/,
-      0/*clamp*/,
-      0/*transform*/
-   );
+   if (cursor_added == false) {
+      uint32_t unused;
+      cursor_resource = vc_dispmanx_resource_create(VC_IMAGE_ARGB8888, width, height, &unused);
+
+      VC_RECT_T r;
+      r.x = 0;
+      r.y = 0;
+      r.width = width;
+      r.height = height;
+
+      int dpitch = pot(sizeof(uint32_t) * width);
+
+      dispman_update = vc_dispmanx_update_start(0);
+      vc_dispmanx_resource_write_data(cursor_resource, VC_IMAGE_ARGB8888, dpitch, d->cursor_data, &r);
+      vc_dispmanx_update_submit_sync(dispman_update);
+
+      ALLEGRO_MOUSE_STATE state;
+      al_get_mouse_state(&state);
+
+      dst_rect.x = state.x+d->cursor_offset_x;
+      dst_rect.y = state.y+d->cursor_offset_y;
+      dst_rect.width = width;
+      dst_rect.height = height;
+      src_rect.x = 0;
+      src_rect.y = 0;
+      src_rect.width = width << 16;
+      src_rect.height = height << 16;
+
+      dispman_update = vc_dispmanx_update_start(0);
+
+      cursor_element = vc_dispmanx_element_add(
+         dispman_update,
+         dispman_display,
+         0/*layer*/,
+         &dst_rect,
+         cursor_resource,
+         &src_rect,
+         DISPMANX_PROTECTION_NONE,
+         0 /*alpha*/,
+         0/*clamp*/,
+         0/*transform*/
+      );
 
-   vc_dispmanx_update_submit_sync(dispman_update);
+      vc_dispmanx_update_submit_sync(dispman_update);
 
-   cursor_added = true;
+      cursor_added = true;
+   }
+   else {
+      ALLEGRO_DISPLAY *disp = (ALLEGRO_DISPLAY *)d;
+      VC_RECT_T src, dst;
+      src.x = 0;
+      src.y = 0;
+      src.width = d->cursor_width << 16;
+      src.height = d->cursor_height << 16;
+      ALLEGRO_MOUSE_STATE st;
+      al_get_mouse_state(&st);
+      st.x = (st.x+0.5) * d->screen_width / disp->w;
+      st.y = (st.y+0.5) * d->screen_height / disp->h;
+      dst.x = st.x+d->cursor_offset_x;
+      dst.y = st.y+d->cursor_offset_y;
+      dst.width = d->cursor_width;
+      dst.height = d->cursor_height;
+         dispman_update = vc_dispmanx_update_start(0);
+      vc_dispmanx_element_change_attributes(
+         dispman_update,
+         cursor_element,
+         0,
+         0,
+         0,
+         &dst,
+         &src,
+         0,
+         0
+      );
+      vc_dispmanx_update_submit_sync(dispman_update);
+   }
 }
 
 static void hide_cursor(ALLEGRO_DISPLAY_RASPBERRYPI *d)
@@ -132,7 +163,7 @@ static void hide_cursor(ALLEGRO_DISPLAY_RASPBERRYPI *d)
 
    dispman_update = vc_dispmanx_update_start(0);
    vc_dispmanx_element_remove(dispman_update, cursor_element);
-   vc_dispmanx_update_submit_sync(dispman_update); 
+   vc_dispmanx_update_submit_sync(dispman_update);
    vc_dispmanx_resource_delete(cursor_resource);
    cursor_added = false;
 }
@@ -224,6 +255,12 @@ void _al_raspberrypi_get_screen_info(int *dx, int *dy,
    }
 }
 
+void _al_raspberrypi_get_mouse_scale_ratios(float *x, float *y)
+{
+	*x = mouse_scale_ratio_x;
+	*y = mouse_scale_ratio_y;
+}
+
 static bool pi_create_display(ALLEGRO_DISPLAY *display)
 {
    ALLEGRO_DISPLAY_RASPBERRYPI *d = (void *)display;
@@ -238,7 +275,7 @@ static bool pi_create_display(ALLEGRO_DISPLAY *display)
    if (!eglInitialize(egl_display, &major, &minor)) {
       return false;
    }
-   
+
    static EGLint attrib_list[] =
    {
       EGL_DEPTH_SIZE, 0,
@@ -250,7 +287,7 @@ static bool pi_create_display(ALLEGRO_DISPLAY *display)
       EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
       EGL_NONE
    };
-      
+
    attrib_list[1] = eds->settings[ALLEGRO_DEPTH_SIZE];
    attrib_list[3] = eds->settings[ALLEGRO_STENCIL_SIZE];
 
@@ -299,6 +336,9 @@ static bool pi_create_display(ALLEGRO_DISPLAY *display)
    int dx, dy, screen_width, screen_height;
    _al_raspberrypi_get_screen_info(&dx, &dy, &screen_width, &screen_height);
 
+   mouse_scale_ratio_x = (float)display->w / screen_width;
+   mouse_scale_ratio_y = (float)display->h / screen_height;
+
    d->cursor_offset_x = dx;
    d->cursor_offset_y = dy;
 
@@ -309,7 +349,7 @@ static bool pi_create_display(ALLEGRO_DISPLAY *display)
 
    d->screen_width = screen_width;
    d->screen_height = screen_height;
-      
+
    src_rect.x = 0;
    src_rect.y = 0;
    src_rect.width = display->w << 16;
@@ -317,7 +357,7 @@ static bool pi_create_display(ALLEGRO_DISPLAY *display)
 
    dispman_display = vc_dispmanx_display_open(0 /* LCD */);
    dispman_update = vc_dispmanx_update_start(0);
-         
+
    dispman_element = vc_dispmanx_element_add (
       dispman_update,
       dispman_display,
@@ -330,11 +370,11 @@ static bool pi_create_display(ALLEGRO_DISPLAY *display)
       0/*clamp*/,
       DISPMANX_NO_ROTATE/*transform*/
    );
-      
+
    nativewindow.element = dispman_element;
    nativewindow.width = display->w;
    nativewindow.height = display->h;
-   vc_dispmanx_update_submit_sync(dispman_update); 
+   vc_dispmanx_update_submit_sync(dispman_update);
 
    egl_window = eglCreateWindowSurface(
       egl_display, config, &nativewindow, NULL);
@@ -345,7 +385,11 @@ static bool pi_create_display(ALLEGRO_DISPLAY *display)
    if (!eglMakeCurrent(egl_display, egl_window, egl_window, egl_context)) {
       return false;
    }
- 
+
+   if (!getenv("DISPLAY")) {
+      _al_evdev_set_mouse_range(0, 0, display->w-1, display->h-1);
+   }
+
    return true;
 }
 
@@ -364,7 +408,7 @@ static ALLEGRO_DISPLAY *raspberrypi_create_display(int w, int h)
     ALLEGRO_DISPLAY_RASPBERRYPI **add;
     add = _al_vector_alloc_back(&system->system.displays);
     *add = d;
-    
+
     /* Each display is an event source. */
     _al_event_source_init(&display->es);
 
@@ -421,7 +465,7 @@ static ALLEGRO_DISPLAY *raspberrypi_create_display(int w, int h)
    setup_gl(display);
 
    al_set_blender(ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_INVERSE_ALPHA);
-    
+
    display->flags |= ALLEGRO_OPENGL;
 
    if (al_is_mouse_installed() && !getenv("DISPLAY")) {
@@ -449,7 +493,7 @@ static void raspberrypi_destroy_display(ALLEGRO_DISPLAY *d)
    }
 
    _al_event_source_free(&d->es);
-   
+
    ALLEGRO_SYSTEM_RASPBERRYPI *system = (void *)al_get_system_driver();
    _al_vector_find_and_delete(&system->system.displays, &d);
 
@@ -464,7 +508,7 @@ static void raspberrypi_destroy_display(ALLEGRO_DISPLAY *d)
       XDestroyWindow(system->x11display, pidisplay->window);
       _al_mutex_unlock(&system->lock);
    }
-   
+
    if (system->mouse_grab_display == d) {
       system->mouse_grab_display = NULL;
    }
@@ -578,10 +622,13 @@ static bool raspberrypi_wait_for_vsync(ALLEGRO_DISPLAY *display)
     return false;
 }
 
-void raspberrypi_flip_display(ALLEGRO_DISPLAY *disp)
+static void raspberrypi_flip_display(ALLEGRO_DISPLAY *disp)
 {
-   (void)disp;
    eglSwapBuffers(egl_display, egl_window);
+
+   if (cursor_added) {
+      show_cursor((ALLEGRO_DISPLAY_RASPBERRYPI *)disp);
+   }
 }
 
 static void raspberrypi_update_display_region(ALLEGRO_DISPLAY *d, int x, int y,
@@ -655,9 +702,9 @@ ALLEGRO_DISPLAY_INTERFACE *_al_get_raspberrypi_display_interface(void)
 {
     if (vt)
         return vt;
-    
+
     vt = al_calloc(1, sizeof *vt);
-    
+
     vt->create_display = raspberrypi_create_display;
     vt->destroy_display = raspberrypi_destroy_display;
     vt->set_current_display = raspberrypi_set_current_display;
@@ -667,7 +714,7 @@ ALLEGRO_DISPLAY_INTERFACE *_al_get_raspberrypi_display_interface(void)
     vt->create_bitmap = _al_ogl_create_bitmap;
     vt->get_backbuffer = _al_ogl_get_backbuffer;
     vt->set_target_bitmap = _al_ogl_set_target_bitmap;
-    
+
     vt->get_orientation = raspberrypi_get_orientation;
 
     vt->is_compatible_bitmap = raspberrypi_is_compatible_bitmap;
@@ -689,7 +736,7 @@ ALLEGRO_DISPLAY_INTERFACE *_al_get_raspberrypi_display_interface(void)
     vt->set_system_mouse_cursor = raspberrypi_set_system_mouse_cursor;
     vt->show_mouse_cursor = raspberrypi_show_mouse_cursor;
     vt->hide_mouse_cursor = raspberrypi_hide_mouse_cursor;
-    
+
     return vt;
 }
 
diff --git a/src/raspberrypi/pisystem.c b/src/raspberrypi/pisystem.c
index 2f918c3..e7623f9 100644
--- a/src/raspberrypi/pisystem.c
+++ b/src/raspberrypi/pisystem.c
@@ -69,7 +69,7 @@ static void pi_shutdown_system(void)
       _al_thread_join(&spi->thread);
       XCloseDisplay(spi->x11display);
    }
-   
+
    bcm_host_deinit();
 
    raise(SIGINT);
diff --git a/src/sdl/sdl_display.c b/src/sdl/sdl_display.c
index 6aa9490..d6ef655 100644
--- a/src/sdl/sdl_display.c
+++ b/src/sdl/sdl_display.c
@@ -190,7 +190,7 @@ static void sdl_flip_display(ALLEGRO_DISPLAY *d)
    SDL_RenderPresent(sdl->renderer);
 
    // SDL loses texture contents, for example on resize.
-    _al_opengl_backup_dirty_bitmaps(d, true);
+   al_backup_dirty_bitmaps(d);
 }
 
 static void sdl_update_display_region(ALLEGRO_DISPLAY *d, int x, int y,
diff --git a/src/shader.c b/src/shader.c
index 92fcd4f..be47fbf 100644
--- a/src/shader.c
+++ b/src/shader.c
@@ -69,7 +69,7 @@ ALLEGRO_SHADER *al_create_shader(ALLEGRO_SHADER_PLATFORM platform)
    if (shader) {
       ASSERT(shader->platform);
       ASSERT(shader->vt);
-      _al_register_destructor(_al_dtor_list, "shader", shader,
+      shader->dtor_item = _al_register_destructor(_al_dtor_list, "shader", shader,
          (void (*)(void *))al_destroy_shader);
    }
    else {
@@ -211,7 +211,7 @@ void al_destroy_shader(ALLEGRO_SHADER *shader)
       al_use_shader(NULL);
    }
 
-   _al_unregister_destructor(_al_dtor_list, shader);
+   _al_unregister_destructor(_al_dtor_list, shader->dtor_item);
 
    al_ustr_free(shader->vertex_copy);
    shader->vertex_copy = NULL;
@@ -256,7 +256,7 @@ bool al_set_shader_sampler(const char *name,
 /* Function: al_set_shader_matrix
  */
 bool al_set_shader_matrix(const char *name,
-   ALLEGRO_TRANSFORM *matrix)
+   const ALLEGRO_TRANSFORM *matrix)
 {
    ALLEGRO_BITMAP *bmp;
    ALLEGRO_SHADER *shader;
@@ -317,7 +317,7 @@ bool al_set_shader_float(const char *name, float f)
 /* Function: al_set_shader_int_vector
  */
 bool al_set_shader_int_vector(const char *name,
-   int num_components, int *i, int num_elems)
+   int num_components, const int *i, int num_elems)
 {
    ALLEGRO_BITMAP *bmp;
    ALLEGRO_SHADER *shader;
@@ -338,7 +338,7 @@ bool al_set_shader_int_vector(const char *name,
 /* Function: al_set_shader_float_vector
  */
 bool al_set_shader_float_vector(const char *name,
-   int num_components, float *f, int num_elems)
+   int num_components, const float *f, int num_elems)
 {
    ALLEGRO_BITMAP *bmp;
    ALLEGRO_SHADER *shader;
diff --git a/src/shader_source.inc b/src/shader_source.inc
index a1eaad7..1c59b05 100644
--- a/src/shader_source.inc
+++ b/src/shader_source.inc
@@ -39,7 +39,7 @@ static const char *default_glsl_vertex_source =
 
 static const char *default_glsl_pixel_source =
    "#ifdef GL_ES\n"
-   "precision mediump float;\n"
+   "precision lowp float;\n"
    "#endif\n"
    "uniform sampler2D " ALLEGRO_SHADER_VAR_TEX ";\n"
    "uniform bool " ALLEGRO_SHADER_VAR_USE_TEX ";\n"
diff --git a/src/system.c b/src/system.c
index e94fc82..f47a81c 100644
--- a/src/system.c
+++ b/src/system.c
@@ -163,11 +163,13 @@ static void read_allegro_cfg(void)
 
 
 /*
+ * Can a binary with version a use a library with version b?
+ *
  * Let a = xa.ya.za.*
  * Let b = xb.yb.zb.*
  *
  * When a has the unstable bit, a is compatible with b if xa.ya.za = xb.yb.zb.
- * Otherwise, a is compatible with b if xa.ya = xb.yb.
+ * Otherwise, a is compatible with b if xa.ya = xb.yb and zb >= za.
  *
  * Otherwise a and b are incompatible.
  */
@@ -192,6 +194,9 @@ static bool compatible_versions(int a, int b)
    if (a_sub != b_sub) {
       return false;
    }
+   if (a_wip > b_wip) {
+      return false;
+   }
    return true;
 }
 
@@ -277,7 +282,9 @@ bool al_install_system(int version, int (*atexit_ptr)(void (*)(void)))
       active_sysdrv->vt->heartbeat_init();
 
    if (atexit_ptr && atexit_virgin) {
+#ifndef ALLEGRO_ANDROID
       atexit_ptr(al_uninstall_system);
+#endif
       atexit_virgin = false;
    }
 
diff --git a/src/timernu.c b/src/timernu.c
index d9a5264..8dc66c0 100644
--- a/src/timernu.c
+++ b/src/timernu.c
@@ -45,6 +45,7 @@ struct ALLEGRO_TIMER
    double speed_secs;
    int64_t count;
    double counter;		/* counts down to zero=blastoff */
+   _AL_LIST_ITEM *dtor_item;
 };
 
 
@@ -53,10 +54,11 @@ struct ALLEGRO_TIMER
  * The timer thread that runs in the background to drive the timers.
  */
 
-static _AL_MUTEX timers_mutex = _AL_MUTEX_UNINITED;
+static ALLEGRO_MUTEX *timers_mutex;
 static _AL_VECTOR active_timers = _AL_VECTOR_INITIALIZER(ALLEGRO_TIMER *);
 static _AL_THREAD * volatile timer_thread = NULL;
-
+static ALLEGRO_COND *timer_cond = NULL;
+static bool destroy_thread = false;
 
 
 /* timer_thread_proc: [timer thread]
@@ -99,9 +101,16 @@ static void timer_thread_proc(_AL_THREAD *self, void *unused)
    double interval = 0.032768;
 
    while (!_al_get_thread_should_stop(self)) {
+      al_lock_mutex(timers_mutex);
+      while (_al_vector_size(&active_timers) == 0 && !destroy_thread) {
+         al_wait_cond(timer_cond, timers_mutex);
+         old_time = al_get_time() - interval;
+      }
+      al_unlock_mutex(timers_mutex);
+
       al_rest(interval);
 
-      _al_mutex_lock(&timers_mutex);
+      al_lock_mutex(timers_mutex);
       {
          /* Calculate actual time elapsed.  */
          new_time = al_get_time();
@@ -111,7 +120,7 @@ static void timer_thread_proc(_AL_THREAD *self, void *unused)
          /* Handle a tick.  */
          interval = timer_thread_handle_tick(interval);
       }
-      _al_mutex_unlock(&timers_mutex);
+      al_unlock_mutex(timers_mutex);
    }
 
    (void)unused;
@@ -152,9 +161,24 @@ static double timer_thread_handle_tick(double interval)
 static void shutdown_timers(void)
 {
    ASSERT(_al_vector_size(&active_timers) == 0);
-   ASSERT(timer_thread == NULL);
 
-   _al_mutex_destroy(&timers_mutex);
+   _al_vector_free(&active_timers);
+
+   if (timer_thread != NULL) {
+      destroy_thread = true;
+      al_lock_mutex(timers_mutex);
+      al_signal_cond(timer_cond);
+      al_unlock_mutex(timers_mutex);
+      _al_thread_join(timer_thread);
+   }
+
+   al_free(timer_thread);
+
+   timer_thread = NULL;
+
+   al_destroy_mutex(timers_mutex);
+
+   al_destroy_cond(timer_cond);
 }
 
 
@@ -166,12 +190,10 @@ static void enable_timer(ALLEGRO_TIMER *timer, bool reset_counter)
 {
    ASSERT(timer);
    {
-      size_t new_size;
-
       if (timer->started)
          return;
 
-      _al_mutex_lock(&timers_mutex);
+      al_lock_mutex(timers_mutex);
       {
          ALLEGRO_TIMER **slot;
 
@@ -183,11 +205,12 @@ static void enable_timer(ALLEGRO_TIMER *timer, bool reset_counter)
          slot = _al_vector_alloc_back(&active_timers);
          *slot = timer;
 
-         new_size = _al_vector_size(&active_timers);
+         al_signal_cond(timer_cond);
       }
-      _al_mutex_unlock(&timers_mutex);
+      al_unlock_mutex(timers_mutex);
 
-      if (new_size == 1) {
+      if (timer_thread == NULL) {
+         destroy_thread = false;
          timer_thread = al_malloc(sizeof(_AL_THREAD));
          _al_thread_create(timer_thread, timer_thread_proc, NULL);
       }
@@ -198,7 +221,8 @@ static void enable_timer(ALLEGRO_TIMER *timer, bool reset_counter)
 
 void _al_init_timers(void)
 {
-   _al_mutex_init(&timers_mutex);
+   timers_mutex = al_create_mutex();
+   timer_cond = al_create_cond();
    _al_add_exit_func(shutdown_timers, "shutdown_timers");
 }
 
@@ -232,7 +256,7 @@ ALLEGRO_TIMER *al_create_timer(double speed_secs)
          timer->speed_secs = speed_secs;
          timer->counter = 0;
 
-         _al_register_destructor(_al_dtor_list, "timer", timer,
+         timer->dtor_item = _al_register_destructor(_al_dtor_list, "timer", timer,
             (void (*)(void *)) al_destroy_timer);
       }
 
@@ -249,7 +273,7 @@ void al_destroy_timer(ALLEGRO_TIMER *timer)
    if (timer) {
       al_stop_timer(timer);
 
-      _al_unregister_destructor(_al_dtor_list, timer);
+      _al_unregister_destructor(_al_dtor_list, timer->dtor_item);
 
       _al_event_source_free(&timer->es);
       al_free(timer);
@@ -282,28 +306,15 @@ void al_stop_timer(ALLEGRO_TIMER *timer)
 {
    ASSERT(timer);
    {
-      _AL_THREAD *thread_to_join = NULL;
-
       if (!timer->started)
          return;
 
-      _al_mutex_lock(&timers_mutex);
+      al_lock_mutex(timers_mutex);
       {
          _al_vector_find_and_delete(&active_timers, &timer);
          timer->started = false;
-
-         if (_al_vector_size(&active_timers) == 0) {
-            _al_vector_free(&active_timers);
-            thread_to_join = timer_thread;
-            timer_thread = NULL;
-         }
-      }
-      _al_mutex_unlock(&timers_mutex);
-
-      if (thread_to_join) {
-         _al_thread_join(thread_to_join);
-         al_free(thread_to_join);
       }
+      al_unlock_mutex(timers_mutex);
    }
 }
 
@@ -338,7 +349,7 @@ void al_set_timer_speed(ALLEGRO_TIMER *timer, double new_speed_secs)
    ASSERT(timer);
    ASSERT(new_speed_secs > 0);
 
-   _al_mutex_lock(&timers_mutex);
+   al_lock_mutex(timers_mutex);
    {
       if (timer->started) {
          timer->counter -= timer->speed_secs;
@@ -347,7 +358,7 @@ void al_set_timer_speed(ALLEGRO_TIMER *timer, double new_speed_secs)
 
       timer->speed_secs = new_speed_secs;
    }
-   _al_mutex_unlock(&timers_mutex);
+   al_unlock_mutex(timers_mutex);
 }
 
 
@@ -369,11 +380,11 @@ void al_set_timer_count(ALLEGRO_TIMER *timer, int64_t new_count)
 {
    ASSERT(timer);
 
-   _al_mutex_lock(&timers_mutex);
+   al_lock_mutex(timers_mutex);
    {
       timer->count = new_count;
    }
-   _al_mutex_unlock(&timers_mutex);
+   al_unlock_mutex(timers_mutex);
 }
 
 
@@ -384,15 +395,14 @@ void al_add_timer_count(ALLEGRO_TIMER *timer, int64_t diff)
 {
    ASSERT(timer);
 
-   _al_mutex_lock(&timers_mutex);
+   al_lock_mutex(timers_mutex);
    {
       timer->count += diff;
    }
-   _al_mutex_unlock(&timers_mutex);
+   al_unlock_mutex(timers_mutex);
 }
 
 
-
 /* timer_handle_tick: [timer thread]
  *  Handle a single tick.
  */
diff --git a/src/tls.c b/src/tls.c
index 647f4b5..7dbc8bd 100644
--- a/src/tls.c
+++ b/src/tls.c
@@ -72,6 +72,8 @@ typedef struct thread_local_state {
    int new_display_adapter;
    int new_window_x;
    int new_window_y;
+   int new_bitmap_depth;
+   int new_bitmap_samples;
    ALLEGRO_EXTRA_DISPLAY_SETTINGS new_display_settings;
 
    /* Current display */
@@ -323,7 +325,6 @@ void al_set_new_window_position(int x, int y)
 }
 
 
-
 /* Function: al_get_new_window_position
  */
 void al_get_new_window_position(int *x, int *y)
@@ -897,52 +898,60 @@ void al_set_standard_fs_interface(void)
 }
 
 
+#define SETTER(name, value) \
+{ \
+   thread_local_state *tls; \
+   if ((tls = tls_get()) == NULL) \
+      return; \
+   tls->name = value; \
+}
+
+#define GETTER(name, value) \
+{ \
+   thread_local_state *tls; \
+   if ((tls = tls_get()) == NULL) \
+      return value; \
+   return tls->name; \
+}
 
 /* Function: al_get_errno
  */
 int al_get_errno(void)
-{
-   thread_local_state *tls;
-
-   if ((tls = tls_get()) == NULL)
-      return 0;
-   return tls->allegro_errno;
-}
-
-
+GETTER(allegro_errno, 0)
 
 /* Function: al_set_errno
  */
 void al_set_errno(int errnum)
-{
-   thread_local_state *tls;
+SETTER(allegro_errno, errnum)
 
-   if ((tls = tls_get()) == NULL)
-      return;
-   tls->allegro_errno = errnum;
-}
+/* Function: al_get_new_bitmap_depth
+ */
+int al_get_new_bitmap_depth(void)
+GETTER(new_bitmap_depth, 0)
 
+/* Function: al_set_new_bitmap_depth
+ */
+void al_set_new_bitmap_depth(int depth)
+SETTER(new_bitmap_depth, depth)
 
-#ifdef ALLEGRO_ANDROID
-JNIEnv *_al_android_get_jnienv(void)
-{
-   thread_local_state *tls;
+/* Function: al_get_new_bitmap_samples
+ */
+int al_get_new_bitmap_samples(void)
+GETTER(new_bitmap_samples, 0)
 
-   if ((tls = tls_get()) == NULL)
-      return 0;
-   return tls->jnienv;
-}
+/* Function: al_set_new_bitmap_samples
+ */
+void al_set_new_bitmap_samples(int samples)
+SETTER(new_bitmap_samples, samples)
 
 
 
-void _al_android_set_jnienv(JNIEnv *jnienv)
-{
-   thread_local_state *tls;
+#ifdef ALLEGRO_ANDROID
+JNIEnv *_al_android_get_jnienv(void)
+GETTER(jnienv, 0)
 
-   if ((tls = tls_get()) == NULL)
-      return;
-   tls->jnienv = jnienv;
-}
+void _al_android_set_jnienv(JNIEnv *jnienv)
+SETTER(jnienv, jnienv)
 #endif
 
 
diff --git a/src/unix/upath.c b/src/unix/upath.c
index 32585db..df408ea 100644
--- a/src/unix/upath.c
+++ b/src/unix/upath.c
@@ -41,6 +41,9 @@
 
 ALLEGRO_DEBUG_CHANNEL("upath")
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
 
 #ifndef ALLEGRO_MACOSX
 /* _find_executable_file:
diff --git a/src/win/d3d.h b/src/win/d3d.h
index 99c0cd4..348e14c 100644
--- a/src/win/d3d.h
+++ b/src/win/d3d.h
@@ -50,7 +50,6 @@ bool _al_d3d_render_to_texture_supported(void);
 void _al_d3d_set_bitmap_clip(ALLEGRO_BITMAP *bitmap);
 
 void _al_d3d_release_default_pool_textures(ALLEGRO_DISPLAY *display);
-void _al_d3d_prepare_bitmaps_for_reset(ALLEGRO_DISPLAY_D3D *disp);
 void _al_d3d_refresh_texture_memory(ALLEGRO_DISPLAY *display);
 bool _al_d3d_recreate_bitmap_textures(ALLEGRO_DISPLAY_D3D *disp);
 void _al_d3d_set_bitmap_clip(ALLEGRO_BITMAP *bitmap);
diff --git a/src/win/d3d_bmp.cpp b/src/win/d3d_bmp.cpp
index 2c5d7f5..6e47cf3 100644
--- a/src/win/d3d_bmp.cpp
+++ b/src/win/d3d_bmp.cpp
@@ -445,7 +445,7 @@ static ALLEGRO_BITMAP
    }
 
    bitmap = _al_create_bitmap_params(al_get_current_display(),
-      desc.Width, desc.Height, format, flags);
+      desc.Width, desc.Height, format, flags, 0, 0);
    if (!bitmap) {
       surface->UnlockRect();
       return NULL;
@@ -553,17 +553,13 @@ static bool _al_d3d_sync_bitmap(ALLEGRO_BITMAP *dest)
    return ok;
 }
 
-/*
- * Must be called before the D3D device is reset (e.g., when
- * resizing a window). All non-synced display bitmaps must be
- * synced to memory.
- */
-void _al_d3d_prepare_bitmaps_for_reset(ALLEGRO_DISPLAY_D3D *disp)
+// Copy texture to system memory
+static void d3d_backup_dirty_bitmap(ALLEGRO_BITMAP *bitmap)
 {
-   unsigned int i;
-   ALLEGRO_DISPLAY *display = (ALLEGRO_DISPLAY *)disp;
+   ALLEGRO_DISPLAY *display = bitmap->_display;
+   ALLEGRO_DISPLAY_D3D *d3d_display = (ALLEGRO_DISPLAY_D3D *)display;
 
-   if (disp->device_lost)
+   if (d3d_display->device_lost)
       return;
 
    if (!_al_d3d_render_to_texture_supported())
@@ -571,25 +567,23 @@ void _al_d3d_prepare_bitmaps_for_reset(ALLEGRO_DISPLAY_D3D *disp)
 
    al_lock_mutex(_al_d3d_lost_device_mutex);
 
-   for (i = 0; i < display->bitmaps._size; i++) {
-      ALLEGRO_BITMAP **bptr = (ALLEGRO_BITMAP **)_al_vector_ref(&display->bitmaps, i);
-      ALLEGRO_BITMAP *bmp = *bptr;
-      ALLEGRO_BITMAP_EXTRA_D3D *extra = get_extra(bmp);
-      int bitmap_flags = al_get_bitmap_flags(bmp);
-      if ((void *)_al_get_bitmap_display(bmp) == (void *)disp) {
-         if ((bitmap_flags & ALLEGRO_MEMORY_BITMAP) ||
-            (bitmap_flags & ALLEGRO_NO_PRESERVE_TEXTURE) ||
-               !bmp->dirty ||
-               extra->is_backbuffer ||
-            bmp->parent)
-            continue;
-         if (_al_pixel_format_is_compressed(al_get_bitmap_format(bmp)))
-            d3d_sync_bitmap_memory(bmp);
-         else
-            _al_d3d_sync_bitmap(bmp);
-         bmp->dirty = false;
-      }
+   ALLEGRO_BITMAP_EXTRA_D3D *extra = get_extra(bitmap);
+   int bitmap_flags = al_get_bitmap_flags(bitmap);
+   if (!(
+      (bitmap_flags & ALLEGRO_MEMORY_BITMAP) ||
+      (bitmap_flags & ALLEGRO_NO_PRESERVE_TEXTURE) ||
+      !bitmap->dirty ||
+      extra->is_backbuffer ||
+      bitmap->parent
+      ))
+   {
+      if (_al_pixel_format_is_compressed(al_get_bitmap_format(bitmap)))
+         d3d_sync_bitmap_memory(bitmap);
+      else
+         _al_d3d_sync_bitmap(bitmap);
    }
+
+   bitmap->dirty = false;
      
    al_unlock_mutex(_al_d3d_lost_device_mutex);
 }
@@ -1032,6 +1026,7 @@ ALLEGRO_BITMAP_INTERFACE *_al_bitmap_d3d_driver(void)
    vt->lock_compressed_region = d3d_lock_compressed_region;
    vt->unlock_compressed_region = d3d_unlock_compressed_region;
    vt->update_clipping_rectangle = d3d_update_clipping_rectangle;
+   vt->backup_dirty_bitmap = d3d_backup_dirty_bitmap;
 
    return vt;
 }
diff --git a/src/win/d3d_disp.cpp b/src/win/d3d_disp.cpp
index 87db47c..5228156 100644
--- a/src/win/d3d_disp.cpp
+++ b/src/win/d3d_disp.cpp
@@ -2048,8 +2048,6 @@ static void d3d_draw_pixel(ALLEGRO_DISPLAY *disp, float x, float y, ALLEGRO_COLO
    }
 }
 
-
-
 static void d3d_flip_display(ALLEGRO_DISPLAY *al_display)
 {
    ALLEGRO_DISPLAY_D3D* d3d_display = (ALLEGRO_DISPLAY_D3D*)al_display;
@@ -2074,7 +2072,7 @@ static void d3d_flip_display(ALLEGRO_DISPLAY *al_display)
       return;
    }
    else {
-      _al_d3d_prepare_bitmaps_for_reset(d3d_display);
+      al_backup_dirty_bitmaps(al_display);
    }
 }
 
@@ -2319,7 +2317,7 @@ static bool d3d_resize_display(ALLEGRO_DISPLAY *d, int width, int height)
    int orig_h = d->h;
    bool ret;
 
-   _al_d3d_prepare_bitmaps_for_reset(d3d_display);
+   al_backup_dirty_bitmaps(d);
 
    win_display->ignore_resize = true;
 
@@ -2460,7 +2458,7 @@ static void d3d_set_target_bitmap(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitm
       old_target = get_extra(d3d_display->target_bitmap);
 
    /* Release the previous target bitmap if it was not the backbuffer */
-   if (old_target && old_target->is_backbuffer) {
+   if (old_target && !old_target->is_backbuffer) {
       ALLEGRO_BITMAP *parent;
       if (d3d_display->target_bitmap->parent)
          parent = d3d_display->target_bitmap->parent;
diff --git a/src/win/d3d_shader.cpp b/src/win/d3d_shader.cpp
index 20ca1e4..8c6d067 100644
--- a/src/win/d3d_shader.cpp
+++ b/src/win/d3d_shader.cpp
@@ -85,15 +85,15 @@ static void hlsl_on_reset_device(ALLEGRO_SHADER *shader);
 static bool hlsl_set_shader_sampler(ALLEGRO_SHADER *shader,
                const char *name, ALLEGRO_BITMAP *bitmap, int unit);
 static bool hlsl_set_shader_matrix(ALLEGRO_SHADER *shader,
-               const char *name, ALLEGRO_TRANSFORM *matrix);
+               const char *name, const ALLEGRO_TRANSFORM *matrix);
 static bool hlsl_set_shader_int(ALLEGRO_SHADER *shader,
                const char *name, int i);
 static bool hlsl_set_shader_float(ALLEGRO_SHADER *shader,
                const char *name, float f);
 static bool hlsl_set_shader_int_vector(ALLEGRO_SHADER *shader,
-               const char *name, int num_components, int *i, int num_elems);
+               const char *name, int num_components, const int *i, int num_elems);
 static bool hlsl_set_shader_float_vector(ALLEGRO_SHADER *shader,
-               const char *name, int num_components, float *f, int num_elems);
+               const char *name, int num_components, const float *f, int num_elems);
 static bool hlsl_set_shader_bool(ALLEGRO_SHADER *shader,
                const char *name, bool b);
 
@@ -355,7 +355,7 @@ static bool hlsl_set_shader_sampler(ALLEGRO_SHADER *shader,
 }
 
 static bool hlsl_set_shader_matrix(ALLEGRO_SHADER *shader,
-   const char *name, ALLEGRO_TRANSFORM *matrix)
+   const char *name, const ALLEGRO_TRANSFORM *matrix)
 {
    ALLEGRO_SHADER_HLSL_S *hlsl_shader = (ALLEGRO_SHADER_HLSL_S *)shader;
    HRESULT result;
@@ -392,7 +392,7 @@ static bool hlsl_set_shader_float(ALLEGRO_SHADER *shader,
 }
 
 static bool hlsl_set_shader_int_vector(ALLEGRO_SHADER *shader,
-   const char *name, int num_components, int *i, int num_elems)
+   const char *name, int num_components, const int *i, int num_elems)
 {
    ALLEGRO_SHADER_HLSL_S *hlsl_shader = (ALLEGRO_SHADER_HLSL_S *)shader;
    HRESULT result;
@@ -404,7 +404,7 @@ static bool hlsl_set_shader_int_vector(ALLEGRO_SHADER *shader,
 }
 
 static bool hlsl_set_shader_float_vector(ALLEGRO_SHADER *shader,
-   const char *name, int num_components, float *f, int num_elems)
+   const char *name, int num_components, const float *f, int num_elems)
 {
    ALLEGRO_SHADER_HLSL_S *hlsl_shader = (ALLEGRO_SHADER_HLSL_S *)shader;
    HRESULT result;
diff --git a/src/win/wkeyboard.c b/src/win/wkeyboard.c
index 01a17fe..c044e35 100644
--- a/src/win/wkeyboard.c
+++ b/src/win/wkeyboard.c
@@ -323,6 +323,7 @@ void _al_win_kbd_handle_key_press(int scode, int vcode, bool extended,
    int char_count;
    int event_count;
    int i;
+   bool ks_state;
    BYTE ks[256];
    WCHAR buf[8] = { 0 };
 
@@ -365,7 +366,11 @@ void _al_win_kbd_handle_key_press(int scode, int vcode, bool extended,
 
    /* Send char events, but not for modifier keys or dead keys. */
    if (my_code < ALLEGRO_KEY_MODIFIERS) {
-      char_count = ToUnicode(vcode, scode, GetKeyboardState(ks) ? ks : NULL, buf, 8, 0);
+      ks_state = GetKeyboardState(ks);
+      if(ks_state && ks[VK_CONTROL] && (modifiers & ALLEGRO_KEYMOD_CTRL)) {
+         ks[VK_CONTROL] = 0;
+      }
+      char_count = ToUnicode(vcode, scode, ks_state ? ks : NULL, buf, 8, 0);
       /* Send ASCII code 127 for both Del keys. */
       if (char_count == 0 && vcode == VK_DELETE) {
          char_count = 1;
diff --git a/src/win/wmcursor.c b/src/win/wmcursor.c
index 59c018e..33fc506 100644
--- a/src/win/wmcursor.c
+++ b/src/win/wmcursor.c
@@ -75,7 +75,7 @@ HICON _al_win_create_icon(HWND wnd,
          al_store_state(&state, ALLEGRO_STATE_TARGET_BITMAP |
             ALLEGRO_STATE_BLENDER);
          tmp = _al_create_bitmap_params(al_get_current_display(), w, h,
-            ALLEGRO_MEMORY_BITMAP, al_get_bitmap_format(tmp));
+            al_get_bitmap_format(tmp), ALLEGRO_MEMORY_BITMAP, 0, 0);
          al_set_target_bitmap(tmp);
          al_clear_to_color(al_map_rgba_f(0, 0, 0, 0));
          al_draw_scaled_bitmap(
diff --git a/src/win/wwindow.c b/src/win/wwindow.c
index 3128746..4d0347d 100644
--- a/src/win/wwindow.c
+++ b/src/win/wwindow.c
@@ -76,6 +76,20 @@ static void display_flags_to_window_styles(int flags,
    }
 }
 
+// Clears a window to black
+static void clear_window(HWND window, int w, int h)
+{
+   PAINTSTRUCT ps;
+   HDC hdc;
+
+   hdc = BeginPaint(window, &ps);
+
+   SelectObject(hdc, GetStockObject(DC_BRUSH));
+   SetDCBrushColor(hdc, RGB(0, 0, 0));
+
+   Rectangle(hdc, 0, 0, w, h);
+}
+
 HWND _al_win_create_hidden_window()
 {
    HWND window = CreateWindowEx(0,
@@ -189,6 +203,8 @@ HWND _al_win_create_window(ALLEGRO_DISPLAY *display, int width, int height, int
 
    ShowWindow(my_window, SW_SHOW);
 
+   clear_window(my_window, width, height);
+
    if (!(flags & ALLEGRO_RESIZABLE) && !(flags & ALLEGRO_FULLSCREEN)) {
       /* Make the window non-resizable */
       HMENU menu;
@@ -253,6 +269,8 @@ HWND _al_win_create_faux_fullscreen_window(LPCTSTR devname, ALLEGRO_DISPLAY *dis
 
    ChangeDisplaySettingsEx(devname, &mode, NULL, 0, NULL/*CDS_FULLSCREEN*/);
 
+   clear_window(my_window, width, height);
+
    return my_window;
 }
 
@@ -1202,7 +1220,7 @@ bool _al_win_set_display_flag(ALLEGRO_DISPLAY *display, int flag, bool onoff)
             int pos_y = 0;
             WINDOWINFO wi;
             int bw, bh;
-            
+
             // Unset the topmost flag
             SetWindowPos(win_display->window, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
 
@@ -1218,9 +1236,13 @@ bool _al_win_set_display_flag(ALLEGRO_DISPLAY *display, int flag, bool onoff)
                win_display->window, HWND_TOP, pos_x-bw/2, pos_y-bh/2, 0, 0, SWP_NOSIZE
             );
          }
+
          // Show the window again
          SetWindowPos(win_display->window, 0, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOZORDER | SWP_NOMOVE);
 
+         // Clear the window to black
+         clear_window(win_display->window, display->w, display->h);
+
          ASSERT(!!(display->flags & ALLEGRO_FULLSCREEN_WINDOW) == onoff);
          return true;
       case ALLEGRO_MAXIMIZED:
@@ -1346,7 +1368,7 @@ bool al_win_add_window_callback(ALLEGRO_DISPLAY *display,
 {
    ALLEGRO_DISPLAY_WIN *win_display = (ALLEGRO_DISPLAY_WIN *) display;
    ALLEGRO_DISPLAY_WIN_CALLBACK *ptr;
-   
+
    if (!display || !callback) {
       return false;
    }
@@ -1374,7 +1396,7 @@ bool al_win_remove_window_callback(ALLEGRO_DISPLAY *display,
    LPARAM lparam, LRESULT *result, void *userdata), void *userdata)
 {
    ALLEGRO_DISPLAY_WIN *win_display = (ALLEGRO_DISPLAY_WIN *) display;
-   
+
    if (display && callback) {
       size_t i;
       for (i = 0; i < _al_vector_size(&win_display->msg_callbacks); ++i) {
diff --git a/src/x/xdisplay.c b/src/x/xdisplay.c
index 0a87837..f781a59 100644
--- a/src/x/xdisplay.c
+++ b/src/x/xdisplay.c
@@ -356,6 +356,7 @@ static ALLEGRO_DISPLAY_XGLX *xdpy_create_display_locked(
       }
    }
    else {
+      default_overridable_vt.set_window_title(display, al_get_new_window_title());
       if (!default_overridable_vt.create_display_hook(display, w, h)) {
          goto LateError;
       }
@@ -1109,7 +1110,6 @@ static void xdpy_set_window_title_default(ALLEGRO_DISPLAY *display, const char *
    ALLEGRO_SYSTEM_XGLX *system = (ALLEGRO_SYSTEM_XGLX *)al_get_system_driver();
    ALLEGRO_DISPLAY_XGLX *glx = (ALLEGRO_DISPLAY_XGLX *)display;
 
-   _al_mutex_lock(&system->lock);
    {
       Atom WM_NAME = XInternAtom(system->x11display, "WM_NAME", False);
       Atom _NET_WM_NAME = XInternAtom(system->x11display, "_NET_WM_NAME", False);
@@ -1137,14 +1137,17 @@ static void xdpy_set_window_title_default(ALLEGRO_DISPLAY *display, const char *
          al_destroy_path(exepath);
       }
    }
-   _al_mutex_unlock(&system->lock);
 }
 
 
 static void xdpy_set_window_title(ALLEGRO_DISPLAY *display, const char *title)
 {
+   ALLEGRO_SYSTEM_XGLX *system = (ALLEGRO_SYSTEM_XGLX *)al_get_system_driver();
    ALLEGRO_DISPLAY_XGLX *glx = (ALLEGRO_DISPLAY_XGLX *)display;
+
+   _al_mutex_lock(&system->lock);
    glx->overridable_vt->set_window_title(display, title);
+   _al_mutex_unlock(&system->lock);
 }
 
 
diff --git a/src/x/xmousenu.c b/src/x/xmousenu.c
index e80df0e..c2a258e 100644
--- a/src/x/xmousenu.c
+++ b/src/x/xmousenu.c
@@ -104,28 +104,6 @@ ALLEGRO_MOUSE_DRIVER *_al_xwin_mouse_driver(void)
 }
 
 
-static void scale_xy(int *x, int *y)
-{
-#ifdef ALLEGRO_RASPBERRYPI
-   ALLEGRO_SYSTEM *s = al_get_system_driver();
-   if (s && s->displays._size > 0) {
-      ALLEGRO_DISPLAY **ref = _al_vector_ref(&s->displays, 0);
-      ALLEGRO_DISPLAY *d = *ref;
-      if (d) {
-         ALLEGRO_DISPLAY_RASPBERRYPI *disp = (void *)d;
-         /* Not sure what's a better approach than adding 0.5 to
-          * get an accurate last pixel */
-         *x = ((*x)+0.5) * d->w / disp->screen_width;
-         *y = ((*y)+0.5) * d->h / disp->screen_height;
-      }
-   }
-#else
-   (void)x;
-   (void)y;
-#endif
-}
-
-
 /* xmouse_init:
  *  Initialise the driver.
  */
@@ -252,6 +230,16 @@ static bool xmouse_set_mouse_xy(ALLEGRO_DISPLAY *display, int x, int y)
    if (x < 0 || y < 0 || x >= window_width || y >= window_height)
       return false;
 
+   the_mouse.state.x = x;
+   the_mouse.state.y = y;
+
+#ifdef ALLEGRO_RASPBERRYPI
+   float scale_x, scale_y;
+   _al_raspberrypi_get_mouse_scale_ratios(&scale_x, &scale_y);
+   x /= scale_x;
+   y /= scale_y;
+#endif
+
    _al_mutex_lock(&system->lock);
 
    /* We prepend the mouse motion event generated by XWarpPointer
@@ -453,7 +441,13 @@ void _al_xwin_mouse_motion_notify_handler(int x, int y,
    }
 
    _al_event_source_lock(&the_mouse.parent.es);
-   scale_xy(&x, &y);
+
+#ifdef ALLEGRO_RASPBERRYPI
+   float scale_x, scale_y;
+   _al_raspberrypi_get_mouse_scale_ratios(&scale_x, &scale_y);
+   x *= scale_x;
+   y *= scale_y;
+#endif
 
    int dx = x - the_mouse.state.x;
    int dy = y - the_mouse.state.y;
diff --git a/tests/test_compressed.ini b/tests/test_compressed.ini
index 72d83fe..0095737 100644
--- a/tests/test_compressed.ini
+++ b/tests/test_compressed.ini
@@ -1,4 +1,7 @@
+# All of these are hardware only as compressed bitmaps are a video-bitmap only feature.
+
 [loading]
+hw_only = true
 op0=b = al_load_bitmap(filename)
 op1=al_draw_bitmap(b, 0, 0, 0)
 
@@ -18,6 +21,7 @@ filename = ../examples/data/mysha_dxt5.dds
 sig=ftZE50000um0050000jLL050000222200000000000000000000000000000000000000000000000000
 
 [dest rw]
+hw_only = true
 op0=b = al_load_bitmap(filename)
 op1=al_set_target_bitmap(b)
 # Need to lock, otherwise the triangles of the rectangle will lock separately and result in diagonal artifacts
@@ -43,6 +47,7 @@ filename = ../examples/data/mysha_dxt5.dds
 sig=ggZE50000gg0050000jLL050000222200000000000000000000000000000000000000000000000000
 
 [dest wo]
+hw_only = true
 filename2 = ../examples/data/blue_box.png
 op0=b = al_load_bitmap(filename)
 op1=b2 = al_load_bitmap(filename2)
@@ -67,6 +72,7 @@ filename = ../examples/data/mysha_dxt5.dds
 sig=OOZD50000OO0050000aML050000222200000000000000000000000000000000000000000000000000
 
 [src]
+hw_only = true
 filename2 = ../examples/data/fakeamp.bmp
 op0=b = al_load_bitmap(filename)
 op1=b2 = al_load_bitmap(filename2)
@@ -93,6 +99,7 @@ filename = ../examples/data/mysha_dxt5.dds
 sig=ftwu00000um0w00000QB0r00000vrnv00000000000000000000000000000000000000000000000000
 
 [dest sub]
+hw_only = true
 op0=b = al_load_bitmap(filename)
 op1=b2 = al_create_sub_bitmap(b, 16, 16, 128, 128);
 op2=al_set_target_bitmap(b2)
@@ -116,6 +123,7 @@ filename = ../examples/data/mysha_dxt5.dds
 sig=LLZD50000LL0050000ZLL050000222200000000000000000000000000000000000000000000000000
 
 [convert from]
+hw_only = true
 op0=b = al_load_bitmap(filename)
 op1=al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_RGB_565)
 op2=al_convert_bitmap(b)
@@ -137,6 +145,7 @@ filename = ../examples/data/mysha_dxt5.dds
 sig=ftZD50000um0050000jLL050000222200000000000000000000000000000000000000000000000000
 
 [convert to]
+hw_only = true
 filename = ../examples/data/blue_box.png
 op0=al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_RGB_565)
 op1=b = al_load_bitmap(filename)
diff --git a/tests/test_convert.ini b/tests/test_convert.ini
index 9d8e96c..a16877e 100644
--- a/tests/test_convert.ini
+++ b/tests/test_convert.ini
@@ -1,4 +1,6 @@
 [test convert]
+# This test relies on needing a video bitmap.
+hw_only = true
 op0= al_clear_to_color(#554321)
 op1= al_set_new_bitmap_flags(ALLEGRO_MEMORY_BITMAP)
 op2= al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_RGB_565)
diff --git a/tests/test_driver.c b/tests/test_driver.c
index de087b3..fb7bb03 100644
--- a/tests/test_driver.c
+++ b/tests/test_driver.c
@@ -70,6 +70,7 @@ int               verbose = 0;
 int               total_tests = 0;
 int               passed_tests = 0;
 int               failed_tests = 0;
+int               skipped_tests = 0;
 
 #define streq(a, b)  (0 == strcmp((a), (b)))
 
@@ -932,7 +933,7 @@ static void check_similarity(ALLEGRO_CONFIG const *cfg,
 }
 
 static void do_test(ALLEGRO_CONFIG *cfg, char const *testname,
-   ALLEGRO_BITMAP *target, int bmp_type, bool reliable)
+   ALLEGRO_BITMAP *target, int bmp_type, bool reliable, bool do_check_hash)
 {
 #define MAXBUF    80
 
@@ -1484,12 +1485,10 @@ static void do_test(ALLEGRO_CONFIG *cfg, char const *testname,
 
    al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_ANY_WITH_ALPHA);
 
-   if (bmp_type == SW) {
-      al_set_new_bitmap_flags(ALLEGRO_MEMORY_BITMAP);
+   if (do_check_hash) {
       check_hash(cfg, testname, target, bmp_type);
    }
    else {
-      al_set_new_bitmap_flags(ALLEGRO_VIDEO_BITMAP);
       check_similarity(cfg, testname, target, membuf, bmp_type, reliable);
    }
 
@@ -1538,15 +1537,23 @@ static void sw_hw_test(ALLEGRO_CONFIG *cfg, char const *testname)
 {
    int old_failed_tests = failed_tests;
    bool reliable;
+   char const *hw_only_str = al_get_config_value(cfg, testname, "hw_only");
+   bool hw_only = hw_only_str && get_bool(hw_only_str);
 
    al_set_new_bitmap_flags(ALLEGRO_MEMORY_BITMAP);
-   do_test(cfg, testname, membuf, SW, true);
+   if (!hw_only) {
+      do_test(cfg, testname, membuf, SW, true, true);
+   }
 
    reliable = (failed_tests == old_failed_tests);
 
    if (display) {
       al_set_new_bitmap_flags(ALLEGRO_VIDEO_BITMAP);
-      do_test(cfg, testname, al_get_backbuffer(display), HW, reliable);
+      do_test(cfg, testname, al_get_backbuffer(display), HW, reliable, hw_only);
+   } else if (hw_only) {
+      printf("WARNING: Skipping hardware-only test due to the --no-display flag: %s\n",
+             testname);
+      skipped_tests++;
    }
 }
 
@@ -1811,6 +1818,7 @@ int main(int _argc, char *_argv[])
    printf("total tests:  %d\n", total_tests);
    printf("passed tests: %d\n", passed_tests);
    printf("failed tests: %d\n", failed_tests);
+   printf("skipped tests: %d\n", skipped_tests);
    printf("\n");
 
    return !!failed_tests;
diff --git a/tests/test_prim2.ini b/tests/test_prim2.ini
index 44b24b9..72ffb9c 100644
--- a/tests/test_prim2.ini
+++ b/tests/test_prim2.ini
@@ -1,22 +1,22 @@
 # Test primitives which are only in the 5.1 branch.
 
 [test projection]
+# Projection doesn't work on memory bitmaps
+hw_only = true
 op0=al_orthographic_transform(trans, -1, -1, -1, 1, 1, 1)
 op1=al_use_projection_transform(trans)
 op2=al_draw_filled_circle(0, 0, 1, #aa6600)
-# Projection doesn't work on memory bitmaps
-hash=35af6375
-hash_hw=cb2630a9
-sig_hw=0DMMMMMC0CMMMMMMM9MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM9MMMMMMM60AMMMMM80
+hash=cb2630a9
+sig=0DMMMMMC0CMMMMMMM9MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM9MMMMMMM60AMMMMM80
 
 [test projection flipped]
+# Projection doesn't work on memory bitmaps
+hw_only = true
 op0=al_orthographic_transform(trans, -1, 1, -1, 1, -1, 1)
 op1=al_use_projection_transform(trans)
 op2=al_draw_filled_circle(0, 0, 1, #aa6600)
-# Projection doesn't work on memory bitmaps
-hash=35af6375
-hash_hw=65feb169
-sig_hw=0DMMMMMC0CMMMMMMM9MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM9MMMMMMM60AMMMMM80
+hash=cb2630a9
+sig=0DMMMMMC0CMMMMMMM9MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM9MMMMMMM60AMMMMM80
 
 [triangle base]
 op0=al_clear_to_color(white)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/allegro5.git



More information about the Pkg-games-commits mailing list