mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
28 lines
750 B
Diff
28 lines
750 B
Diff
|
diff -Naur wmusic-2.0.0/src/wmusic.c wmusic-2.0.0.patched/src/wmusic.c
|
||
|
--- wmusic-2.0.0/src/wmusic.c 2018-06-22 16:18:18.000000000 -0400
|
||
|
+++ wmusic-2.0.0.patched/src/wmusic.c 2018-09-16 01:15:17.317552343 -0400
|
||
|
@@ -374,6 +374,7 @@
|
||
|
double volume;
|
||
|
double factor;
|
||
|
|
||
|
+ if(!player) return;
|
||
|
g_object_get(player, "volume", &volume, NULL);
|
||
|
|
||
|
if (*(int*)data == 1)
|
||
|
@@ -393,6 +394,7 @@
|
||
|
void ChangeVol(int x, int y, DARect rect, void *data)
|
||
|
{
|
||
|
float volume = ((float)x)/38;
|
||
|
+ if(!player) return;
|
||
|
g_object_set(player, "volume", volume, NULL);
|
||
|
}
|
||
|
|
||
|
@@ -635,6 +637,7 @@
|
||
|
int volume;
|
||
|
double volume_double;
|
||
|
|
||
|
+ if(!player) return;
|
||
|
g_object_get(player, "volume", &volume_double, NULL);
|
||
|
volume = (int)(36 * volume_double);
|
||
|
if (volume > 36)
|