I recently got a new tablet PC and trying to play openxcom windows daily build, but when using touch and active stylus in fullscreen the mouse cursor gets offset making it basically unusable. Works fine in windowed mode.
I've had his issue in the past with SDL based games on various devices with absolute pointing too.
Any ideas how to fix this?
EDIT:
Tried setting environment variable SDL_MOUSE_RELATIVE=0 to no effect.
grafx2 seems to have solved this problem:
https://code.google.com/p/grafx2/issues/detail?id=317#c5 diffEDIT2:
Problem also occurs on my linux desktop with my Intuos.
The following change to Cursor.cpp seems to do the trick:
Cursor::Cursor(int width, int height, int x, int y) : Surface(width, height, x, y), _color(0)
{
SDL_ShowCursor(SDL_ENABLE);
unsigned char cursor = 0;
SDL_SetCursor(SDL_CreateCursor(&cursor, &cursor, 1,1,0,0));
}
Cursor::~Cursor()
{
SDL_FreeCursor(SDL_GetCursor());
}
I'm sure it's not the best place for the code, you don't need to do this every time you create a cursor, just once at startup but it works as a quick hack.
EDIT3:
Okay, moved that code into Game.cpp in the Game constructor and destructor and remove the "SDL_ShowCursor(SDL_DISABLE);" line from the Cursor constructor and it still seems to work fine.
EDIT4:
Forked on github and sent pull request.