Merge branch 'main' into new-index-but-better

This commit is contained in:
HJfod 2024-03-10 11:26:13 +02:00
commit be5e892cbe
3 changed files with 21 additions and 7 deletions

View file

@ -1,5 +1,16 @@
# Geode Changelog # Geode Changelog
## v2.0.0-beta.22
* Add `Patch::updateBytes` to update a patch (ba648340)
* (Possibly) fix random curl crashes (dd440433, 1fb12f2d, 6cd6e4d0, 8998041e, 2be58549)
* This was done by using a build with the thread resolver enabled, possibly fixing race conditions when initing curl
* Prevent `GeodeUpdater.exe` from hanging (d139049b)
* Fix a duplicated node ID in LoadingLayer (#574)
* Fix minor memory leak in AsyncWebRequest (52ea6ea5)
* Fix Wine crashing when launching via terminal (#501)
* Use C locale instead of US (#566)
* Impostor playlayer fix (#562)
## v2.0.0-beta.21 ## v2.0.0-beta.21
* Fix `numFromString` for floating point numbers (6d91804) * Fix `numFromString` for floating point numbers (6d91804)
* Fix `ScrollLayer` cropping (5c8ee29) * Fix `ScrollLayer` cropping (5c8ee29)

View file

@ -1 +1 @@
2.0.0-beta.21 2.0.0-beta.22

View file

@ -170,7 +170,7 @@ private:
bool m_sent = false; bool m_sent = false;
std::variant<std::monostate, std::ostream*, ghc::filesystem::path> m_target; std::variant<std::monostate, std::ostream*, ghc::filesystem::path> m_target;
std::vector<std::string> m_httpHeaders; std::vector<std::string> m_httpHeaders;
template <class T> template <class T>
friend class AsyncWebResult; friend class AsyncWebResult;
@ -358,8 +358,8 @@ SentAsyncWebRequest::Impl::Impl(SentAsyncWebRequest* self, AsyncWebRequest const
+[](void* ptr, double total, double now, double, double) -> int { +[](void* ptr, double total, double now, double, double) -> int {
auto data = static_cast<ProgressData*>(ptr); auto data = static_cast<ProgressData*>(ptr);
auto lock = std::unique_lock(data->self->m_statusMutex); auto lock = std::unique_lock(data->self->m_statusMutex);
data->self->m_statusCV.wait(lock, [data]() { data->self->m_statusCV.wait(lock, [data]() {
return !data->self->m_paused; return !data->self->m_paused;
}); });
if (data->self->m_cancelled) { if (data->self->m_cancelled) {
if (data->file) { if (data->file) {
@ -381,6 +381,10 @@ SentAsyncWebRequest::Impl::Impl(SentAsyncWebRequest* self, AsyncWebRequest const
); );
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &data); curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &data);
auto res = curl_easy_perform(curl); auto res = curl_easy_perform(curl);
// free the header list
curl_slist_free_all(headers);
long code = 0; long code = 0;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code); curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
if (res != CURLE_OK) { if (res != CURLE_OK) {
@ -396,7 +400,6 @@ SentAsyncWebRequest::Impl::Impl(SentAsyncWebRequest* self, AsyncWebRequest const
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
return this->error(response_str, code); return this->error(response_str, code);
} }
curl_slist_free_all(headers);
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
AWAIT_RESUME(); AWAIT_RESUME();
@ -469,8 +472,8 @@ bool SentAsyncWebRequest::Impl::finished() const {
void SentAsyncWebRequest::Impl::error(std::string const& error, int code) { void SentAsyncWebRequest::Impl::error(std::string const& error, int code) {
auto lock = std::unique_lock(m_statusMutex); auto lock = std::unique_lock(m_statusMutex);
m_statusCV.wait(lock, [this]() { m_statusCV.wait(lock, [this]() {
return !m_paused; return !m_paused;
}); });
Loader::get()->queueInMainThread([this, error, code]() { Loader::get()->queueInMainThread([this, error, code]() {
{ {