Hey, we have forums!

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.


Messages - Wace

Pages: [1]
1
Support / Re: Tablet support?
« on: April 06, 2008, 01:01:02 am »
Apologies for bumping. Felt there was still some need to solve this.

At least my Thinkpad does not contain similar setup wizard (Plus Wacom's drivers break its pressure sensitivity for some reason) so the pen -> mouse solution doesn't work for me (And other thinkpad users I guess). Also I'd think the Wacom solution is prone going out of sync if the pen is lifted too far from the surface.

Fortunately Aquaria uses open source library for input, so changing the source and recompiling it isn't that hard.

For those who want to do it themselves:
Get sources from SDL homepage. The mouse handling is located in src/events/sdl_mouse.c. Changing the pointer is moved by incrementing its position on each update:
x = SDL_MouseX + x
y = SDL_MouseY + y

To make positioning absolute, removing these lines works. This stops mouse from staying at edges, but makes it misaligned. Origin of mouse is in middle of screen and origin of cursor is at top left. Changing the two above lines into
x = x + (SDL_VideoSurface->w /2);
y = y + (SDL_VideoSurface->h /2);

fixes the problem. Worth mentioning though, that after this using normal mouse is not possible.

Copy the SDL.dll into Aquaria directory (Backup original, so you can switch it for when you want to use normal mouse!)

Compiled library: http://jubjub.homeip.net/www/files/SDL.dll
Changed source: http://jubjub.homeip.net/www/files/SDL-1.2.13-tablet.rar
The source is under LGPL.

Note: I haven't given it very extensive testing, and only with the demo (Wah! Wants working credit card!). And in case this has been fixed in one of the patches for full version, it can be ignored. Also tablet clicks are sometimes too quick for Aquaria to register them, atleast for me. So if you have difficulties clicking with tablet, try clicking slower.

- Wace

Edit: I hope this doesn't needlessly bump the post. Saw some 404's in web logs and figured the urls here weren't updated. Fixed now.

Pages: [1]