Define the icon font and icons in variables instead of scattering them
throughout the code to make it easy to change them in the future, or for
forks to change them. Also put the hex values in comments to easily
compare which icons in the font are unused, and explain how to get the
decimal values of the bytes.
Copied from ModernX.
This adds a format parameter to screenshot-raw command which controls
the format of the returned image data. In addition to the bgr0 format,
this adds support for 3 other formats: bgra, rgba, rgba64.
bgra is used by overlay-add command and several window systems.
rgba and rgba64 are used by several GPU APIs and are the formats
returned by the gpu and gpu-next screenshot code, which avoid the need
for further format conversion (see convert_image function).
rgba64 also adds the ability to acquire high bit depth screenshots
for screenshot-raw command.
When the monitor goes to sleep, the OpenAL context was not properly
handled, resulting in a null pointer dereference and a crash. This
fix ensures that the OpenAL context is created and set correctly,
avoiding crashes under these conditions.
Fixes: #15648
The server's protocol version is not available until a connection is
properly established. Currently the value of `PA_INVALID_INDEX` is printed
due to calling `pa_context_get_server_protocol_version()` before connecting.
Fix this by doing the call after the connection has been set up.
Fixes: f744aadb77 ("ao_pulse: dump library version etc.")
Add a script-opt to pause when console opens and unpause when it closes,
disabled by default.
This is particularly useful for selectors that take several seconds to
open so you don't have to guess when to pause, like the subtitle line
selector with embedded subtitles, or my script which lets you select
which lyrics to download after requesting them with curl.
Make this behave like the comment says it should, because currently when
you show oneshot stats and change file, stats are printed again and hide
--osd-playing-msg. This happens even if you hide the stats by
show-texting something else and change file before the timer expires.
Implement VOCTRL_GET_DISPLAY_FPS and VOCTRL_GET_DISPLAY_RES by returning
values obtained from Vulkan.
Currently, display fps and resolution info is not available in the
displayvk context. Display fps is needed for display sync to work
properly. The information is also used as the value of a few properties.
This slightly improves parity with the drm context.
Unlike font and border sizes, the default stats shadow offset is 0 like
--osd-shadow-offset, so it can be inherited from it by default to not
make users configure it in 2 places.
Since 0 and negative numbers are valid offsets, use infinity as the
placeholder for unconfigured values.
they were meant to be immutable. imported in swift as mutable pointer,
which leads to errors with the strict concurrency in swift 6.
make the pointers const.
they were never meant to be mutable and are imported as mutable vars
in swift. that causes errors with the strict concurrency in swift 6.
make them const/lets and immutable.
It is now handled internally by the libmpv profile.
Since `player` was the default option, the impact should be minimal, as it
is uncommon to override the default option with the same value.
yes/no args will function the same way as before this commit.
3dcc661de7 made the cursor reset to Default style to not apply the blur,
but \blur0 achieves that without resetting every user style. The cursor
can thus respect the user's --osd-back/shadow-color.
Following up 19537a4996, also respect the user-specified color in the
cursor. But the cursor is drawn as a border, so we actually need to use
--osd-color as the border color.
It was requested in
https://github.com/Samillion/ModernZ/issues/259#issuecomment-2556608926
to make console's shadow offset consistent with --osd-shadow-offset. Not
specifying shadow offsets achieves that. This disables console's shadow
by default but there is no reason console should default to having
shadows but the rest of the OSD shouldn't. Users who want shadows can
enable them in the whole OSD with --osd-shadow-offset. console-specific
shadow_{x,y}_offset script-opts can be added if someone requests them
later.
The previous commit changed --osd-back/shadow-color to nearly the same
one console was using. This allows unhardcoding it from there and using
--osd-back-color even with --osd-border-style=outline-and-shadow for
consistency with the rest of the OSD.
By default OSD and subs have no shadow, but if you do set a
--osd/sub-shadow-offset, the current default white shadow color looks
bad around white text with black border. Default to semitransparent
black instead. Use the same color box profiles were using to allow
removing it from there.
The lines in populate_log_with_matches()
if selected_match < first_match_to_print then
first_match_to_print = selected_match
will set first_match_to_print to 1 even if it is not set here since
handle_edit() sets selected_match = 1.
When console is opened with selectable items and a default item, the
default item is placed at the center. But if you type something and then
clear the line, the first item becomes the selected one. Make it select
the default item and place it in the center in this case too.
fixes problems with upcoming features DisableOutwardActorInference,
GlobalConcurrency and InferSendableFromCaptures for swift 6 strict
concurrency. enabled with -enable-upcoming-feature flag.
since we load covers/images directly in a our own thread and the quick
look thumbnailing also works asynchronously on its own thread, we need
sync/coordinate both threads. otherwise it would be possible that a
cover from a different file could overwrite the cover of the current
file.
to prevent this every cover generation has a unique timestamp and only
covers for the last cover timestamp will ever be shown.
we are also not interested in icon type thumbnails, since those are just
generic file type icons.
quick look thumbnails can only be generated if quick look can read those
files. files unknown to macOS don't work out of the box and you need to
install a quick look extension for this, "QuickLook Video" for mkv.