| 439 | } |
| 440 | |
| 441 | bool GameLoop::startFrameMessages() |
| 442 | { |
| 443 | context->draw_frame = true; |
| 444 | |
| 445 | /* Indicate if the current frame rendering will be skipped due to fast-forward */ |
| 446 | bool skip_draw_frame = false; |
| 447 | |
| 448 | /* Wait for frame boundary */ |
| 449 | int message = receiveMessage(); |
| 450 | |
| 451 | while (message != MSGB_START_FRAMEBOUNDARY) { |
| 452 | GameInfo game_info; |
| 453 | |
| 454 | switch (message) { |
| 455 | case MSGB_WINDOW_ID: |
| 456 | { |
| 457 | uint32_t int_window; |
| 458 | receiveData(&int_window, sizeof(uint32_t)); |
| 459 | gameEvents->registerGameWindow(int_window); |
| 460 | break; |
| 461 | } |
| 462 | |
| 463 | case MSGB_ALERT_MSG: |
| 464 | /* Ask the UI thread to display the alert. He is in charge of |
| 465 | * freeing the string. |
| 466 | */ |
| 467 | emit alertToShow(QString(receiveString().c_str())); |
| 468 | break; |
| 469 | case MSGB_ENCODE_FAILED: |
| 470 | context->config.sc.av_dumping = false; |
| 471 | context->config.sc_modified = true; |
| 472 | emit sharedConfigChanged(); |
| 473 | break; |
| 474 | case MSGB_FRAMECOUNT_TIME: |
| 475 | receiveData(&context->framecount, sizeof(uint64_t)); |
| 476 | receiveData(&context->current_time_sec, sizeof(uint64_t)); |
| 477 | receiveData(&context->current_time_nsec, sizeof(uint64_t)); |
| 478 | receiveData(&context->current_realtime_sec, sizeof(uint64_t)); |
| 479 | receiveData(&context->current_realtime_nsec, sizeof(uint64_t)); |
| 480 | context->new_realtime_sec = context->current_realtime_sec; |
| 481 | context->new_realtime_nsec = context->current_realtime_nsec; |
| 482 | |
| 483 | // if (context->config.sc.recording == SharedConfig::RECORDING_WRITE) { |
| 484 | // /* If the input editor is opened, recording does not truncate inputs */ |
| 485 | // bool notTruncInputs = false; |
| 486 | // emit isInputEditorVisible(notTruncInputs); |
| 487 | // |
| 488 | // if (!notTruncInputs || (context->framecount > context->config.sc.movie_framecount)) { |
| 489 | // context->config.sc.movie_framecount = context->framecount; |
| 490 | // movie.header->length_sec = context->current_time_sec - context->config.sc.initial_monotonic_time_sec; |
| 491 | // movie.header->length_nsec = context->current_time_nsec - context->config.sc.initial_monotonic_time_nsec; |
| 492 | // if (movie.header->length_nsec < 0) { |
| 493 | // movie.header->length_nsec += 1000000000; |
| 494 | // movie.header->length_sec--; |
| 495 | // } |
| 496 | // } |
| 497 | // } |
| 498 |
nothing calls this directly
no test coverage detected