On Tue, 22 Oct 2019 at 20:44, Paul Gofman gofmanp@gmail.com wrote:
- for (i = 0; i < 3; ++i)
- {
while (IDirect3DQuery9_GetData(event_query, NULL, 0, D3DGETDATA_FLUSH) == S_FALSE)
;
This kind of loop is a bit unfortunate, since it can potentially spin infinitely if someone managed to e.g. break event queries, but also because it can generate a lot of data if you were to turn on the appropriate debug channels. You should probably use a bounded loop with a Sleep(), like we do in device.c. (And we're using that in enough places now that it should probably be a helper function.)