diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | src/Canvas.cpp | 24 |
2 files changed, 14 insertions, 13 deletions
@@ -2,8 +2,9 @@ ganv (1.4.3) unstable; * Fix positioning of embedded widgets when changing layout. * Fix unexpected node jumping when dragging new connections. + * Fix compilation with --no-fdgl (patch from Vlad Glagolev). - -- David Robillard <d@drobilla.net> Sun, 31 Aug 2014 22:54:12 -0400 + -- David Robillard <d@drobilla.net> Fri, 07 Nov 2014 13:12:49 -0500 ganv (1.4.2) stable; diff --git a/src/Canvas.cpp b/src/Canvas.cpp index f1494a0..6b16230 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -760,6 +760,18 @@ GanvCanvasImpl::layout_dot(const std::string& filename) } #endif +inline uint64_t +get_monotonic_time() +{ +#if GLIB_CHECK_VERSION(2, 28, 0) + return g_get_monotonic_time(); +#else + GTimeVal time; + g_get_current_time(&time); + return time.tv_sec + time.tv_usec; +#endif +} + #ifdef GANV_FDGL inline Region @@ -788,18 +800,6 @@ apply_force(GanvNode* a, GanvNode* b, const Vector& f) b->impl->force = vec_sub(b->impl->force, f); } -inline uint64_t -get_monotonic_time() -{ -#if GLIB_CHECK_VERSION(2, 28, 0) - return g_get_monotonic_time(); -#else - GTimeVal time; - g_get_current_time(&time); - return time.tv_sec + time.tv_usec; -#endif -} - gboolean GanvCanvasImpl::layout_iteration() { |