| 835 | } |
| 836 | |
| 837 | void GameLoop::endFrameMessages(AllInputs &ai) |
| 838 | { |
| 839 | /* If the user stopped the game with the Stop button, don't write back |
| 840 | * savefiles.*/ |
| 841 | if (context->status == Context::QUITTING) { |
| 842 | context->config.sc.write_savefiles_on_exit = false; |
| 843 | context->config.sc_modified = true; |
| 844 | } |
| 845 | |
| 846 | /* If the game was restarted, write back savefiles.*/ |
| 847 | if (context->status == Context::RESTARTING) { |
| 848 | context->config.sc.write_savefiles_on_exit = true; |
| 849 | context->config.sc_modified = true; |
| 850 | } |
| 851 | |
| 852 | /* Send shared config if modified */ |
| 853 | if (context->config.sc_modified) { |
| 854 | /* Send config */ |
| 855 | sendMessage(MSGN_CONFIG); |
| 856 | sendData(&context->config.sc, sizeof(SharedConfig)); |
| 857 | context->config.sc_modified = false; |
| 858 | } |
| 859 | |
| 860 | /* Send dump file if modified */ |
| 861 | if (context->config.dumpfile_modified) { |
| 862 | sendMessage(MSGN_DUMP_FILE); |
| 863 | sendString(context->config.dumpfile); |
| 864 | sendString(context->config.ffmpegoptions); |
| 865 | context->config.dumpfile_modified = false; |
| 866 | } |
| 867 | |
| 868 | /* Send inputs and end of frame */ |
| 869 | ai.send(false); |
| 870 | |
| 871 | if ((context->status == Context::QUITTING) || (context->status == Context::RESTARTING)) { |
| 872 | sendMessage(MSGN_USERQUIT); |
| 873 | } |
| 874 | |
| 875 | sendMessage(MSGN_END_FRAMEBOUNDARY); |
| 876 | } |
| 877 | |
| 878 | void GameLoop::loopExit() |
| 879 | { |
nothing calls this directly
no test coverage detected