From ce8356d16c594f0e8bf6d80c30cde71231879f7e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 2 Oct 2022 09:03:43 +0200 Subject: mpv thread sleep when not rendering frame --- src/main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 9bd4924..690f8a8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -68,11 +68,6 @@ #define _countof(x) (sizeof(x)/sizeof((x)[0])) #endif -void ThreadSleep( unsigned long nMilliseconds ) -{ - usleep( nMilliseconds * 1000 ); -} - static bool g_bPrintf = true; //----------------------------------------------------------------------------- @@ -887,6 +882,8 @@ bool CMainApplication::BInit() glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0 ); glEnable( GL_MULTISAMPLE ); + } else { + usleep(1000); } set_current_context(NULL); -- cgit v1.2.3