SDL and touch screen

hi to everybody,
I’m using SDL for an application with a touch screen.
The TS has drivers that emulate a normal mouse, and it works
fine in SDL until I do not switch to full-screen mode.
Then becomes crazy…
the code snippet is:

SDL_PollEvent(&event);
if(event.type == SDL_MOUSEBUTTONUP)
{
unsigned int xMouse, yMouse;
xMouse = event.button.x;
yMouse = event.button.y;

etc. etc

the problem arises only in full screen mode
and is not related to the x and y positions!
It’s the mouse itself that jumps randomly through the screen
without any relation with the point I click onto.
Same code works perfectly in windows mode…

If anyone can help me pls send me and email
thank you in advance
bye
GCL

Hey Gian, when you say the mouse jumps randomly around the screen, are you
drawing your own mouse cursor and that’s what’s jumping around the screen or
is it the mouse cursor that is drawn for you that jumps all around the
screen?> ----- Original Message -----

From: sdl-bounces+atrix2=cox.net@libsdl.org
[mailto:sdl-bounces+atrix2=cox.net at libsdl.org] On Behalf Of gian carlo
lasagna
Sent: Tuesday, May 16, 2006 2:07 PM
To: sdl at libsdl.org
Subject: [SDL] SDL and touch screen

hi to everybody,
I’m using SDL for an application with a touch screen.
The TS has drivers that emulate a normal mouse, and it works
fine in SDL until I do not switch to full-screen mode.
Then becomes crazy…
the code snippet is:

SDL_PollEvent(&event);
if(event.type == SDL_MOUSEBUTTONUP)
{
unsigned int xMouse, yMouse;
xMouse = event.button.x;
yMouse = event.button.y;

etc. etc

the problem arises only in full screen mode
and is not related to the x and y positions!
It’s the mouse itself that jumps randomly through the screen
without any relation with the point I click onto.
Same code works perfectly in windows mode…

If anyone can help me pls send me and email
thank you in advance
bye
GCL


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Could the touch screen driver be still associated with the previous screen
resolution and not the new one ?

-WillOn 5/16/06, Alan Wolfe wrote:

Hey Gian, when you say the mouse jumps randomly around the screen, are you
drawing your own mouse cursor and that’s what’s jumping around the screen
or
is it the mouse cursor that is drawn for you that jumps all around the
screen?

-----Original Message-----
From: sdl-bounces+atrix2=cox.net at libsdl.org
[mailto:sdl-bounces+atrix2=cox.net at libsdl.org] On Behalf Of gian carlo
lasagna
Sent: Tuesday, May 16, 2006 2:07 PM
To: sdl at libsdl.org
Subject: [SDL] SDL and touch screen

hi to everybody,
I’m using SDL for an application with a touch screen.
The TS has drivers that emulate a normal mouse, and it works
fine in SDL until I do not switch to full-screen mode.
Then becomes crazy…
the code snippet is:

SDL_PollEvent(&event);
if(event.type == SDL_MOUSEBUTTONUP)
{
unsigned int xMouse, yMouse;
xMouse = event.button.x;
yMouse = event.button.y;

etc. etc

the problem arises only in full screen mode
and is not related to the x and y positions!
It’s the mouse itself that jumps randomly through the screen
without any relation with the point I click onto.
Same code works perfectly in windows mode…

If anyone can help me pls send me and email
thank you in advance
bye
GCL


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

What are you developing on? What is the touch screen? I have had simular issues using Linux (FC4) and SDL. The issue was the screen resolution set in the xorg.conf did not match what was set to the full screen parameters. I ajdusted this and restarted X and it worked fine after that.

Walt.> ----- Original Message -----

From: sdl-bounces+waltc=fleetwoodgaming.com@libsdl.org on behalf of Will Langford
Sent: Tue 5/16/2006 3:47 PM
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: Re: [SDL] SDL and touch screen

Could the touch screen driver be still associated with the previous screen
resolution and not the new one ?

-Will

On 5/16/06, Alan Wolfe wrote:

Hey Gian, when you say the mouse jumps randomly around the screen, are you
drawing your own mouse cursor and that’s what’s jumping around the screen
or
is it the mouse cursor that is drawn for you that jumps all around the
screen?

-----Original Message-----
From: sdl-bounces+atrix2=cox.net at libsdl.org
[mailto:sdl-bounces+atrix2=cox.net at libsdl.org] On Behalf Of gian carlo
lasagna
Sent: Tuesday, May 16, 2006 2:07 PM
To: sdl at libsdl.org
Subject: [SDL] SDL and touch screen

hi to everybody,
I’m using SDL for an application with a touch screen.
The TS has drivers that emulate a normal mouse, and it works
fine in SDL until I do not switch to full-screen mode.
Then becomes crazy…
the code snippet is:

SDL_PollEvent(&event);
if(event.type == SDL_MOUSEBUTTONUP)
{
unsigned int xMouse, yMouse;
xMouse = event.button.x;
yMouse = event.button.y;

etc. etc

the problem arises only in full screen mode
and is not related to the x and y positions!
It’s the mouse itself that jumps randomly through the screen
without any relation with the point I click onto.
Same code works perfectly in windows mode…

If anyone can help me pls send me and email
thank you in advance
bye
GCL


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/ms-tnef
Size: 3879 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060516/e41cab5e/attachment.bin

People using Tux Paint with MS Windows on tablet PCs had this problem.
Switching from DirectX to WinDIB drivers fixed it.
(See: http://www.newbreedsoftware.com/tuxpaint/docs/known_issues/ )On Tue, May 16, 2006 at 09:06:30PM +0000, gian carlo lasagna wrote:

hi to everybody,
I’m using SDL for an application with a touch screen.
The TS has drivers that emulate a normal mouse, and it works
fine in SDL until I do not switch to full-screen mode.


-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/

And, FWIW, SDL 1.2.10 now uses WinDIB by default, so this problem will just
’go away’. :)On Tue, May 16, 2006 at 02:56:36PM -0700, Bill Kendrick wrote:

People using Tux Paint with MS Windows on tablet PCs had this problem.
Switching from DirectX to WinDIB drivers fixed it.
(See: http://www.newbreedsoftware.com/tuxpaint/docs/known_issues/ )


-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/

Hey Gian, when you say the mouse jumps randomly around the screen, are you
drawing your own mouse cursor and that’s what’s jumping around the screen or
is it the mouse cursor that is drawn for you that jumps all around the
screen?

no, I do not draw anything, I just put my finger on the touch screen
and the mouse pointer instead of “coming” under my finger disappears
and reappears elsewhere randomly. No instruction used to do that.
Same code works fine if windowed.
As somebody said in this thread,
probably windib is the solution, other guys had the same problem,
now I try and let you know…
thanks
GCL

Hello Bill,

Wednesday, May 17, 2006, 6:46:52 PM, you wrote:

BK> And, FWIW, SDL 1.2.10 now uses WinDIB by default, so this problem will just
BK> ‘go away’. :slight_smile:

I don’t agree with this. This is degrading SDL performance on Windows
for no good reason. What would be better is an OS version check, if
the OS is NT4 or older, use windib, if not, use windx5.

The problem with this touch screen driver will be that it is not
reporting relative movement data correctly, which DirectInput uses.
This is a bug in their driver, not SDL.–
Best regards,
Peter mailto:@Peter_Mulholland

windib wasn’t really bumped up for older OSs, but rather new ones that
dx5 is more or less being phased out for dx8 or newer such as Windows
Server 2003, the x64 line, and Vista. The fact is that windib has the
broader reach, which, as I understand it, is the true goal of SDL. DX5
paths are still there and fully functional for anybody who wishes to use
them, they are just no longer the default. I hardly feel windib is
degrading for input, but I can see arguements for display.

–William

Peter Mulholland wrote:> I don’t agree with this. This is degrading SDL performance on Windows

for no good reason. What would be better is an OS version check, if
the OS is NT4 or older, use windib, if not, use windx5

Hello William,

Thursday, May 18, 2006, 9:27:53 AM, you wrote:

WW> windib wasn’t really bumped up for older OSs, but rather new ones that
WW> dx5 is more or less being phased out for dx8 or newer such as Windows
WW> Server 2003, the x64 line, and Vista.

The older interfaces will still be supported. I also think this would
be a good time to update the DX5 code in SDL to at least DX7.

WW> The fact is that windib has the broader reach, which, as I understand it,
WW> is the true goal of SDL.

My understanding was that SDL is for creating games and multimedia
product. Games want the best performance possible.

WW> DX5 paths are still there and fully functional for anybody who wishes
WW> to use them, they are just no longer the default.

The method for selecting which driver to use doesn’t really fit in
with how Win32 does things. If there was an API to allow a driver to
be selected other than environment variables, this wouldn’t be so bad.

WW> I hardly feel windib is degrading for input, but I can see arguements
WW> for display.

It degrades input latency, as well as display speed and sound speed
(the old WaveOut API is dreadfully slow)–
Best regards,
Peter mailto:@Peter_Mulholland

I don’t agree with this. This is degrading SDL performance on Windows
for no good reason. What would be better is an OS version check, if
the OS is NT4 or older, use windib, if not, use windx5.

FYI, with the release of DirectX 10, the windows drivers will get an
overhaul, cleanly splitting the windib and directx drivers, and upgrading
the directx driver to DirectX 10.

This is a ways out yet, and I’m still going to watch what happens with
the Windows Vista and DirectX 10 releases.

See ya,
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Hello !

I don’t agree with this. This is degrading SDL performance on Windows
for no good reason. What would be better is an OS version check, if the
OS is NT4 or older, use windib, if not, use windx5.

FYI, with the release of DirectX 10, the windows drivers will get an
overhaul, cleanly splitting the windib and directx drivers, and upgrading
the directx driver to DirectX 10.

This is a ways out yet, and I’m still going to watch what happens with
the Windows Vista and DirectX 10 releases.

Yup. It is worth to wait the time till Vista comes out.
It would be work for nothing to write a driver now and then
when Vista comes out maybe something important changes and
you may have to throw the driver away.

At the moment everybody should be able to get what he wants running
with the WinDIB or the DX5 driver. If not this should be fixed.

CU

Hello Sam,

Thursday, May 18, 2006, 1:40:40 PM, you wrote:

SL> FYI, with the release of DirectX 10, the windows drivers will get an
SL> overhaul, cleanly splitting the windib and directx drivers, and upgrading
SL> the directx driver to DirectX 10.

SL> This is a ways out yet, and I’m still going to watch what happens with
SL> the Windows Vista and DirectX 10 releases.

Have Microsoft said anywhere that they’re not going to have the older
DirectX API’s available in Vista? I don’t see them doing that as then
no games would run on it at all! I think it’s safe to assume that the
DirectX7 interfaces will still be in Vista.

To be honest, the dx5 driver should’ve been updated long ago to DX7.
If my memory serves me right, this covers 95, 98, ME, 2K and XP. NT4
has lousy DirectX support no matter which way you slice it, so that
will always be better with windib anyway.–
Best regards,
Peter mailto:@Peter_Mulholland

Hello,

FYI, with the release of DirectX 10, the windows drivers will get an
overhaul, cleanly splitting the windib and directx drivers, and upgrading
the directx driver to DirectX 10.

From what I’ve read, DX10 will require Vista because of its new driver
architecture.

So we’ll end up with the DX10 SDL video driver for Vista+ and windib for all
previous versions of Windows, is that right?

Peter

So we’ll end up with the DX10 SDL video driver for Vista+ and windib for all
previous versions of Windows, is that right?

More than likely. This is well out though, and may very well change.

See ya,
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

I don’t agree with this. This is degrading SDL performance on Windows
for no good reason. What would be better is an OS version check, if
the OS is NT4 or older, use windib, if not, use windx5.

Actually, if you get too new, dx5 starts to break, also.

DirectDraw interfaces are getting less and less well-maintained. We
switched to WinDib as the default it because dx5 was breaking on more
and more Windows machines, and not necessarily all Win9x boxes.

Newer hardware is going to get slower and slower when you aren’t using
the 3D interfaces to render, too.

We’ll eventually have to use glSDL or a Direct3D equivalent on Windows
to get get both good performance and a reasonable stability across all
platforms, and/or encourage developers to use SDL_OPENGL instead of 2D
surfaces.

If you think it’s important for your game to use the windx5 target,
force it by setting the SDL_VIDEODRIVER environment variable in your
program before calling SDL_Init(). But the default is reasonable, I think.

–ryan.

It degrades input latency, as well as display speed and sound speed
(the old WaveOut API is dreadfully slow)

Fwiw, I’ve lost count of the number of big successful Triple-A titles
I’ve worked on that don’t use DirectInput.

I can also recall a few that replaced their DirectInput code with
standard windows events…for many of the same reasons SDL switched to
WinDib.

Input latency is not a big deal, in my experience.

(although, yeah, the DirectDraw vs WinDib rendering IS a performance
hit, though…)

–ryan.