MCPcopy Create free account
hub / github.com/clementgallet/libTAS / endFrameMessages

Method endFrameMessages

src/program/GameLoop.cpp:837–876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835}
836
837void 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
878void GameLoop::loopExit()
879{

Callers

nothing calls this directly

Calls 4

sendMessageFunction · 0.85
sendDataFunction · 0.85
sendStringFunction · 0.85
sendMethod · 0.80

Tested by

no test coverage detected