Skip to content

Commit

Permalink
Merge pull request #81 from taiji1985/main
Browse files Browse the repository at this point in the history
fix bug of can't exit of sdl display
  • Loading branch information
Neutree authored Jan 3, 2025
2 parents 6ce4de8 + b5b6d08 commit 7f0a5d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/vision/port/linux/maix_display_sdl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,12 @@ namespace maix::display
{
SDL_Display *disp = (SDL_Display *)args_in;
SDL_Event event;
while (1)
while (!disp->exit)
{
SDL_WaitEvent(&event);
int ret = SDL_WaitEventTimeout(&event,100);
if(ret == 0){
continue;
}
if (event.type == SDL_QUIT)
{
log::debug("SDL_QUIT\n");
Expand Down

0 comments on commit 7f0a5d0

Please sign in to comment.