SaveTool: implement the request thread.
This commit is contained in:
parent
017900afe2
commit
7f32166ab0
1 changed files with 4 additions and 1 deletions
|
@ -594,10 +594,13 @@ void SaveTool::checkGameState() {
|
|||
}
|
||||
|
||||
void SaveTool::checkForUpdates() {
|
||||
// TODO: implement
|
||||
cpr::Response r = cpr::Get(cpr::Url{"https://williamjcm.ovh/git/api/v1/repos/williamjcm/MassBuilderSaveTool/releases"},
|
||||
cpr::Parameters{{"limit", "1"}}, cpr::Timeout{10000});
|
||||
|
||||
SDL_Event event;
|
||||
SDL_zero(event);
|
||||
event.type = _updateEventId;
|
||||
event.user.code = r.status_code;
|
||||
event.user.data1 = new cpr::Response{std::move(r)};
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue