The receipt of WM_LBUTTONDOWN has nothing to do with desmume processor intensiveness. The problem is that windows does not even send the WM_LBUTTONDOWN until it has analyze more stylus data to determine whether it should interpret it as a WM_LBUTTONDOWN event. It will then send a big batch of messages. The code added in r3188 and r3189 is supposed to disable that logic, but for some reason it doesn't always work for other people.
Your approach might work where mine doesn't. Who knows? I think I tried your approach and ran into some problem with it and so ended up doing it the way I did it.
You seem to know a lot about the topic. This would be a good time to learn c++. Come on IRC if you need help.
]]>http://msdn.microsoft.com/en-us/library … tylus.aspx
See, what happens on tablets is that there's an "invisible window" layer that captures/manages your touches, and sends WM_LBUTTON events to whichever window you clicked. But since desmume is processor-intensive, it doesn't receive the generated WM_LBUTTON events all the time. NoGBA behaves the same. To circumvent this, you'd add a RealTimeStylus class to the window, so the window handles touch events directly. Therefore, you'd only need to click a DS button once, not scribble.
I tried adding it myself, but I can't figure out C/++ for the life of me (I'm PHP and C#, sorry!) Anybody mind figuring this out?
I think this should be relatively simple -- the basic idea is that RealTimeStylus captures your x and y coordinates and feeds that to ToDSScreenRelativeCoords(x,y,0) and NDS_setTouchPos(x, y) in main.cpp
-----------------------------------------
TL;DR You need at least Windows SDK v6.0. (For my info, I use SDK v7.0)
API Doc: http://msdn.microsoft.com/en-us/library … tylus.aspx
Relevant RealTimeStylus sample: C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\tabletpc\realtimestylusplugin\cpp
More specifically: COMRTSDlg.cpp (can't link, it triggers spam filter)
I think what happens is that you init RealTimeStylus first (line 129), and then you init "plugins" that go into RTS -- starting with PacketFilter. Not sure if CustomRenderer, GestureRecognizer, and DynamicRenderer are needed.
InitPacketFilter (line 234) is inited, at which point you feed it the ClientRect so that pen events aren't recorded outside the window. Then it gets plugged into the "plugin collection"
And that's all I know so far. If someone were to supply me with MFC headers (VS2008 Express doesn't include them, so I can't compile,) I can figure out more
]]>