aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-10-02 09:03:43 +0200
committerdec05eba <dec05eba@protonmail.com>2022-10-02 09:03:43 +0200
commitce8356d16c594f0e8bf6d80c30cde71231879f7e (patch)
treece2df56165233b539de604cdad8492347b987021 /src
parent04df769a7e5430bf9b0da906d7c7e442ee8bffe5 (diff)
mpv thread sleep when not rendering frame
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp7
1 files changed, 2 insertions, 5 deletions
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);