On Fri Nov 11 21:26:14 2022 +0000, Zebediah Figura wrote:
> I think we'd still need that GetStreamSelected() check, though, given
> we're looping over all the streams here?
I don't think we need to check it here anymore with the latest version. Deselected streams will never have pending read requests (or they will shortly complete it after deselection, with either error or a last sample).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1311#note_15680
On Fri Nov 11 21:23:39 2022 +0000, Zebediah Figura wrote:
> > First because it's how it's supposed to be.
> I initially thought that we weren't actually running any visible
> callbacks on these read threads, but I guess the allocation callbacks
> are coming from here. Windows really spawns two threads for each stream? Sheesh.
Yes.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1311#note_15679
On Fri Nov 11 21:17:44 2022 +0000, Zebediah Figura wrote:
> Hmm, I never tested selecting streams while running. If that's supposed
> to work it may be better just to leave it as is.
Yeah, starting / stopping threads dynamically didn't seem like a good idea and it's easier to check the correctness with all stream threads started on open / stopped on close.
So instead I keep the thread running but only emit read requests to selected streams. When a stream is deselected, eventually dynamically, it will either fail its read request with `NS_E_NO_MORE_SAMPLES`, or returns a last sample if that happened before, but will then stop receiving read requests.
When a stream is selected again, a read request will be emitted and it will resume reading.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1311#note_15678
On Fri Nov 11 21:18:28 2022 +0000, Zebediah Figura wrote:
> Yeah, if we need to do this to prevent a deadlock, that sounds to me
> like something we need to solve on the sync reader side.
I dropped it for now.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1311#note_15677
Overwatch 2 verifies that every kernel callback that is run, lives in user32. Introduce a callback in user32 that just forwards to the other modules' callbacks.
--
v14: user32: Remove NtUserDriverCallback* kernel callbacks.
winex11.drv: Route kernel callbacks through user32.
winex11.drv: Pass a struct to x11drv_ime_set_result.
winex11.drv: Pass a struct to x11drv_dnd_post_drop.
winemac.drv: Route kernel callbacks through user32.
wineandroid.drv: Route kernel callbacks through user32.
opengl32: Route kernel callbacks through user32.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1180