summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-09-20 11:00:49 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-09-20 11:00:49 +0200
commite02a90db751423453b45a5b06cf1e66d7a9c6708 (patch)
treec3c639916d4ce84671faf966d7c91c3255d2cdab /main.c
parent9916dec0d40c76452a21b44ea933b3dbf3ef966d (diff)
suspend-to-ram check now handles paused state correctly
Diffstat (limited to 'main.c')
-rw-r--r--main.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/main.c b/main.c
index 93882f9e..bac40955 100644
--- a/main.c
+++ b/main.c
@@ -330,9 +330,18 @@ player_thread (uintptr_t ctx) {
while (messagepump_pop(&msg, &ctx, &p1, &p2) != -1) {
switch (msg) {
case M_REINIT_SOUND:
- palsa_free ();
- palsa_init ();
- palsa_play ();
+ {
+ int play = 0;
+ if (!palsa_ispaused () && !palsa_isstopped ()) {
+ play = 1;
+ }
+
+ palsa_free ();
+ palsa_init ();
+ if (play) {
+ palsa_play ();
+ }
+ }
break;
case M_TERMINATE:
GDK_THREADS_ENTER();