improve windows debug conformity
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Failing after 47s
ContinuousDelivery / windows (push) Has been cancelled
ContinuousDelivery / windows-asan (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run

This commit is contained in:
Green Sky 2024-05-28 22:38:52 +02:00
parent 2d4729a877
commit 20e9fdb33e
No known key found for this signature in database
3 changed files with 3 additions and 4 deletions

View File

@ -151,8 +151,7 @@ void SendImagePopup::sendMemory(
} }
// copy paste data to memory // copy paste data to memory
original_data.clear(); original_data = {data, data+data_size};
original_data.insert(original_data.begin(), data, data+data_size);
if (!load()) { if (!load()) {
std::cerr << "SIP: failed to load image from memory\n"; std::cerr << "SIP: failed to load image from memory\n";

View File

@ -41,7 +41,7 @@ ImageLoaderQOI::ImageResult ImageLoaderQOI::loadFromMemoryRGBA(const uint8_t* da
auto& new_frame = res.frames.emplace_back(); auto& new_frame = res.frames.emplace_back();
new_frame.ms = 0; new_frame.ms = 0;
new_frame.data.insert(new_frame.data.cbegin(), img_data, img_data+(desc.width*desc.height*4)); new_frame.data = {img_data, img_data+(desc.width*desc.height*4)};
free(img_data); free(img_data);
return res; return res;

View File

@ -47,7 +47,7 @@ ImageLoaderSDLBMP::ImageResult ImageLoaderSDLBMP::loadFromMemoryRGBA(const uint8
auto& new_frame = res.frames.emplace_back(); auto& new_frame = res.frames.emplace_back();
new_frame.ms = 0; new_frame.ms = 0;
new_frame.data.insert(new_frame.data.cbegin(), (const uint8_t*)conv_surf->pixels, ((const uint8_t*)conv_surf->pixels) + (surf->w*surf->h*4)); new_frame.data = {(const uint8_t*)conv_surf->pixels, ((const uint8_t*)conv_surf->pixels) + (surf->w*surf->h*4)};
SDL_UnlockSurface(conv_surf); SDL_UnlockSurface(conv_surf);
SDL_DestroySurface(conv_surf); SDL_DestroySurface(conv_surf);