Mercurial > sdl-ios-xcode
view README.OS2 @ 1192:54aa9aa32327
To: sdl@libsdl.org
From: Christian Walther <cwalther@gmx.ch>
Date: Fri, 18 Nov 2005 23:39:02 +0100
Subject: [SDL] Mouse position bugs on Mac OS X
The attached patch fixes a few bugs in SDL related to the mouse position
in windowed mode on Mac OS X, reproduced using the attached minimal test
program - at least here on 10.3.9, with SDL CVS from today. Could anyone
test whether the bugs exist and are fixed by the patch on 10.2 and 10.4?
1. When using OpenGL, the vertical mouse positions obtained through
events or SDL_GetMouseState() are off by one.
2. When using OpenGL, SDL_WarpMouse() inverts the y coordinate.
3. Clicks on the topmost pixel row of the window are not recognized.
1 and 2 do not occur in non-OpenGL mode, while 3 does. All three only
occur in windowed mode, not in fullscreen.
The cause for 1 and 3 is that in Cocoa, "the location of the mouse"
seems to be defined as "the location of the top left corner of the mouse
pointer's hot pixel" (this is not documented, it's just what I found out
here), which together with the fact that Cocoa's usual y coordinates
start at the bottom and increase upwards means that the y coordinate of
the mouse runs from 1 to h, not from 0 to h-1, in a window of height h.
If it does work on 10.2 and 10.4 (I'll try to test it as soon as I can,
but at the moment all I have at hand is 10.3.9), can this be applied to
the CVS?
-Christian
To: sdl@libsdl.org
From: Christian Walther <cwalther@gmx.ch>
Date: Mon, 28 Nov 2005 10:41:51 +0100
Subject: [SDL] Re: Mouse position bugs on Mac OS X
I wrote:
> I'll try to test it as soon as I can, but at the moment all I have at hand is 10.3.9
So, here are the results of my tests (with patched and unpatched
frameworks compiled with Xcode 1.5 (gcc 3.3) on 10.3.9):
On 10.1.5, my test program doesn't run because of "Undefined symbols:
SDL undefined reference to _CGMainDisplayID expected to be defined in
Carbon". I guess not supporting 10.1 was a deliberate decision then and
that's OK with me.
On 10.2.8, 10.3.9, and 10.4.0, the bugs exist as described in my
original post and are fixed by my patch. That is, there is no difference
between pre/post 10.3 and the patched version works correctly in all
combinations of GL/non-GL and windowed/fullscreen.
I therefore recommend the patch for inclusion.
-Christian
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Mon, 28 Nov 2005 13:58:26 +0000 |
parents | 173c063d4f55 |
children | e3242177fe4a |
line wrap: on
line source
=========== SDL on OS/2 =========== Last updated on Oct 02, 2005. 1. How to compile? ------------------ To compile this, you'll need the followings installed: - The OS/2 Developer's Toolkit - The OpenWatcom compiler (http://www.openwatcom.org) - The FSLib library (ftp://ftp.netlabs.org/pub/SDL) Please edit the second, fourth and fifth lines of setvars.cmd file to set the folders where the toolkit, the OW compiler and the FSLib are. You won't need NASM yet (The Netwide Assembler), you can leave that line. Run setvars.cmd, and you should get a shell in which you can compile SDL. Check the "Watcom.mif" file. This is the file which is included by all the Watcom makefiles, so changes here will affect the whole build process. There is a line in there which determines if the resulting SDL.DLL will be a 'debug' or a 'release' build. The 'debug' version is full of printf()'s, so if something goes wrong, its output can help a lot for debugging. Then go to the 'src' folder, and run "wmake -f makefile.wat". This should create the SDL.DLL and the corresponding SDL.LIB file there. To test applications, it's a good idea to use the 'debug' build of SDL, and redirect the standard output and standard error output to files, to see what happens internally in SDL. (like: testsprite >stdout.txt 2>stderr.txt) To rebuild SDL, use the following commands in 'src' folder: wmake -f makefile.wat clean wmake -f makefile.wat 2. How to compile the testapps? ------------------------------- Once you have SDL.DLL compiled, navigate into the 'test' folder, copy in there the newly built SDL.DLL, and copy in there FSLib.DLL. Then run "wmake -f makefile.wat" in there to compile some of the testapps. 3. What is missing? ------------------- The following things are missing from this SDL implementation: - MMX, SSE and 3DNOW! optimized video blitters? - HW Video surfaces - OpenGL support 4. Special Keys / Full-Screen support ------------------------------------- There are two special hot-keys implemented: - Alt+Home switches between fullscreen and windowed mode - Alt+End simulates closing the window (can be used as a Panic key) Only the LEFT Alt key will work. 5. Joysticks on SDL/2 --------------------- The Joystick detection only works for standard joysticks (2 buttons, 2 axes and the like). Therefore, if you use a non-standard joystick, you should specify its features in the SDL_OS2_JOYSTICK environment variable in a batch file or CONFIG.SYS, so SDL applications can provide full capability to your device. The syntax is: SET SDL_OS2_JOYSTICK=[JOYSTICK_NAME] [AXES] [BUTTONS] [HATS] [BALLS] So, it you have a Gravis GamePad with 4 axes, 2 buttons, 2 hats and 0 balls, the line should be: SET SDL_OS2_JOYSTICK=Gravis_GamePad 4 2 2 0 If you want to add spaces in your joystick name, just surround it with quotes or double-quotes: SET SDL_OS2_JOYSTICK='Gravis GamePad' 4 2 2 0 or SET SDL_OS2_JOYSTICK="Gravis GamePad" 4 2 2 0 Notive However that Balls and Hats are not supported under OS/2, and the value will be ignored... but it is wise to define these correctly because in the future those can be supported. Also the number of buttons is limited to 2 when using two joysticks, 4 when using one joystick with 4 axes, 6 when using a joystick with 3 axes and 8 when using a joystick with 2 axes. Notice however these are limitations of the Joystick Port hardware, not OS/2. 6. Next steps... ---------------- Things to do: - Implement missing stuffs (look for 'TODO' string in source code!) - Finish video driver (the 'wincommon' can be a good example for missing things like application icon and so on...) - Enable MMX/SSE/SSE2 acceleration functions - Rewrite CDROM support using DOS Ioctl for better support. 7. Contacts ----------- You can contact the developers for bugs: Area Developer email General (Audio/Video/System) Doodle doodle@scenergy.dfmk.hu CDROM and Joystick Caetano daniel@caetano.eng.br Notice however that SDL/2 is 'in development' stage so ... if you want to help, please, be our guest and contact us!