From: Trent G. <tr...@us...> - 2013-02-24 22:01:22
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Allegro". The branch, 5.1 has been updated via 8a0e04085f0d9d3dbc4f2bd3d56f33ea5ff4fa1e (commit) via a175a32ab90043cf50396567ed88e8fd4b73bfad (commit) from bb0c93fe3ccc51b55401fed47dafb8e927a47cf0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8a0e04085f0d9d3dbc4f2bd3d56f33ea5ff4fa1e Author: Trent Gamblin <tr...@us...> Date: Sun Feb 24 15:00:38 2013 -0700 Avoid a potential race condition with setting the mouse cursor on Raspberry Pi. commit a175a32ab90043cf50396567ed88e8fd4b73bfad Author: Trent Gamblin <tr...@us...> Date: Sun Feb 24 15:00:01 2013 -0700 Add a way to use distcc when compiling on Raspberry Pi (cmake) ----------------------------------------------------------------------- Summary of changes: cmake/Toolchain-raspberrypi.cmake | 6 ++++-- src/raspberrypi/pidisplay.c | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cmake/Toolchain-raspberrypi.cmake b/cmake/Toolchain-raspberrypi.cmake index 5879a7f..75a2902 100644 --- a/cmake/Toolchain-raspberrypi.cmake +++ b/cmake/Toolchain-raspberrypi.cmake @@ -12,8 +12,10 @@ ENDIF("${TOOLCHAIN_PREFIX}" 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_COMPILER ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}gcc) -SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}g++) +if(NOT DISTCC) + set(CMAKE_C_COMPILER ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}gcc) + set(CMAKE_CXX_COMPILER ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}g++) +endif() set(CMAKE_LINKER ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}ld) set(CMAKE_NM ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}nm) set(CMAKE_OBJCOPY ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}objcopy) diff --git a/src/raspberrypi/pidisplay.c b/src/raspberrypi/pidisplay.c index d13fac0..4e5f26d 100644 --- a/src/raspberrypi/pidisplay.c +++ b/src/raspberrypi/pidisplay.c @@ -129,11 +129,12 @@ static void hide_cursor(ALLEGRO_DISPLAY_RASPBERRYPI *d) vc_dispmanx_resource_delete(cursor_resource); } +static bool cursor_on = false; + static void *cursor_thread_proc(ALLEGRO_THREAD *t, void *_d) { ALLEGRO_DISPLAY *disp = (void *)_d; ALLEGRO_DISPLAY_RASPBERRYPI *d = (void *)_d; - bool cursor_on = false; while (!al_get_thread_should_stop(t)) { if (al_is_mouse_installed() && !cursor_on) { cursor_on = true; @@ -494,6 +495,12 @@ static ALLEGRO_DISPLAY *raspberrypi_create_display(int w, int h) cursor_thread = al_create_thread(cursor_thread_proc, display); al_start_thread(cursor_thread); + if (al_is_mouse_installed()) { + while (!cursor_on) { + al_rest(0.001); + } + } + return display; } hooks/post-receive -- Allegro |