// register new callback
if(callback != NULL)
{
+ int re;
add_to_callback_list(interval, cindex, series_handle, callback, data_addr);
- start_callback_thread(interval);
+ re = start_callback_thread(interval);
+ LOG("start callback thread return %d\n", re);
}
probeBlockEnd();
do { \
LOG("screenshot_unlock : %d, %s\n", gTraceInfo.screenshot.state, __func__); \
pthread_mutex_lock(&(gTraceInfo.screenshot.ssMutex)); \
- gTraceInfo.screenshot.state = 1; \
+ if(gTraceInfo.screenshot.state < 0) \
+ gTraceInfo.screenshot.state = 1; \
pthread_mutex_unlock(&(gTraceInfo.screenshot.ssMutex)); \
} while(0)
int initialize_event();
int finalize_event();
int getOrientation();
-void orientationEnabled();
void on_orientation_changed(int angle, bool capi);
int remove_indir(const char* dirname);
static int external_angle = 0;
static int internal_angle = 0;
-static bool orientation_enabled = false;
// ===================================================================
// orientation related functions
FLUSH_LOCAL_BUF();
}
-// if(orientation_enabled)
+ SCREENSHOT_SET();
+// if(!capi)
// {
- SCREENSHOT_SET();
-// if(!capi)
-// {
-// SCREENSHOT_DONE();
-// }
+// SCREENSHOT_DONE();
// }
}
else { } // do nothing
probeBlockEnd();
}
-void orientationEnabled()
-{
- orientation_enabled = true;
-}
-
int getOrientation()
{
return external_angle;