~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rearrange crazy control.c logic. No longer are there two widgets per
[disorder]
/
disobedience
/
disobedience.c
diff --git
a/disobedience/disobedience.c
b/disobedience/disobedience.c
index
2a65d67
..
6ee4803
100644
(file)
--- a/
disobedience/disobedience.c
+++ b/
disobedience/disobedience.c
@@
-318,7
+318,7
@@
static gboolean periodic_fast(gpointer attribute((unused)) data) {
&& (nl != volume_l || nr != volume_r)) {
volume_l = nl;
volume_r = nr;
&& (nl != volume_l || nr != volume_r)) {
volume_l = nl;
volume_r = nr;
-
volume_update(
);
+
event_raise("volume-changed", 0
);
}
}
return TRUE;
}
}
return TRUE;
@@
-342,10
+342,10
@@
static gboolean maybe_send_nop(gpointer attribute((unused)) data) {
disorder_eclient_nop(client, nop_completed, 0);
}
if(rtp_supported) {
disorder_eclient_nop(client, nop_completed, 0);
}
if(rtp_supported) {
- const int
old_state
= rtp_is_running;
+ const int
rtp_was_running
= rtp_is_running;
rtp_is_running = rtp_running();
rtp_is_running = rtp_running();
- if(
old_state
!= rtp_is_running)
-
control_monitor(
0);
+ if(
rtp_was_running
!= rtp_is_running)
+
event_raise("rtp-changed",
0);
}
return TRUE; /* keep call me please */
}
}
return TRUE; /* keep call me please */
}
@@
-355,6
+355,9
@@
static void got_rtp_address(void attribute((unused)) *v,
const char *error,
int attribute((unused)) nvec,
char attribute((unused)) **vec) {
const char *error,
int attribute((unused)) nvec,
char attribute((unused)) **vec) {
+ const int rtp_was_supported = rtp_supported;
+ const int rtp_was_running = rtp_is_running;
+
++suppress_actions;
rtp_address_in_flight = 0;
if(error) {
++suppress_actions;
rtp_address_in_flight = 0;
if(error) {
@@
-364,9
+367,10
@@
static void got_rtp_address(void attribute((unused)) *v,
} else {
rtp_supported = 1;
rtp_is_running = rtp_running();
} else {
rtp_supported = 1;
rtp_is_running = rtp_running();
- control_monitor(0);
}
}
- control_monitor(0);
+ if(rtp_supported != rtp_was_supported
+ || rtp_is_running != rtp_was_running)
+ event_raise("rtp-changed", 0);
--suppress_actions;
}
--suppress_actions;
}