changeset 1408:875c9a28236e

Fixed busy CPU in RtViewer
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 04 May 2020 13:17:31 +0200
parents 9c5a8cb3d856
children 07fac4fdbe07
files Samples/Sdl/RtViewer/RtViewerSdl.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Samples/Sdl/RtViewer/RtViewerSdl.cpp	Mon May 04 13:17:11 2020 +0200
+++ b/Samples/Sdl/RtViewer/RtViewerSdl.cpp	Mon May 04 13:17:31 2020 +0200
@@ -375,9 +375,9 @@
             }
           }
         }
+        // Small delay to avoid using 100% of CPU
+        SDL_Delay(1);
       }
-      // Small delay to avoid using 100% of CPU
-      SDL_Delay(1);
     }
   }
 }