comparison Samples/Sdl/RtViewer/RtViewerSdl.cpp @ 1408:875c9a28236e

Fixed busy CPU in RtViewer
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 04 May 2020 13:17:31 +0200
parents 5d7ee14dc1eb
children cecedf0b1be6
comparison
equal deleted inserted replaced
1407:9c5a8cb3d856 1408:875c9a28236e
373 if (sdlViewport->IsRefreshEvent(event)) 373 if (sdlViewport->IsRefreshEvent(event))
374 sdlViewport->Paint(); 374 sdlViewport->Paint();
375 } 375 }
376 } 376 }
377 } 377 }
378 // Small delay to avoid using 100% of CPU
379 SDL_Delay(1);
378 } 380 }
379 // Small delay to avoid using 100% of CPU
380 SDL_Delay(1);
381 } 381 }
382 } 382 }
383 } 383 }
384 384
385 boost::weak_ptr<OrthancStone::RtViewerApp> g_app; 385 boost::weak_ptr<OrthancStone::RtViewerApp> g_app;