view src/main/macos/exports/SDL.x @ 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 eb78bb0b715b
children 7a610f25c12f
line wrap: on
line source

	SDL_Init
	SDL_InitSubSystem
	SDL_QuitSubSystem
	SDL_WasInit
	SDL_Quit
	SDL_GetAppState
	SDL_AudioInit
	SDL_AudioQuit
	SDL_AudioDriverName
	SDL_OpenAudio
	SDL_GetAudioStatus
	SDL_PauseAudio
	SDL_LoadWAV_RW
	SDL_FreeWAV
	SDL_BuildAudioCVT
	SDL_ConvertAudio
	SDL_MixAudio
	SDL_LockAudio
	SDL_UnlockAudio
	SDL_CloseAudio
	SDL_CDNumDrives
	SDL_CDName
	SDL_CDOpen
	SDL_CDStatus
	SDL_CDPlayTracks
	SDL_CDPlay
	SDL_CDPause
	SDL_CDResume
	SDL_CDStop
	SDL_CDEject
	SDL_CDClose
	SDL_HasRDTSC
	SDL_HasMMX
	SDL_HasMMXExt
	SDL_Has3DNow
	SDL_Has3DNowExt
	SDL_HasSSE
	SDL_HasSSE2
	SDL_HasAltiVec
	SDL_ReadLE16
	SDL_ReadBE16
	SDL_ReadLE32
	SDL_ReadBE32
	SDL_ReadLE64
	SDL_ReadBE64
	SDL_WriteLE16
	SDL_WriteBE16
	SDL_WriteLE32
	SDL_WriteBE32
	SDL_WriteLE64
	SDL_WriteBE64
	SDL_SetError
	SDL_GetError
	SDL_ClearError
	SDL_Error
	SDL_PumpEvents
	SDL_PeepEvents
	SDL_PollEvent
	SDL_WaitEvent
	SDL_PushEvent
	SDL_SetEventFilter
	SDL_GetEventFilter
	SDL_EventState
	SDL_putenv
	SDL_getenv
	SDL_NumJoysticks
	SDL_JoystickName
	SDL_JoystickOpen
	SDL_JoystickOpened
	SDL_JoystickIndex
	SDL_JoystickNumAxes
	SDL_JoystickNumBalls
	SDL_JoystickNumHats
	SDL_JoystickNumButtons
	SDL_JoystickUpdate
	SDL_JoystickEventState
	SDL_JoystickGetAxis
	SDL_JoystickGetHat
	SDL_JoystickGetBall
	SDL_JoystickGetButton
	SDL_JoystickClose
	SDL_EnableUNICODE
	SDL_EnableKeyRepeat
	SDL_GetKeyState
	SDL_GetModState
	SDL_SetModState
	SDL_GetKeyName
	SDL_LoadObject
	SDL_LoadFunction
	SDL_UnloadObject
	SDL_GetMouseState
	SDL_GetRelativeMouseState
	SDL_WarpMouse
	SDL_CreateCursor
	SDL_SetCursor
	SDL_GetCursor
	SDL_FreeCursor
	SDL_ShowCursor
	SDL_CreateMutex
	SDL_mutexP
	SDL_mutexV
	SDL_DestroyMutex
	SDL_CreateSemaphore
	SDL_DestroySemaphore
	SDL_SemWait
	SDL_SemTryWait
	SDL_SemWaitTimeout
	SDL_SemPost
	SDL_SemValue
	SDL_CreateCond
	SDL_DestroyCond
	SDL_CondSignal
	SDL_CondBroadcast
	SDL_CondWait
	SDL_CondWaitTimeout
	SDL_RWFromFile
	SDL_RWFromFP
	SDL_RWFromMem
	SDL_RWFromConstMem
	SDL_AllocRW
	SDL_FreeRW
	SDL_GetWMInfo
	SDL_CreateThread
	SDL_ThreadID
	SDL_GetThreadID
	SDL_WaitThread
	SDL_KillThread
	SDL_GetTicks
	SDL_Delay
	SDL_SetTimer
	SDL_AddTimer
	SDL_RemoveTimer
	SDL_Linked_Version
	SDL_VideoInit
	SDL_VideoQuit
	SDL_VideoDriverName
	SDL_GetVideoSurface
	SDL_GetVideoInfo
	SDL_VideoModeOK
	SDL_ListModes
	SDL_SetVideoMode
	SDL_UpdateRects
	SDL_UpdateRect
	SDL_Flip
	SDL_SetGamma
	SDL_SetGammaRamp
	SDL_GetGammaRamp
	SDL_SetColors
	SDL_SetPalette
	SDL_MapRGB
	SDL_MapRGBA
	SDL_GetRGB
	SDL_GetRGBA
	SDL_CreateRGBSurface
	SDL_CreateRGBSurfaceFrom
	SDL_FreeSurface
	SDL_LockSurface
	SDL_UnlockSurface
	SDL_LoadBMP_RW
	SDL_SaveBMP_RW
	SDL_SetColorKey
	SDL_SetAlpha
	SDL_SetClipRect
	SDL_GetClipRect
	SDL_ConvertSurface
	SDL_UpperBlit
	SDL_LowerBlit
	SDL_FillRect
	SDL_DisplayFormat
	SDL_DisplayFormatAlpha
	SDL_CreateYUVOverlay
	SDL_LockYUVOverlay
	SDL_UnlockYUVOverlay
	SDL_DisplayYUVOverlay
	SDL_FreeYUVOverlay
	SDL_GL_LoadLibrary
	SDL_GL_GetProcAddress
	SDL_GL_SetAttribute
	SDL_GL_GetAttribute
	SDL_GL_SwapBuffers
	SDL_GL_UpdateRects
	SDL_GL_Lock
	SDL_GL_Unlock
	SDL_WM_SetCaption
	SDL_WM_GetCaption
	SDL_WM_SetIcon
	SDL_WM_IconifyWindow
	SDL_WM_ToggleFullScreen
	SDL_WM_GrabInput
	SDL_SoftStretch
	SDL_InitQuickDraw