mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-05 13:18:08 +03:00
SACT/NIGHTDLL: Check nact->is_quit flag in wait loops
This commit is contained in:
@@ -312,7 +312,7 @@ static int ntmsg_keywait() {
|
||||
night.waittype = KEYWAIT_MESSAGE;
|
||||
night.waitkey = -1;
|
||||
|
||||
while (night.waitkey == -1) {
|
||||
while (night.waitkey == -1 && !nact->is_quit) {
|
||||
int st = get_high_counter(SYSTEMCOUNTER_MSEC);
|
||||
int interval = 25;
|
||||
|
||||
|
||||
+2
-2
@@ -1012,7 +1012,7 @@ static void WaitKeySimple() {
|
||||
sact.waittype = KEYWAIT_SIMPLE;
|
||||
sact.waitkey = -1;
|
||||
|
||||
while(sact.waitkey == -1) {
|
||||
while (sact.waitkey == -1 && !nact->is_quit) {
|
||||
sys_keywait(25, KEYWAIT_CANCELABLE);
|
||||
}
|
||||
|
||||
@@ -1587,7 +1587,7 @@ static void TimerWait() {
|
||||
int wTimerID = getCaliValue();
|
||||
int wCount = getCaliValue();
|
||||
|
||||
while(wCount > stimer_get(wTimerID)) {
|
||||
while (wCount > stimer_get(wTimerID) && !nact->is_quit) {
|
||||
sys_keywait(10, KEYWAIT_NONCANCELABLE);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ int ssnd_waitkey(int no, int *res) {
|
||||
sact.waittype = KEYWAIT_SIMPLE;
|
||||
sact.waitkey = -1;
|
||||
|
||||
while(sact.waitkey == -1 && mus_wav_get_playposition(slot)) {
|
||||
while (sact.waitkey == -1 && mus_wav_get_playposition(slot) && !nact->is_quit) {
|
||||
sys_keywait(25, KEYWAIT_CANCELABLE);
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ int sp_keywait(int *vOK, int *vRND, int *vD01, int *vD02, int *vD03, int timeout
|
||||
endtime = timeout < 0 ? INT_MAX : (curtime + timeout * 10);
|
||||
|
||||
// スプライトキー待ちメイン
|
||||
while (!waitcond(endtime)) {
|
||||
while (!waitcond(endtime) && !nact->is_quit) {
|
||||
sys_keywait(25, KEYWAIT_CANCELABLE);
|
||||
}
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@ int smsg_keywait(int wNum1, int wNum2, int msglen) {
|
||||
sact.waittype = KEYWAIT_MESSAGE;
|
||||
sact.waitkey = -1;
|
||||
|
||||
while (sact.waitkey == -1) {
|
||||
while (sact.waitkey == -1 && !nact->is_quit) {
|
||||
int st = get_high_counter(SYSTEMCOUNTER_MSEC);
|
||||
int interval = 25;
|
||||
|
||||
|
||||
@@ -238,6 +238,8 @@ static int sel_main() {
|
||||
|
||||
while(selected_item == -1) {
|
||||
sys_keywait(25, KEYWAIT_CANCELABLE);
|
||||
if (nact->is_quit)
|
||||
selected_item = 0;
|
||||
}
|
||||
|
||||
sact.waittype = KEYWAIT_NONE;
|
||||
|
||||
Reference in New Issue
Block a user