Skip to content

Commit acac3f9

Browse files
committed
bugfix: Fix #406
1 parent 2c7b3ca commit acac3f9

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Diff for: scripts/control_draw/control_draw.gml

+10-8
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ function control_draw() {
770770
marker_pos = 0
771771
marker_prevpos = 0
772772
}
773-
if (keyboard_check_pressed(vk_space)) toggle_playing(totalcols) timestoloop = real(loopmax)
773+
if (keyboard_check_pressed(vk_space)) toggle_playing(totalcols)
774774
if (keyboard_check_pressed(vk_f1)) {
775775
if (language != 1) open_url("http://www.youtube.com/playlist?list=PL7EA4F0D271DA6E86")
776776
else open_url("https://www.bilibili.com/video/BV1Mx411a76p")
@@ -1037,14 +1037,16 @@ function control_draw() {
10371037
}
10381038
//loop song
10391039
if (loop_session = 1 && marker_pos > enda + 1 && (!looptobarend || marker_pos mod (timesignature * 4) < 1)) {
1040-
timestoloop --
1040+
--timestoloop
10411041
starta = loopstart
10421042
marker_pos = starta
10431043
metronome_played = -1
10441044
sb_val[scrollbarh] = starta
1045-
if loopmax != 0 {
1046-
if timestoloop < 0 {
1045+
if (loopmax != 0) {
1046+
if (timestoloop < 0) {
10471047
playing = 0
1048+
marker_pos = 0
1049+
marker_prevpos = 0
10481050
timestoloop = real(loopmax)
10491051
}
10501052
}
@@ -1696,8 +1698,8 @@ function control_draw() {
16961698
if (draw_icon(icons.OPEN, xx, yy, "Open song", 0, 0)) {playing = 0 load_song("")} xx += 25 + isplayer * 4
16971699
if (!isplayer) if (draw_icon(icons.SAVE, xx, yy, "Save song", 0, 0)) {save_song(filename)} if (!isplayer) xx += 25 + 4
16981700
draw_separator(xx, yy + 3) xx += 4
1699-
if (draw_icon(icons.PLAY + playing, xx, yy, "Play / Pause song", 0, 0)) toggle_playing(totalcols) timestoloop = real(loopmax)
1700-
if (isplayer && !dropmode) if (draw_icon(icons.PLAY + playing, rw / 2 - 12, rh / 2 + 50, "Play / Pause song", 0, 0)) toggle_playing(totalcols) timestoloop = real(loopmax)
1701+
if (draw_icon(icons.PLAY + playing, xx, yy, "Play / Pause song", 0, 0)) toggle_playing(totalcols)
1702+
if (isplayer && !dropmode) if (draw_icon(icons.PLAY + playing, rw / 2 - 12, rh / 2 + 50, "Play / Pause song", 0, 0)) toggle_playing(totalcols)
17011703
xx += 25
17021704
if (draw_icon(icons.STOP, xx, yy, "Stop song", 0, 0)) {playing = 0 marker_pos = 0 marker_prevpos = 0 timestoloop = real(loopmax)} xx += 25
17031705
if (isplayer && !dropmode) if (draw_icon(icons.STOP, rw / 2 - 12 - 100, rh / 2 + 50, "Stop song", 0, 0)) {playing = 0 marker_pos = 0 marker_prevpos = 0 timestoloop = real(loopmax)}
@@ -1729,8 +1731,8 @@ function control_draw() {
17291731
if (draw_icon(icons.OPEN, xx, yy, "打开歌曲", 0, 0)) {playing = 0 load_song("")} xx += 25 + isplayer * 4
17301732
if (!isplayer) if (draw_icon(icons.SAVE, xx, yy, "保存歌曲", 0, 0)) {save_song(filename)} if (!isplayer) xx += 25 + 4
17311733
draw_separator(xx, yy + 3) xx += 4
1732-
if (draw_icon(icons.PLAY + playing, xx, yy, "播放 / 暂停", 0, 0)) toggle_playing(totalcols) timestoloop = real(loopmax)
1733-
if (isplayer && !dropmode) if (draw_icon(icons.PLAY + playing, rw / 2 - 12, rh / 2 + 50, "播放 / 暂停", 0, 0)) toggle_playing(totalcols) timestoloop = real(loopmax)
1734+
if (draw_icon(icons.PLAY + playing, xx, yy, "播放 / 暂停", 0, 0)) toggle_playing(totalcols)
1735+
if (isplayer && !dropmode) if (draw_icon(icons.PLAY + playing, rw / 2 - 12, rh / 2 + 50, "播放 / 暂停", 0, 0)) toggle_playing(totalcols)
17341736
xx += 25
17351737
if (draw_icon(icons.STOP, xx, yy, "停止歌曲", 0, 0)) {playing = 0 marker_pos = 0 marker_prevpos = 0 timestoloop = real(loopmax)} xx += 25
17361738
if (isplayer && !dropmode) if (draw_icon(icons.STOP, rw / 2 - 12 - 100, rh / 2 + 50, "停止歌曲", 0, 0)) {playing = 0 marker_pos = 0 marker_prevpos = 0 timestoloop = real(loopmax)}

Diff for: scripts/toggle_playing/toggle_playing.gml

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ function toggle_playing(argument0) {
5454
}
5555
}
5656
}
57+
} else {
58+
timestoloop = real(loopmax)
5759
}
5860

5961

0 commit comments

Comments
 (0)