int ref_cnt;
+ tpl_bool_t use_wait_vblank;
twe_tdm_source *tdm_source;
twe_del_source *tdm_del_source;
{
twe_thread_context *ctx = data;
- char *env = NULL;
-
g_mutex_lock(&ctx->thread_mutex);
- env = getenv("TPL_WAIT_VBLANK");
- if (env == NULL || atoi(env)) {
+ if (ctx->use_wait_vblank) {
twe_tdm_source *tdm_source = _twe_thread_tdm_source_create();
if (tdm_source) {
twe_thread_create(void)
{
twe_thread *thread = NULL;
+ char *env = NULL;
thread = calloc(1, sizeof(twe_thread));
if (!thread) {
g_mutex_init(&_twe_ctx->thread_mutex);
g_cond_init(&_twe_ctx->thread_cond);
+ _twe_ctx->use_wait_vblank = TPL_TRUE;
+
+ env = getenv("TPL_WAIT_VBLANK");
+ if (env && !atoi(env)) {
+ _twe_ctx->use_wait_vblank = TPL_FALSE;
+ }
+
g_mutex_lock(&_twe_ctx->thread_mutex);
_twe_ctx->twe_thread = g_thread_new("twe_thread", _twe_thread_loop,
_twe_ctx);