Commit graph

3290 commits

Author SHA1 Message Date
Paul Hunkin
daaa0b0414 Updated test app to init the sound system 2010-07-27 11:35:06 +02:00
Paul Hunkin
56e126ff14 Added stub android sound system 2010-07-27 11:34:43 +02:00
Paul Hunkin
e0c98826af OK, /actually/ fixed the nativeQuit() crash this time 2010-07-27 11:02:07 +02:00
Paul Hunkin
088b758125 Added resize hander stub and initial screen size setter 2010-07-27 10:49:11 +02:00
Paul Hunkin
27d80262c2 Shut down the C application properly on quit instead of crashing in the most horrible way possible 2010-07-27 10:20:22 +02:00
Paul Hunkin
d42b7d3970 - Modified build system
- Initial support for touch and key events

--HG--
rename : build-scripts/acc.sh => android/scripts/acc.sh
rename : build-scripts/ald.sh => android/scripts/ald.sh
2010-07-27 09:58:17 +02:00
Paul Hunkin
d8e077adbb Added preliminary keyboard event support 2010-07-07 00:43:23 +12:00
Paul Hunkin
26a7c00433 Code cleanup 2010-06-29 01:30:11 +12:00
Paul Hunkin
482a87c499 - Restructured threads and application structure.
- Moved to SurfaceView instead of GLSurfaceView
- Moved to C++ for the android library
2010-06-29 00:40:12 +12:00
Paul Hunkin
3ad2c1bdbf Last test version with GLSurface 2010-06-28 21:35:28 +12:00
Paul Hunkin
904e7b4511 Tweaks to the libsdl side 2010-06-18 01:29:14 +12:00
Paul Hunkin
d4cfca1cdb Added egl headers so we can use eglMakeCurrent() 2010-06-18 01:28:39 +12:00
Paul Hunkin
c67e5f7bcb Removed old video subsystem, along with (now-unncessary) egl files. 2010-06-18 00:03:09 +12:00
Paul Hunkin
2adfec26ab Testing out pthread support in android. Appears to work. 2010-06-18 00:02:13 +12:00
Paul Hunkin
5a619d67b2 Rotating pyramid! 2010-06-17 23:04:16 +12:00
Paul Hunkin
db5022f8c4 Added minimal test project 2010-06-17 22:19:27 +12:00
Paul Hunkin
a633daa196 Fixed #includes to fix naming conventions 2010-06-10 19:25:55 +12:00
Paul Hunkin
84cd073e6f Renamed some files to fit naming conventions
--HG--
rename : src/video/android/SDL_androidevents_c.h => src/video/android/SDL_androidevents.h
rename : src/video/android/SDL_androidrender_c.h => src/video/android/SDL_androidrender.h
2010-06-10 19:02:55 +12:00
Paul Hunkin
dc9ee5ef88 Added (partially implemented) android video backend and associated files needed to build 2010-06-10 18:54:23 +12:00
Paul Hunkin
6251bfb6a1 Added some android build stuff 2010-05-23 15:18:16 +12:00
Paul Hunkin
e3367d6ac7 Added some wrapper shell scripts to make android compiling easier 2010-05-23 15:13:39 +12:00
Paul Hunkin
3634d8ffac Fix a compile error when SDL_JOYSTICK_DISABLED is set 2010-05-23 15:12:41 +12:00
Paul Hunkin
26026fcdaa Fix compile errors under Android toolchain. Seems to have the same issue as the NDS. 2010-05-23 15:10:18 +12:00
Paul Hunkin
df6f09b78d Fixed comment style 2010-05-23 15:08:30 +12:00
Paul Hunkin
dece536bfc Initial commit, adding __ANDROID__ to the platform list 2010-05-17 15:14:34 +12:00
Sam Lantinga
d12afdaedb Add a default revision string if we can't find hg 2010-05-09 19:55:28 -07:00
Sam Lantinga
36bb08a19e Don't assume .bashrc exists. :) 2010-05-09 19:51:21 -07:00
Sam Lantinga
cc3f18a315 Tagging version before everything gets ripped out. 2010-05-09 17:00:56 -07:00
Sam Lantinga
76cf0cd0c0 Make the compiler even happier 2010-05-09 16:16:11 -07:00
Sam Lantinga
2a8171b8b7 Make sure events are current before flushing them. 2010-05-09 16:15:14 -07:00
Sam Lantinga
906341c826 Added missing header 2010-05-09 15:47:21 -07:00
Sam Lantinga
3bc34ef448 Removed unused variables 2010-05-09 15:46:19 -07:00
Sam Lantinga
06d5867775 Fixed compiler warnings 2010-05-09 15:33:10 -07:00
Sam Lantinga
74e352d011 Fixed variable use before initialize warnings 2010-05-09 15:24:31 -07:00
Sam Lantinga
0c3e29cd9c Removed unused variables 2010-05-09 15:24:05 -07:00
Sam Lantinga
dc6629fa52 Fixed Eric's changes to allow building from the command line. 2010-05-09 10:00:33 -07:00
Sam Lantinga
4a2cf3b976 Updated with the SDL 1.3 list of supported operating systems 2010-05-09 09:53:57 -07:00
Eric Wing
f7c1900153 Updated Mac Xcode project for refactored rwops automated test changes. 2010-05-09 07:00:28 -07:00
Eric Wing
6c9da257a1 Refactored automated rwops tests so read and write directories can be more easily customized.
The refactored tests were written in recognition that Mac and iPhone current working directories are usually not going to work. Resource directories are in bundles and write directories are restricted to certain areas. In theory, other platforms may have this problem too, hence the refactoring.

Also updated the Xcode iPhone project to use 3.2 as the Base SDK, but 3.1 as the Deployment SDK (for iPhone/iPad compatibility.)

--HG--
rename : test/automated/rwops/Test_rwopsbundlesupport.h => test/automated/rwops/TestSupportRWops.h
rename : test/automated/rwops/Test_rwopsbundlesupport.m => test/automated/rwops/TestSupportRWops_Cocoa.m
2010-05-09 06:58:30 -07:00
Eric Wing
4d5a9e42ba Fixes to automated test target for iPhone Xcode project.
Looks like there is a problem with the source code base. UIScreenMode and possibly a few other 3.2 only APIs have crept in. 3.2 is only available for iPad, and not iPhone/iPod Touch.
2010-05-08 08:23:46 -07:00
Eric Wing
1a24b61487 Exempted writable modes from bundle check on OS X since bundle areas are typically read-only. 2010-05-08 04:52:17 -07:00
Eric Wing
a67b7bdcab Adding testsdl (automated test) support to iPhone Xcode project (to match Mac Xcode project).
I haven't updated yet to the 3.2 SDK so SDL no longer builds for me so I can't yet verify if the new target completely works.
2010-05-08 01:12:55 -07:00
Eric Wing
95cc075a21 Added automated test to Xcode project plus needed changes to SDL_RWFromFile to be OS X bundle aware.
The Mac OS X project has a new target called testsdl which builds the automated test. I looked at using Xcode's native unit test support, but the impedance mismatch between the existing automated test structure and Apple's was more than I could handle.

As such, the testsdl application is a full blown proper OS X application, which means it is a self-contained .app bundle. This immediately revealed some problems from the automated test. The largest problem was the assumption about the current working directory and where to find resources. (I suspect Windows may have a similar problem depending on circumstance.) To open resources, the test was looking in directories relative to the SDL source directory, but this will not work well with self-contained .app bundles and Xcode which can place its built applications almost anywhere. And for real-world situations, this is pretty useless anyway.

So I modified SDL_RWFromFile to do special things on OS X. First, it will look for a file in the .app bundle. If not found, it will fallback and just call fopen as it used to do.

I also had to modify the automated test itself because it had a contrieved test which called fopen directly to do read from an existing FILE pointer. In addition, there was a write test. Since a .app bundle is likely going to be read-only, I added a special case for OS X to write to NSTemporaryDirectory.

I expect these changes should work for both Mac and iPhone OS (which includes iPad).

I will update the iPhone Xcode project next.

Finally, FYI, the X11 automated test seems to be failing. Below is my output.


Pending breakpoint 4 - "-[NSException raise]" resolved
Platform : All tests successful (2)
SDL_RWops : All tests successful (5)
Rect : All tests successful (1)
SDL_Surface : All tests successful (6)
Rendering with cocoa driver : All tests successful (3)
Assert Failed!
   Blit output not the same.
   Test Case 'Renderer x11'
   Test Suite 'Rendering with x11 driver'
   Last SDL error ''
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Rendering with x11 driver : Failed 1 out of 4 testcases!
Rendering with dummy driver : All tests successful (3)
SDL_Audio : All tests successful (1)
Tests run with SDL 1.3.0 revision 1095906
System is running Mac OS X and is little endian
2010-05-08 00:54:22 -07:00
Ryan C. Gordon
b6ef5b01d8 Much improved multi-display support for iPad.
Fixes most issues and limitations, I think.
2010-05-02 05:08:12 -04:00
Ryan C. Gordon
953d5e65ea Test for system version in the Apple Recommended way.
(a similar test is output by Xcode for the iPhone View Application template).
2010-05-01 13:50:56 -04:00
Ryan C. Gordon
c236844aac Implemented SDL power APIs for iPhoneOS. 2010-04-30 00:39:31 -04:00
Ryan C. Gordon
4f49f9e01e Implemented display mode functionality for UIKit.
The iPad (and iPhoneOS 3.2) introduce both a larger screen and the ability to
 enumerate and configure external displays. This hooks up SDL's multi-display
 API to this new functionality, and removes the hardcoded iPhone resolution.
2010-04-29 22:53:18 -04:00
Sam Lantinga
33ffbdf29d Fixed bug 978
Yann Leprince      2010-03-31 11:07:53 PDT

Please add a #serial line as below to sdl.m4 and increase the serial number
with each revision of this file. This allows using aclocal --install, thereby
enabling automatic updating of sdl.m4 in SDL-based packages that distribute it.

# serial 1

The complete documentation and rationale for #serial can be found in the
Automake documentation:
<http://www.gnu.org/software/automake/manual/html_node/Serials.html>.
2010-04-23 02:19:34 -07:00
Sam Lantinga
cd734eee3a esigra 2010-04-17 03:53:57 PDT
If this header file is supposed to be includable from C++ code, the code should
of course use one of the SDL_*_cast macros from SDL_stdinc.h.
2010-04-23 02:15:05 -07:00
Jjgod Jiang
4a9fad4714 Fix a crash caused by empty keyboard focus
---
 src/events/SDL_keyboard.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
2010-04-20 07:16:42 -07:00