summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-03 15:40:51 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-03 15:40:51 +0200
commit8e442abcd71b7de741f615eac4fa1bd9fa63390e (patch)
tree6545424ee648a776e8155641b16851d6b30d5d33 /ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
parentf984d092db61cafb3b85efedeab6a9fbd6896ead (diff)
simconnect: try set camera without event notification
Diffstat (limited to 'ftnoir_protocol_sc/ftnoir_protocol_sc.cpp')
-rw-r--r--ftnoir_protocol_sc/ftnoir_protocol_sc.cpp29
1 files changed, 5 insertions, 24 deletions
diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
index 02ad497d..4d76df03 100644
--- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
+++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
@@ -43,20 +43,20 @@ FTNoIR_Protocol::~FTNoIR_Protocol()
void FTNoIR_Protocol::run()
{
- if (SUCCEEDED(simconnect_open(&hSimConnect, "FaceTrackNoIR", NULL, 0, 0, 0))) {
+ if (!SUCCEEDED(simconnect_open(&hSimConnect, "FaceTrackNoIR", NULL, 0, 0, 0)))
+ return;
+#if 0
simconnect_subscribetosystemevent(hSimConnect, EVENT_PING, "Frame");
simconnect_mapclienteventtosimevent(hSimConnect, EVENT_INIT, "");
simconnect_addclienteventtonotificationgroup(hSimConnect, GROUP0, EVENT_INIT, false);
simconnect_setnotificationgrouppriority(hSimConnect, GROUP0, SIMCONNECT_GROUP_PRIORITY_HIGHEST);
- }
- else
- return;
+#endif
while (!should_stop)
{
(void) (simconnect_calldispatch(hSimConnect, processNextSimconnectEvent, reinterpret_cast<void*>(this)));
- Sleep(3);
+ Sleep(1);
}
(void) simconnect_close(hSimConnect);
@@ -217,25 +217,6 @@ void CALLBACK FTNoIR_Protocol::processNextSimconnectEvent(SIMCONNECT_RECV* pData
case SIMCONNECT_RECV_ID_EVENT_FRAME:
self.handle();
break;
- case SIMCONNECT_RECV_ID_EXCEPTION:
- {
- SIMCONNECT_RECV_EXCEPTION *except = (SIMCONNECT_RECV_EXCEPTION*)pData;
-
- switch (except->dwException)
- {
- case SIMCONNECT_EXCEPTION_ERROR:
- qDebug() << "Camera error";
- break;
-
- default:
- qDebug() << "Exception";
- break;
- }
- break;
- }
-
- case SIMCONNECT_RECV_ID_QUIT:
- break;
}
}