Mercurial > sdl-ios-xcode
view SDL.qpg.in @ 1584:b786d9c15e42
Fixed bug #61
Date: Mon, 24 Feb 2003 13:35:11 +0800
From: "Leonidas"
Subject: [SDL] Re: Trigger mouse wheel event -- not in X-environment
I have looked into the codes for the IMPS/2 mouse wheel mode of fbcon driver.
But I found something weird.
Here's the original codes to set a mouse device into IMPS/2 mode in libSDL.
In the file src/video/fbcon/SDL_fbevents.c
In function static int set_imps2_mode(int fd)
...
Uint8 set_imps2[] = {0xf3, 200, 0xf3, 100, 0xf3, 80};
Uint8 reset = 0xff;
fd_set fdset;
struct timeval tv;
int retval = 0;
// Set mouse device fd into IMPS/2 mode
if ( write(fd, &set_imps2, sizeof(set_imps2)) == sizeof(set_imps2) ) {
// ??? then RESET it..???
if (write(fd, &reset, sizeof (reset)) == sizeof (reset) ) {
retval = 1;
}
}
...........
Since it sets IMPS/2 mode then reset it, so you will never get a mouse into
IMPS/2 mode to use its wheel.
What I did to make the wheel usable is remove the RESET codes.
....
if ( write(fd, &set_imps2, sizeof(set_imps2)) == sizeof(set_imps2) ) {
/*
if (write(fd, &reset, sizeof (reset)) == sizeof (reset) ) {
}
*/
retval = 1;
}
....
And in FB_OpenMouse(_THIS)
Make the device /dev/psaux to be setted into imps2 mode such that it can be
detected its a imps/2 mouse or not.
(my mouse device is on ps2, but the codes only set /dev/input/mice device
originally)
Then I have done, I can use the mouse wheel when SDL uses frame buff driver.
I dont exactly know I did right or wrong, I just change it for my usuage.
Correct me please, if I did something wrong.
Best regards,
Li Tsung Lin
IAP Product Dept. Engineer
EeRise Corp. (Image Processing System, Computer Vision System)
Hsin Tien, Taipei Hsien, Taiwan, R.O.C.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 22 Mar 2006 07:22:40 +0000 |
parents | c07c6ef7c93e |
children |
line wrap: on
line source
<QPG:Generation> <QPG:Options> <QPG:User unattended="yes" verbosity="0" listfiles="yes"/> <QPG:Defaults type="qnx_package"/> <QPG:Source></QPG:Source> <QPG:Release date="today" number="+"/> <QPG:Build></QPG:Build> <QPG:FileSorting strip="yes"/> <QPG:Package targets="standart"/> <QPG:Repository generate="yes"/> <QPG:FinalDir></QPG:FinalDir> <QPG:Cleanup></QPG:Cleanup> </QPG:Options> <QPG:Responsible> <QPG:Company>QNX.ORG.RU Community</QPG:Company> <QPG:Department></QPG:Department> <QPG:Group></QPG:Group> <QPG:Team>QNX.ORG.RU Team</QPG:Team> <QPG:Employee>Mike Gorchak</QPG:Employee> <QPG:EmailAddress>mike@malva.ua</QPG:EmailAddress> </QPG:Responsible> <QPG:Values> <QPG:Files> <QPG:Add file="./COPYING" install="LicenseUrl/" handling="repdata"/> <QPG:Add permissions="0755" file="./src/.libs/libSDL-@SDL_MAJOR_VERSION@.@SDL_MINOR_VERSION@.so.@LT_AGE@" install="/usr/lib/"/> <QPG:Add filetype="symlink" file="libSDL.so" install="/usr/lib/" linkto="libSDL-@SDL_MAJOR_VERSION@.@SDL_MINOR_VERSION@.so.@LT_AGE@"/> <QPG:Add permissions="0644" file="./src/.libs/libSDL.a" install="/usr/lib/"/> <QPG:Add permissions="0644" file="./src/.libs/libSDL.lai" install="/usr/lib/libSDL.la"/> <QPG:Add permissions="0644" file="./src/main/libSDLmain.a" install="/usr/lib/"/> <QPG:Add permissions="0644" file="./include/*.h" install="/usr/include/SDL/"/> <QPG:Add permissions="0755" file="./sdl-config" install="/usr/bin/"/> <QPG:Add permissions="0644" file="./BUGS" install="/usr/share/doc/SDL12/"/> <QPG:Add permissions="0644" file="./COPYING" install="/usr/share/doc/SDL12/"/> <QPG:Add permissions="0644" file="./CREDITS" install="/usr/share/doc/SDL12/"/> <QPG:Add permissions="0644" file="./INSTALL" install="/usr/share/doc/SDL12/"/> <QPG:Add permissions="0644" file="./README" install="/usr/share/doc/SDL12/"/> <QPG:Add permissions="0644" file="./README-SDL.txt" install="/usr/share/doc/SDL12/"/> <QPG:Add permissions="0644" file="./README.CVS" install="/usr/share/doc/SDL12/"/> <QPG:Add permissions="0644" file="./README.QNX" install="/usr/share/doc/SDL12/"/> <QPG:Add permissions="0644" file="./TODO" install="/usr/share/doc/SDL12/"/> <QPG:Add permissions="0644" file="./WhatsNew" install="/usr/share/doc/SDL12/"/> <QPG:Add permissions="0644" file="./docs.html" install="/usr/share/doc/SDL12/Changes.html"/> <QPG:Add permissions="0644" file="./docs/index.html" install="/usr/share/doc/SDL12/docs/"/> <QPG:Add permissions="0644" file="./docs/html/*.html" install="/usr/share/doc/SDL12/docs/html/"/> <QPG:Add permissions="0644" file="./docs/man3/*.3" install="/usr/share/man/man3/"/> <QPG:Add permissions="0644" file="./sdl.m4" install="/usr/share/aclocal/"/> </QPG:Files> <QPG:PackageFilter> <QPM:PackageManifest> <QPM:PackageDescription> <QPM:PackageType>Library</QPM:PackageType> <QPM:PackageName>SDL</QPM:PackageName> <QPM:PackageReleaseNumber>1</QPM:PackageReleaseNumber> <QPM:PackageRepository>http://qnx.org.ru/repository</QPM:PackageRepository> <QPM:FileVersion>2.6</QPM:FileVersion> </QPM:PackageDescription> <QPM:ProductDescription> <QPM:ProductName>Simple DirectMedia Layer (SDL)</QPM:ProductName> <QPM:ProductIdentifier>SDL</QPM:ProductIdentifier> <QPM:ProductEmail>slouken@libsdl.org</QPM:ProductEmail> <QPM:VendorName>Public</QPM:VendorName> <QPM:VendorInstallName>public</QPM:VendorInstallName> <QPM:VendorURL>http://www.libsdl.org</QPM:VendorURL> <QPM:VendorEmbedURL/> <QPM:VendorEmail>slouken@libsdl.org</QPM:VendorEmail> <QPM:AuthorName>Sam Lantinga</QPM:AuthorName> <QPM:AuthorURL>http://www.libsdl.org</QPM:AuthorURL> <QPM:AuthorEmbedURL/> <QPM:AuthorEmail>slouken@libsdl.org</QPM:AuthorEmail> <QPM:ProductIconSmall/> <QPM:ProductIconLarge/> <QPM:ProductDescriptionShort>This is the Simple DirectMedia Layer (SDL), a generic API that provides low level access to audio, keyboard, mouse, and display framebuffer across multiple platforms.</QPM:ProductDescriptionShort> <QPM:ProductDescriptionLong>This is the Simple DirectMedia Layer (SDL), a generic API that provides low level access to audio, keyboard, mouse, and display framebuffer across multiple platforms. This is the libraries, include files and other resources you can use to develop and run SDL applications.</QPM:ProductDescriptionLong> <QPM:ProductDescriptionURL>http://www.libsdl.org</QPM:ProductDescriptionURL> <QPM:ProductDescriptionEmbedURL/> </QPM:ProductDescription> <QPM:ReleaseDescription> <QPM:ReleaseVersion>@VERSION@</QPM:ReleaseVersion> <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency> <QPM:ReleaseStability>Stable</QPM:ReleaseStability> <QPM:ReleaseNoteMinor/> <QPM:ReleaseNoteMajor/> <QPM:ReleaseBuild>1</QPM:ReleaseBuild> <QPM:CountryExclude/> <QPM:ReleaseCopyright>GNU Lesser General Public License</QPM:ReleaseCopyright> </QPM:ReleaseDescription> <QPM:ContentDescription> <QPM:ContentTopic xmlmultiple="true">Software Development/Libraries and Extensions/C Libraries</QPM:ContentTopic> <QPM:ContentKeyword>SDL,audio,graphics,demos,games,emulators,direct,media,layer</QPM:ContentKeyword> <QPM:TargetOS>qnx6</QPM:TargetOS> <QPM:HostOS>none</QPM:HostOS> <QPM:DisplayEnvironment xmlmultiple="true">Photon</QPM:DisplayEnvironment> <QPM:DisplayEnvironment xmlmultiple="true">Console</QPM:DisplayEnvironment> <QPM:TargetAudience xmlmultiple="true">Developer</QPM:TargetAudience> <QPM:TargetAudience xmlmultiple="true">User</QPM:TargetAudience> </QPM:ContentDescription> <QPM:LicenseUrl>repdata://LicenseUrl/COPYING</QPM:LicenseUrl> </QPM:PackageManifest> </QPG:PackageFilter> <QPG:PackageFilter proc="none" target="none"> <QPM:PackageManifest> <QPM:ProductInstallationDependencies> <QPM:ProductRequirements></QPM:ProductRequirements> </QPM:ProductInstallationDependencies> </QPM:PackageManifest> </QPG:PackageFilter> <QPG:PackageFilter proc="x86" target="none"> <QPM:PackageManifest> <QPM:ProductInstallationDependencies> <QPM:ProductRequirements></QPM:ProductRequirements> </QPM:ProductInstallationDependencies> </QPM:PackageManifest> </QPG:PackageFilter> <QPG:PackageFilter proc="none" target="x86"> <QPM:PackageManifest> <QPM:ProductInstallationDependencies> <QPM:ProductRequirements></QPM:ProductRequirements> </QPM:ProductInstallationDependencies> </QPM:PackageManifest> </QPG:PackageFilter> <QPG:PackageFilter proc="x86" target="x86"> <QPM:PackageManifest> <QPM:ProductInstallationDependencies> <QPM:ProductRequirements></QPM:ProductRequirements> </QPM:ProductInstallationDependencies> </QPM:PackageManifest> </QPG:PackageFilter> </QPG:Values> </QPG:Generation>