Skip to content

Commit

Permalink
fix: several bugs related to auto-updater
Browse files Browse the repository at this point in the history
  • Loading branch information
NagaseIori committed Jul 25, 2024
1 parent 48a611f commit cca5a09
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DyCore
Submodule DyCore updated 1 files
+4 −3 DyCore.cpp
Binary file modified extensions/DyCore/DyCore.dll
Binary file not shown.
15 changes: 14 additions & 1 deletion objects/objmanager/Other_62.gml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ if (async_load[? "id"] == _update_get_event_handle) {
}

if (async_load[? "id"] == _update_download_event_handle) {
if(_update_status == UPDATE_STATUS.FAILED)
return;
var status = async_load[? "status"];
var _err = false;
if (status == 1) {
if(_update_status != UPDATE_STATUS.DOWNLOADING) {
announcement_play("autoupdate_process_1");
Expand All @@ -45,9 +48,19 @@ if (async_load[? "id"] == _update_download_event_handle) {
_update_received = async_load[? "sizeDownloaded"];
}
else if(status == 0) {
start_update_unzip();
var _hstatus = string(async_load[? "http_status"]);
show_debug_message("Get https status:"+_hstatus);
if(string_char_at(_hstatus, 1) != "2")
_err = true;
else {
start_update_unzip();
}
}
else if(status < 0) {
_err = true;
}

if(_err) {
if(_update_status == UPDATE_STATUS.CHECKING_I)
fallback_update();
else {
Expand Down

0 comments on commit cca5a09

Please sign in to comment.