Skip to content

Why do you return MPV_EVENT_NONE2 when mpv_event_id is MPV_EVENT_NONE in Swift #14899

Closed Answered by Akemi
internelp asked this question in Q&A
Discussion options

You must be logged in to vote

this is just a typo, on german keyboards shift+2 = ". probably hit it twice by accident. though it won't break anything. it's only internally used as an dict index, or rather adding a string representation to the mpv_event_id struct (if you 'cast' to string, print it).

though we don't really print that anywhere, so it must be from your end.

anyway in this case a raw mpv_event was printed with print(). the event_id struct value is of type mpv_event_id. since the string representation of mpv_event_id was implemented in that extension, print() is able to pretty print it. without that extension it would look like: mpv_event(event_id: __C.mpv_event_id(rawValue: 0), error: 0, reply_userdata: 0,…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@internelp
Comment options

@Akemi
Comment options

Akemi Sep 23, 2024
Collaborator

Answer selected by internelp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants