Mercurial > hg > orthanc-stone
comparison Platforms/Wasm/Defaults.cpp @ 838:997290c7d537 am-dev
removed some logs
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 06 Jun 2019 10:50:54 +0200 |
parents | 4f2416d519b4 |
children | 238693c3bc51 |
comparison
equal
deleted
inserted
replaced
837:847fd11384bc | 838:997290c7d537 |
---|---|
274 float x1, | 274 float x1, |
275 float y1, | 275 float y1, |
276 float x2, | 276 float x2, |
277 float y2) | 277 float y2) |
278 { | 278 { |
279 printf("touch start with %d touches\n", touchCount); | 279 // printf("touch start with %d touches\n", touchCount); |
280 | 280 |
281 std::vector<Deprecated::Touch> touches; | 281 std::vector<Deprecated::Touch> touches; |
282 GetTouchVector(touches, touchCount, x0, y0, x1, y1, x2, y2); | 282 GetTouchVector(touches, touchCount, x0, y0, x1, y1, x2, y2); |
283 viewport->TouchStart(touches); | 283 viewport->TouchStart(touches); |
284 } | 284 } |
290 float x1, | 290 float x1, |
291 float y1, | 291 float y1, |
292 float x2, | 292 float x2, |
293 float y2) | 293 float y2) |
294 { | 294 { |
295 printf("touch move with %d touches\n", touchCount); | 295 // printf("touch move with %d touches\n", touchCount); |
296 | 296 |
297 std::vector<Deprecated::Touch> touches; | 297 std::vector<Deprecated::Touch> touches; |
298 GetTouchVector(touches, touchCount, x0, y0, x1, y1, x2, y2); | 298 GetTouchVector(touches, touchCount, x0, y0, x1, y1, x2, y2); |
299 viewport->TouchMove(touches); | 299 viewport->TouchMove(touches); |
300 } | 300 } |
306 float x1, | 306 float x1, |
307 float y1, | 307 float y1, |
308 float x2, | 308 float x2, |
309 float y2) | 309 float y2) |
310 { | 310 { |
311 printf("touch end with %d touches remaining\n", touchCount); | 311 // printf("touch end with %d touches remaining\n", touchCount); |
312 | 312 |
313 std::vector<Deprecated::Touch> touches; | 313 std::vector<Deprecated::Touch> touches; |
314 GetTouchVector(touches, touchCount, x0, y0, x1, y1, x2, y2); | 314 GetTouchVector(touches, touchCount, x0, y0, x1, y1, x2, y2); |
315 viewport->TouchEnd(touches); | 315 viewport->TouchEnd(touches); |
316 } | 316 } |
361 | 361 |
362 const char* EMSCRIPTEN_KEEPALIVE SendSerializedMessageToStoneApplication(const char* message) | 362 const char* EMSCRIPTEN_KEEPALIVE SendSerializedMessageToStoneApplication(const char* message) |
363 { | 363 { |
364 static std::string output; // we don't want the string to be deallocated when we return to JS code so we always use the same string (this is fine since JS is single-thread) | 364 static std::string output; // we don't want the string to be deallocated when we return to JS code so we always use the same string (this is fine since JS is single-thread) |
365 | 365 |
366 printf("SendSerializedMessageToStoneApplication\n"); | 366 //printf("SendSerializedMessageToStoneApplication\n"); |
367 printf("%s", message); | 367 //printf("%s", message); |
368 | 368 |
369 if (applicationWasmAdapter.get() != NULL) { | 369 if (applicationWasmAdapter.get() != NULL) { |
370 applicationWasmAdapter->HandleSerializedMessageFromWeb(output, std::string(message)); | 370 applicationWasmAdapter->HandleSerializedMessageFromWeb(output, std::string(message)); |
371 return output.c_str(); | 371 return output.c_str(); |
372 } | 372 } |
373 printf("This Stone application does not have a Web Adapter"); | 373 printf("This Stone application does not have a Web Adapter, unable to send messages"); |
374 return NULL; | 374 return NULL; |
375 } | 375 } |
376 | 376 |
377 #ifdef __cplusplus | 377 #ifdef __cplusplus |
378 } | 378 } |