Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - takai

Pages: 1
1
Wiimote Interactive Whiteboard / Quick and Easy Right-click solution
« on: July 20, 2008, 08:47:29 PM »
Right, i havnt been around for a little bit as real life has been chewing up my time, but today i had need to use Windows on my Macbook which only has one mouse button. Normally i get aroudn this by plugging in a mouse, but i had left mine at home today.

After a bit of scrounging i found this program: http://livecn.huasing.org/imouse/

Basically allows for a rightclick action after 0.3s of holdingn the mouse in the same spot. I havnt tested it with the Wiimote but it could be very useful.

2
Ive been noticing a fair few people having issues with WW0.2 and all the mods based on these. Its always under vista, and involves the mouse control not working but calibration does.

Now the bit which threw me for a while, is that its actually not with Vista, but with Vista64bit. Which im guessing some people dont even know that they are running due to it being preinstalled on their computer.

Anyway, the problem lies in the fact that the pointers in x64 windows are 8bit pointers, rather than 4bit in x32. The INPUT struct is therefore offset by the wrong amount, so the mouse events fall into the "type" bit, and is ignored.

The quick fix for it is to simply replace this code:
Code: [Select]
[StructLayout(LayoutKind.Explicit, Size = 28)]
        public struct INPUT
        {
            [FieldOffset(0)]
            public int type;
            [FieldOffset(4)] //*
            public MOUSEINPUT mi;
            [FieldOffset(4)] //*
            public KEYBDINPUT ki;
            [FieldOffset(4)] //*
            public HARDWAREINPUT hi;
        }
with this
Code: [Select]
[StructLayout(LayoutKind.Explicit, Size = 28)]
        public struct INPUT
        {
            [FieldOffset(0)]
            public int type;
            [FieldOffset(8)] //*
            public MOUSEINPUT mi;
            [FieldOffset(8)] //*
            public KEYBDINPUT ki;
            [FieldOffset(8)] //*
            public HARDWAREINPUT hi;
        }

The longer term solution is a bit more complex, but because of the oddness of C# you cant just declare sizeof(IntPtr), and im trying to figure out a better solution than declaring two structs and using which ever one is appropriate for the platform.
Ill try and figure out a way to modify the struct sizing on load.

3
Ok, just a quick question, and im sure its been covered somewhere else its so simple, but i cant find anything even through the search function.

Just using my WiiBoard on a projector, which is all fine and dandy, but the other day i wanted to use it on my projector while being able to display a skype call on my laptop monitor, but i couldnt figure out how to get the secondary display to be calibrated, it always displays the calibration on the primary display.

Now i have got it working by setting my secondary display to the primary and then making my laptop LCD the secondary, but thats a clunky workaround. Anyone have a better one?

Pages: 1