The warning is about using a virtual member function in the destructor
where it can be overridden by a derived class so in this case the
derived version wouldn't be called.
Just testing clang-tidy to see if we can add something in the CI.
Before this fix, an incomplete custom theme or an outdated official
theme could cause a crash during Aseprite startup.
This fix does not alert the artist the problem of the theme.
Simply avoid the crash.
We were incorrectly saving a wrong number of entries for palettes with
more than 256 colors in color2 chunk, anyway it doesn't make sense to
use this chunks as it doesn't support more than 256 colors. So we
removed it for this case.
We've also removed the palette chunk for cases where it's not required
at all, e.g. when we have less than 256 colors and doesn't have alpha
channel, it makes sense to use the color2 chunk as it's smaller in the
output file.
Some minor changes in this commit includes the usage of
std::unique_ptr for the Pimpl-idiom in steam::SteamAPI class and
renaming the SteamAPI::initialized() to SteamAPI::isInitialized() to
avoid confusion reading the code.
Forum post:
https://steamcommunity.com/app/431730/discussions/2/7260435303111061192/
Prior to this fix, Aseprite was hiding some sessions to recover,
resulting in additional support for users.
To display available recovery sessions, Aseprite only checked if
the session belonged to any running process on the OS via the
'pid' number.
Steam API/DLL now contains a SteamAPI_InitSafe() function for backward
compatibility similar to the old SteamAPI_Init(). The official
"steam_api.h" header file contains inline-defined functions for
SteamAPI_Init() and SteamAPI_InitEx() but both use the published
SteamInternal_SteamAPI_Init() function (we don't need it, I guess, so
SteamAPI_InitSafe() is enough for us).
This fixes the ASSERT((mnemonic & kMnemonicModifiersMask) == 0) in
Widget::setMnemonic() function, but as a future task we should try to
process/convert unicode chars like 'Ú' as a simplified form,
i.e. pressing 'u' should match 'ú' for mnemonics.
As we've moved all the translations to the strings
repo (06a852d1d4), to facilitate the
i18n work now we load translations from "data/strings" and from
"data/strings.git" folders, where "strings.git" is a clone of the
strings repo (https://github.com/aseprite/strings.git) in
"build/bin/data/strings.git".
This clone is executed automatically in the cmake configuration stage
so it's transparent for the developer and the result is like having
the translations available in the same "aseprite" repo.
Without this when the playback cue is on the highest frame in "PlayAll"
mode it doesn't take into account the direction of the current tag that
is being played and assumes the end of the animation was reached
This is due zlib returning Z_OK (instead of Z_STREAM_END) after
inflate() when all the output buffer was filled (avail_out = 0) but it
reports like there is still available uncompressed data (avail_in > 0).
It makes no sense but an extra inflate() call with avail_out=0
consumes the whole avail_in and the expected Z_STREAM_END is finally
reported.
Without this an exception in DelayedMouseMove::commitMouseMove() could
produce (e.g.) the crash in #3818. This same error handling was
already done for Editor::onProcessMessage() in
DocView::onProcessMessage() to avoid crashing due unhandled exceptions
in Editor message processing.
Regression introduced with 8722c8ec16
and d3562b140c.
Our re-entrant RWLock implementation is tricky because it doesn't
support to unlock in different order than it was locked.
E.g. If we create a DocWriter (e.g. paste command), and try to create
a DocReader (e.g. PixelsMovement) inside the DocWriter scope, the
reader will return a LockResult::Reentrant, but if we unlock the
write, then the reader cannot be used to upgradeToWrite() because the
lock will have just 0 locks (the re-entrant one didn't modify the
count of the RWLock). This is because it was thought that the
DocReader was going to be unlocked before the writer lock (in the
exact inverse order).
Basically these re-entrant RWLocks will not work fine if we mix up the
order of locks/unlocks in the same thread.
With re-entrant RWLocks we can try to lock the document on each
transaction/command/modification. This fixes several problems running
scripts that weren't locking the sprite in an app.transaction() call.
This already fixes a lot of possible problems that can happen when a
script is running and modifying some part of a sprite that is being
backed up in a background thread.
We still need some work to being able to lock a sprite two or more
times in the same thread to write it. E.g. an app.transaction() should
lock the sprite for write access, but the script transaction function
could call a command, and that command could use a ContextWriter to
lock the sprite again. At the moment this is not possible because we
need a re-entrant RWLock implementation.
Given error:
Could not parse translation base file: File contains no section
headers. file: '<???>', line: 10 'display_name = English\n'
It looks like a known issue: https://github.com/WeblateOrg/weblate/issues/9702
Without this fix a recovering thread could get stuck in an infinite loop when reading the slices of a sprite created with a doc format version lesser than 2.
This fixes a problem where the smaller brush size of the dynamics was
used for tools like line/rectangle/etc. where the dynamics option
aren't used.
We've added some comments for a possible future #4186 too,
implementing dynamics for the contour tool (which is freehand, but the
result is filled).
We were loading the whole list of dithering matrices on each mouse
move now just by chance. As a future refactor we should improve the
handling of dynamics options, e.g. avoid accessing preferences/
rebuilding the tools::DynamicsOptions object on each mouse movement.
We are not sure, but due to new bug reports about a lagging mouse
movement (#4174), it might be because some memory cache issues: having
the rows array at the end of the pixels data might not be the best
decision.
It was moved at the end because we didn't need that rows array to be
aligned, only the pixels data. But with this patch we're trying to see
if this fixes the issue. So now we moved back the rows array at the
beginning of the image buffer as it was before aeeef8e255
On Apple Silicon we can hide "-arm64", and on PCs we can hide "-x64".
For Intel chips on Mac we'll show "(x64)" suffix, and on PCs we'll
show "(x86)" for 32-bit version.