It’s already 2AM and I must go to sleep soon !
Yesterday (or was it two days ago ?) I released the 0.2a and today the 0.3a of DSharingu.
The new version allows for remote control through the mouse. A problem arises when opening a modal dialog on the remote’s instance of DSharingu. For example, one clicks to bring the Settings dialog. Being that a standard modal dialog, the application will stop waiting for it to be dismissed.. therefore not sending screen updates. So the remote can still move the mouse (mouse input is running on a separate thread already), but can’t have visual feedback !
It’s not a major issue, but it needs to be solved. The solution is to run a separate thread for the screen-grabbing and sending system.
Screen grabbing is done with DirectDraw. That’s the only place where I use DDraw, so I don’t really need to share any of those COM objects. Data transmission however is based on an API layer of mine.. which inevitably needs to become multi-thread safe.
So far I’ve been using Win32 mutexes, however, I’ve been reading that the Critical Section method is possibly better. Performs better and it runs in user-space (doesn’t put on hold other processes, like I feared it would do).
I found a nice system, involving a couple of classes and a macro 8) on The Code Guru. It’s nothing too new, but a nice way to minimize the code modifications.
Yesterday I went to the gym, after probably 2 weeks of absence.. and I was 70.35 8) That’s not bad at all. It comes to reinforce my belief that it’s the forced daily lunch routine what really makes me fat (recently, I had several holidays).
Better go to sleep now !
zzzzzzzzzz
Posted by Davide Pasca in Programming, Diary
