mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-30 19:07:59 +03:00
Refactor key release handling in NACT commands
This commit is contained in:
+4
-27
@@ -423,14 +423,8 @@ void NACT::cmd_a()
|
||||
sys_sleep(16);
|
||||
}
|
||||
sys_sleep(30);
|
||||
while (!msgskip->skipping()) {
|
||||
if(terminate) {
|
||||
return;
|
||||
}
|
||||
if(!(get_key() & 0x18)) {
|
||||
break;
|
||||
}
|
||||
sys_sleep(16);
|
||||
if (!msgskip->skipping()) {
|
||||
wait_key_release(0x18);
|
||||
}
|
||||
|
||||
// ウィンドウ更新
|
||||
@@ -653,15 +647,7 @@ int NACT::menu_select(int num_items)
|
||||
sys_sleep(16);
|
||||
}
|
||||
if(val) {
|
||||
for(;;) {
|
||||
if(terminate) {
|
||||
return -1;
|
||||
}
|
||||
if(!get_key()) {
|
||||
break;
|
||||
}
|
||||
sys_sleep(16);
|
||||
}
|
||||
wait_key_release();
|
||||
}
|
||||
|
||||
if(val == 0) {
|
||||
@@ -729,16 +715,7 @@ void NACT::wait_after_open_menu()
|
||||
}
|
||||
}
|
||||
|
||||
// クリック中の間は待機
|
||||
for(;;) {
|
||||
if(terminate) {
|
||||
return;
|
||||
}
|
||||
if(!get_key()) {
|
||||
break;
|
||||
}
|
||||
sys_sleep(10);
|
||||
}
|
||||
wait_key_release();
|
||||
}
|
||||
|
||||
void NACT::sys_sleep(int ms) {
|
||||
|
||||
Reference in New Issue
Block a user