Critical fix for Airbrush, to prevent it from spiraling to death when airbrushing time-consuming brushes : Event queue would fill with 'tick' events, mouse button release wouldn't be caught, more airbrushing , more cpu cost, deadlock
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1569 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
25796b9188
commit
cd39485232
@ -779,7 +779,7 @@ int Get_input(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_USEREVENT:
|
case SDL_USEREVENT:
|
||||||
user_feedback_required = 1;
|
//user_feedback_required = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//DEBUG("Unhandled SDL event number : ",event.type);
|
//DEBUG("Unhandled SDL event number : ",event.type);
|
||||||
|
|||||||
@ -1908,10 +1908,13 @@ void Airbrush_1_0(void)
|
|||||||
Backup();
|
Backup();
|
||||||
Shade_table=Shade_table_left;
|
Shade_table=Shade_table_left;
|
||||||
|
|
||||||
Airbrush_next_time = SDL_GetTicks()+Airbrush_delay*10;
|
|
||||||
//Need_Timer_events=1;
|
//Need_Timer_events=1;
|
||||||
//Activate_timer(10);
|
//Activate_timer(10);
|
||||||
Airbrush(LEFT_SIDE);
|
if (SDL_GetTicks()>Airbrush_next_time)
|
||||||
|
{
|
||||||
|
Airbrush(LEFT_SIDE);
|
||||||
|
Airbrush_next_time = SDL_GetTicks()+Airbrush_delay*10;
|
||||||
|
}
|
||||||
|
|
||||||
Operation_push(Paintbrush_X);
|
Operation_push(Paintbrush_X);
|
||||||
Operation_push(Paintbrush_Y);
|
Operation_push(Paintbrush_Y);
|
||||||
@ -1932,10 +1935,13 @@ void Airbrush_2_0(void)
|
|||||||
Init_start_operation();
|
Init_start_operation();
|
||||||
Backup();
|
Backup();
|
||||||
Shade_table=Shade_table_right;
|
Shade_table=Shade_table_right;
|
||||||
Airbrush_next_time = SDL_GetTicks()+Airbrush_delay*10;
|
|
||||||
//Need_Timer_events=1;
|
//Need_Timer_events=1;
|
||||||
//Activate_timer(10);
|
//Activate_timer(10);
|
||||||
Airbrush(RIGHT_SIDE);
|
if (SDL_GetTicks()>Airbrush_next_time)
|
||||||
|
{
|
||||||
|
Airbrush(RIGHT_SIDE);
|
||||||
|
Airbrush_next_time = SDL_GetTicks()+Airbrush_delay*10;
|
||||||
|
}
|
||||||
|
|
||||||
Operation_push(Paintbrush_X);
|
Operation_push(Paintbrush_X);
|
||||||
Operation_push(Paintbrush_Y);
|
Operation_push(Paintbrush_Y);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user