Mercurial > sdl-ios-xcode
diff src/video/quartz/SDL_QuartzEvents.m @ 511:79c189f5bd76
Added an environment variable SDL_HAS3BUTTONMOUSE for Quartz
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 05 Oct 2002 22:22:42 +0000 |
parents | 80a3d09bab29 |
children | 2536446a92de |
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzEvents.m Sat Oct 05 20:26:34 2002 +0000 +++ b/src/video/quartz/SDL_QuartzEvents.m Sat Oct 05 22:22:42 2002 +0000 @@ -19,6 +19,7 @@ Sam Lantinga slouken@libsdl.org */ +#include <stdlib.h> // For getenv() #include "SDL_QuartzKeys.h" static void QZ_InitOSKeymap (_THIS) { @@ -364,16 +365,20 @@ switch (type) { case NSLeftMouseDown: - if ( NSCommandKeyMask & current_mods ) { - last_virtual_button = 3; - DO_MOUSE_DOWN (3, 0); - } - else if ( NSAlternateKeyMask & current_mods ) { - last_virtual_button = 2; - DO_MOUSE_DOWN (2, 0); - } - else { + if ( getenv("SDL_HAS3BUTTONMOUSE") ) { DO_MOUSE_DOWN (1, 1); + } else { + if ( NSCommandKeyMask & current_mods ) { + last_virtual_button = 3; + DO_MOUSE_DOWN (3, 0); + } + else if ( NSAlternateKeyMask & current_mods ) { + last_virtual_button = 2; + DO_MOUSE_DOWN (2, 0); + } + else { + DO_MOUSE_DOWN (1, 1); + } } break; case NSOtherMouseDown: DO_MOUSE_DOWN (2, 0); break;