mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-03 20:38:13 +03:00
Skip 400ms delay after opening menu if mouse movement is disabled
This removes the 400ms delay in NACT::wait_after_open_menu() if automatic mouse movement is disabled, because there's less risk of miss-clicking.
This commit is contained in:
+10
-13
@@ -504,21 +504,18 @@ uint16 NACT::random(uint16 range)
|
||||
|
||||
void NACT::wait_after_open_menu()
|
||||
{
|
||||
// 連打による誤クリック防止
|
||||
Uint32 dwTime = SDL_GetTicks();
|
||||
Uint32 dwWait = dwTime + 400;
|
||||
if (mouse_move_enabled) {
|
||||
// 連打による誤クリック防止
|
||||
Uint32 dwTime = SDL_GetTicks();
|
||||
Uint32 dwWait = dwTime + 400;
|
||||
|
||||
while(dwTime < dwWait) {
|
||||
if(terminate) {
|
||||
return;
|
||||
while(dwTime < dwWait) {
|
||||
if(terminate) {
|
||||
return;
|
||||
}
|
||||
sys_sleep(10);
|
||||
dwTime = SDL_GetTicks();
|
||||
}
|
||||
/*
|
||||
if(get_key() == 16) {
|
||||
break;
|
||||
}
|
||||
*/
|
||||
sys_sleep(10);
|
||||
dwTime = SDL_GetTicks();
|
||||
}
|
||||
|
||||
// クリック中の間は待機
|
||||
|
||||
Reference in New Issue
Block a user