comparison README.iphoneos @ 4689:f9ab8df6d45a

Added README.touch and README.gesture. Moved touchtest/gestureSDLTest to test/testgesture
author Jim Grandpre <jim.tla@gmail.com>
date Sun, 15 Aug 2010 00:36:28 -0400
parents 52e871f486b8
children
comparison
equal deleted inserted replaced
4688:494f71f57a80 4689:f9ab8df6d45a
30 1. Create a new iPhone view based application. 30 1. Create a new iPhone view based application.
31 2. Build the SDL static libraries (libSDLiPhoneOS.a and libSDLSimulator.a) for iPhone and include them in your project. XCode will ignore the library that is not currently of the correct architecture, hence your app will work both on iPhone and in the iPhone Simulator. 31 2. Build the SDL static libraries (libSDLiPhoneOS.a and libSDLSimulator.a) for iPhone and include them in your project. XCode will ignore the library that is not currently of the correct architecture, hence your app will work both on iPhone and in the iPhone Simulator.
32 3. Include the SDL header files in your project. 32 3. Include the SDL header files in your project.
33 4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iPhone provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iPhone produces its user interface programmatically. 33 4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iPhone provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iPhone produces its user interface programmatically.
34 5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell XCode not to use the project prefix file, as it includes Objective-C code. 34 5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell XCode not to use the project prefix file, as it includes Objective-C code.
35
36 ==============================================================================
37 Notes -- Touch Input
38 ==============================================================================
39
40 Touch input in SDL for iPhone OS is presently exposed through SDL's mouse input API. Multi-touch input is reported as multiple mice, with each touch associated with a specific mouse. This association stays coherent from the time the touch starts to the time a touch ends.
41
42 By default, multi-touch is turned ON. This requires some care, because if you simply respond to mouse events without checking which mouse caused the event, you may end up fetching data from the wrong mouse, ie, from an incorrect or invalid touch. To turn multi-touch OFF, you can recompile SDL for iPhone with the macro SDL_IPHONE_MULTIPLE_MICE (found in SDL_config_iphoneos.h) set to 0.
43 35
44 ============================================================================== 36 ==============================================================================
45 Notes -- Accelerometer as Joystick 37 Notes -- Accelerometer as Joystick
46 ============================================================================== 38 ==============================================================================
47 39