2d378fadc6
official changelist: * update screensaver key faking code to avoid false triggering of the "sticky keys" feature on newer distros * fix crashes caused by tooltips * fix reporting of dropped frames * experimental feature: output video to a different display than control panel. set gui.video_display to the second display name, usually ":0.1" or ":1", * removed -funroll-all-loops from SPARC and PPC targets. * fix xitk trying set a window property when its atom may be undefined * add --disable-shm-default configure option which sets feature.shm to zero but keeps the shm code compiled in unfortunately new bugs in timer handling and mutex locking were introduced...
44 lines
1.6 KiB
Text
44 lines
1.6 KiB
Text
$NetBSD: patch-ac,v 1.2 2004/07/06 21:12:58 drochner Exp $
|
|
|
|
--- src/xitk/xine-toolkit/tips.c.orig 2004-07-02 15:23:31.000000000 +0200
|
|
+++ src/xitk/xine-toolkit/tips.c
|
|
@@ -87,6 +87,10 @@ static void *_tips_loop_thread(void *dat
|
|
gettimeofday(&tv, NULL);
|
|
ts.tv_sec = tv.tv_sec;
|
|
ts.tv_nsec = (tv.tv_usec + 300000) * 1000;
|
|
+ while (ts.tv_nsec >= 1000000000) {
|
|
+ ts.tv_nsec -= 1000000000;
|
|
+ ts.tv_sec ++;
|
|
+ }
|
|
|
|
result = pthread_cond_timedwait(&tips.prewait_cond, &tips.prewait_mutex, &ts);
|
|
tips.prewait = 0;
|
|
@@ -208,6 +212,10 @@ static void *_tips_loop_thread(void *dat
|
|
gettimeofday(&tv, NULL);
|
|
ts.tv_sec = tv.tv_sec;
|
|
ts.tv_nsec = (tv.tv_usec + (tips.widget->tips_timeout * 10000)) * 1000;
|
|
+ while (ts.tv_nsec >= 1000000000) {
|
|
+ ts.tv_nsec -= 1000000000;
|
|
+ ts.tv_sec ++;
|
|
+ }
|
|
|
|
pthread_mutex_lock(&tips.timer_mutex);
|
|
pthread_cond_timedwait(&tips.timer_cond, &tips.timer_mutex, &ts);
|
|
@@ -239,7 +247,7 @@ void xitk_tips_init(Display *disp) {
|
|
|
|
if(!tips.running) {
|
|
pthread_attr_t pth_attrs;
|
|
-#if ! defined (__OpenBSD__)
|
|
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
|
|
struct sched_param pth_params;
|
|
#endif
|
|
|
|
@@ -258,7 +266,7 @@ void xitk_tips_init(Display *disp) {
|
|
pthread_cond_init(&tips.prewait_cond, NULL);
|
|
|
|
pthread_attr_init(&pth_attrs);
|
|
-#if ! defined (__OpenBSD__)
|
|
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
|
|
pthread_attr_getschedparam(&pth_attrs, &pth_params);
|
|
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
|
|
pthread_attr_setschedparam(&pth_attrs, &pth_params);
|