Commit Graph

3293 Commits

Author SHA1 Message Date
Paul Hunkin
eb38d6aa71 - Cleaned up a bunch of code
- Added 'feature' enable/disable so we're not running accel/sound/whatever in Java when we don't need to be
- More work on the sound system. But it still crashes pretty horribly, not sure why yet.
2010-07-27 21:21:24 +02:00
Paul Hunkin
e8bbccf237 Added accelerometer 'joystick' 2010-07-27 21:20:17 +02:00
Paul Hunkin
daa451a473 Oops, I wasn't using pthreads. Fixed so we can have mutexes and stuff 2010-07-27 15:23:09 +02:00
Paul Hunkin
10203b606f Updated test app to init the sound system 2010-07-27 11:35:06 +02:00
Paul Hunkin
262828a8ab Added stub android sound system 2010-07-27 11:34:43 +02:00
Paul Hunkin
db6bbd35de OK, /actually/ fixed the nativeQuit() crash this time 2010-07-27 11:02:07 +02:00
Paul Hunkin
559937b746 Added resize hander stub and initial screen size setter 2010-07-27 10:49:11 +02:00
Paul Hunkin
816e52175c 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
8461c61e8a - Modified build system
- Initial support for touch and key events
2010-07-27 09:58:17 +02:00
Paul Hunkin
1de95703a5 Added preliminary keyboard event support 2010-07-07 00:43:23 +12:00
Paul Hunkin
61acea0ac4 Code cleanup 2010-06-29 01:30:11 +12:00
Paul Hunkin
a9ac1e4410 - 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
217c4192df Last test version with GLSurface 2010-06-28 21:35:28 +12:00
Paul Hunkin
5ea5611051 Tweaks to the libsdl side 2010-06-18 01:29:14 +12:00
Paul Hunkin
751564d7e8 Added egl headers so we can use eglMakeCurrent() 2010-06-18 01:28:39 +12:00
Paul Hunkin
3ea075ff59 Removed old video subsystem, along with (now-unncessary) egl files. 2010-06-18 00:03:09 +12:00
Paul Hunkin
2e9955cc5e Testing out pthread support in android. Appears to work. 2010-06-18 00:02:13 +12:00
Paul Hunkin
fd07eb5990 Rotating pyramid! 2010-06-17 23:04:16 +12:00
Paul Hunkin
5def4b1273 Added minimal test project 2010-06-17 22:19:27 +12:00
Paul Hunkin
82cf0563e5 Fixed #includes to fix naming conventions 2010-06-10 19:25:55 +12:00
Paul Hunkin
23ef6d2153 Renamed some files to fit naming conventions 2010-06-10 19:02:55 +12:00
Paul Hunkin
61ddab05c6 Added (partially implemented) android video backend and associated files needed to build 2010-06-10 18:54:23 +12:00
Paul Hunkin
99ccaa6680 Added some android build stuff 2010-05-23 15:18:16 +12:00
Paul Hunkin
4d51917753 Added some wrapper shell scripts to make android compiling easier 2010-05-23 15:13:39 +12:00
Paul Hunkin
4b5db3080a Fix a compile error when SDL_JOYSTICK_DISABLED is set 2010-05-23 15:12:41 +12:00
Paul Hunkin
6b8d32ccde 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
3ca3ae0c70 Fixed comment style 2010-05-23 15:08:30 +12:00
Paul Hunkin
205e65f689 Initial commit, adding __ANDROID__ to the platform list 2010-05-17 15:14:34 +12:00
Sam Lantinga
9a5b4a1a84 Add a default revision string if we can't find hg 2010-05-09 19:55:28 -07:00
Sam Lantinga
47c0e1e892 Don't assume .bashrc exists. :) 2010-05-09 19:51:21 -07:00
Sam Lantinga
6f968d9e3f Tagging version before everything gets ripped out. 2010-05-09 17:00:56 -07:00
Sam Lantinga
861f7cd38a Make the compiler even happier 2010-05-09 16:16:11 -07:00
Sam Lantinga
1b3a6fb5b7 Make sure events are current before flushing them. 2010-05-09 16:15:14 -07:00
Sam Lantinga
29596b2204 Added missing header 2010-05-09 15:47:21 -07:00
Sam Lantinga
0b0a5e0be5 Removed unused variables 2010-05-09 15:46:19 -07:00
Sam Lantinga
69b841b3e3 Fixed compiler warnings 2010-05-09 15:33:10 -07:00
Sam Lantinga
a5bb8cf382 Fixed variable use before initialize warnings 2010-05-09 15:24:31 -07:00
Sam Lantinga
3b0aa4bb4c Removed unused variables 2010-05-09 15:24:05 -07:00
Sam Lantinga
fb9e73dd09 Fixed Eric's changes to allow building from the command line. 2010-05-09 10:00:33 -07:00
Sam Lantinga
98918d160e Updated with the SDL 1.3 list of supported operating systems 2010-05-09 09:53:57 -07:00
Eric Wing
f4b7b16da7 Updated Mac Xcode project for refactored rwops automated test changes. 2010-05-09 07:00:28 -07:00
Eric Wing
f0650b31dc 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.)
2010-05-09 06:58:30 -07:00
Eric Wing
ef6951c458 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
95b8bdedff 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
36478c7ce3 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
dada7f15bc 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
6ecdb723d8 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
cf2d0ef2ba 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
8524311b24 Implemented SDL power APIs for iPhoneOS. 2010-04-30 00:39:31 -04:00
Ryan C. Gordon
742dfdc4e7 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