| 92 | } |
| 93 | |
| 94 | int SaveState::save(Context* context, const MovieFile& m) |
| 95 | { |
| 96 | /* Save the movie file */ |
| 97 | movie->copyFrom(m); |
| 98 | |
| 99 | /* Send the savestate index */ |
| 100 | sendMessage(MSGN_SAVESTATE_INDEX); |
| 101 | sendData(&id, sizeof(int)); |
| 102 | |
| 103 | /* Send the savestate path */ |
| 104 | sendMessage(MSGN_SAVESTATE_PATH); |
| 105 | sendString(path); |
| 106 | |
| 107 | sendMessage(MSGN_SAVESTATE); |
| 108 | |
| 109 | /* Checking that saving succeeded */ |
| 110 | int message = receiveMessage(); |
| 111 | |
| 112 | /* Set framecount */ |
| 113 | if (message == MSGB_SAVING_SUCCEEDED) { |
| 114 | framecount = context->framecount; |
| 115 | } |
| 116 | |
| 117 | return message; |
| 118 | } |
| 119 | |
| 120 | int SaveState::load(Context* context, const MovieFile& m, bool branch, bool inputEditor, int common_relative_id, uint64_t common_relative_framecount) |
| 121 | { |
nothing calls this directly
no test coverage detected