Commit graph

3293 commits

Author SHA1 Message Date
Sam Lantinga
f9904e2bc9 Added SDL_FOURCC() 2010-07-07 21:36:09 -07:00
Sam Lantinga
987085b1ee Turn on blending if we're converting from a surface with colorkey enabled 2010-07-07 21:35:44 -07:00
Sam Lantinga
99b869fe2e Updated iPhone keyboard code (which builds and runs on the iPad and iPhone simulator now)
Updated iPhone demos (which build and run again)
2010-07-07 18:58:51 -07:00
Sam Lantinga
2c5a878c4e The arguments to main() should be NULL terminated (SuS v3 compliant) 2010-07-06 22:26:03 -07:00
Sam Lantinga
44280ae564 Re-implemented single mouse touches on the iPhone/iPad 2010-07-06 22:08:19 -07:00
Sam Lantinga
52b4147239 Removed obsolete header file 2010-07-06 10:58:23 -07:00
Sam Lantinga
715dd0b4e8 Fixed fullscreen window position
Fixed position calculation for centered windows
2010-07-06 08:22:36 -07:00
Sam Lantinga
8145b50223 Merged changes from default 2010-07-05 22:48:35 -07:00
Sam Lantinga
320eb4600b Cleaned up the mouse window focus handling: you always pass in the relative window when sending a mouse event.
Fixed a bug where only mouse wheel up was sent on Mac OS X
Fixed a bug where mouse window focus was getting hosed by the fullscreen mouse code on Mac OS X
2010-07-05 22:48:13 -07:00
Sam Lantinga
8cafde92ae Removed obsolete test program. Ryan may resurrect it when the new multi-mouse code is implemented. 2010-07-05 22:45:45 -07:00
Sam Lantinga
baf073e263 Fixed usage message - it shouldn't have a printf format specifier 2010-07-05 22:45:15 -07:00
Sam Lantinga
d376b59257 Removed SDL.lib and SDLmain.lib from the projects since the dependencies are set up properly. 2010-07-05 18:18:25 -07:00
Sam Lantinga
05acefbdd3 Added dependencies on SDL.lib and SDLmain.lib to the test programs 2010-07-05 17:14:37 -07:00
Sam Lantinga
cd68729bb4 Split out the Visual C++ 2005 and 2008 projects explicitly.
Added the test programs to the Visual C++ 2008 project.

--HG--
rename : VisualC/SDL/SDL.vcproj => VisualC/SDL/SDL_VS2005.vcproj
rename : VisualC/SDL.sln => VisualC/SDL_VS2005.sln
rename : VisualC/SDLmain/SDLmain.vcproj => VisualC/SDLmain/SDLmain_VS2005.vcproj
rename : VisualC/tests/automated/automated.vcproj => VisualC/tests/automated/automated_VS2008.vcproj
rename : VisualC/tests/checkkeys/checkkeys.vcproj => VisualC/tests/checkkeys/checkkeys_VS2005.vcproj
rename : VisualC/tests/graywin/graywin.vcproj => VisualC/tests/graywin/graywin_VS2005.vcproj
rename : VisualC/tests/loopwave/loopwave.vcproj => VisualC/tests/loopwave/loopwave_VS2005.vcproj
rename : VisualC/tests/testalpha/testalpha.vcproj => VisualC/tests/testalpha/testalpha_VS2005.vcproj
rename : VisualC/tests/testdraw2/testdraw2.vcproj => VisualC/tests/testdraw2/testdraw2_VS2005.vcproj
rename : VisualC/tests/testfile/testfile.vcproj => VisualC/tests/testfile/testfile_VS2005.vcproj
rename : VisualC/tests/testgamma/testgamma.vcproj => VisualC/tests/testgamma/testgamma_VS2005.vcproj
rename : VisualC/tests/testgl/testgl.vcproj => VisualC/tests/testgl/testgl_VS2005.vcproj
rename : VisualC/tests/testgl2/testgl2.vcproj => VisualC/tests/testgl2/testgl2_VS2005.vcproj
rename : VisualC/tests/testjoystick/testjoystick.vcproj => VisualC/tests/testjoystick/testjoystick_VS2005.vcproj
rename : VisualC/tests/testoverlay/testoverlay.vcproj => VisualC/tests/testoverlay/testoverlay_VS2005.vcproj
rename : VisualC/tests/testoverlay2/testoverlay2.vcproj => VisualC/tests/testoverlay2/testoverlay2_VS2005.vcproj
rename : VisualC/tests/testpalette/testpalette.vcproj => VisualC/tests/testpalette/testpalette_VS2005.vcproj
rename : VisualC/tests/testplatform/testplatform.vcproj => VisualC/tests/testplatform/testplatform_VS2005.vcproj
rename : VisualC/tests/testpower/testpower.vcproj => VisualC/tests/testpower/testpower_VS2005.vcproj
rename : VisualC/tests/testsprite/testsprite.vcproj => VisualC/tests/testsprite/testsprite_VS2005.vcproj
rename : VisualC/tests/testsprite2/testsprite2.vcproj => VisualC/tests/testsprite2/testsprite2_VS2005.vcproj
rename : VisualC/tests/testvidinfo/testvidinfo.vcproj => VisualC/tests/testvidinfo/testvidinfo_VS2005.vcproj
rename : VisualC/tests/testwin/testwin.vcproj => VisualC/tests/testwin/testwin_VS2005.vcproj
rename : VisualC/tests/testwm/testwm.vcproj => VisualC/tests/testwm/testwm_VS2005.vcproj
2010-07-05 17:10:34 -07:00
Sam Lantinga
e03c43c49b Fixed revision type for SDL 1.3 2010-07-05 13:10:47 -07:00
Sam Lantinga
02dc648ea2 Added missing file to the automated test project 2010-07-05 13:10:31 -07:00
Sam Lantinga
feac47e6de Make sure SDL gets installed to the correct prefix for the new cross-compiler tools. 2010-07-05 12:41:28 -07:00
Sam Lantinga
7ea6ef0d5a Fixed compile warning with latest mingw32 compiler 2010-07-05 12:32:44 -07:00
Sam Lantinga
5f38782163 Typo in documentation 2010-06-27 23:17:36 -07:00
Sam Lantinga
09f20dba54 Removed one more use of () 2010-06-26 08:58:06 -07:00
Sam Lantinga
95fbd50b15 Mostly cleaned up warnings with -Wmissing-prototypes 2010-06-26 08:56:48 -07:00
Sam Lantinga
b46edfbdc6 Hello Sam.
I did fix/update the SDL 1.3 pandora port today ( 11 june 2010 ) and you can find the "hg diff" attached :)

David Carré ( Cpasjuste )
2010-06-17 22:23:20 -07:00
Sam Lantinga
8840de14d1 Fixed mouse focus window reporting
FIXME: Should the window be a parameter to the mouse events again?
2010-06-17 12:33:05 -07:00
Sam Lantinga
82f6deccfd Fixed wording for consistency 2010-06-06 21:09:45 -07:00
Sam Lantinga
52154ae7e4 SDL_KillThread() is no longer supported - it was always dangerous! :) 2010-05-24 22:56:36 -07:00
Sam Lantinga
21099fe988 author Eric Wing <ewing . public |-at-| gmail . com>
Wed May 12 12:49:28 2010 -0700 (5 days ago)

Added the automated test plist file and modified .hgignore to be less aggressive.

Discovered that the new plist file for the automated test was not checked in because the .hgignore file was too aggressive. I changed the .hgignore to not ignore the Xcode directory and instead added a longer list of things to ignore.
2010-05-17 23:13:33 -07:00
Eric Wing
9919f22b4f Added the automated test plist file and modified .hgignore to be less aggressive.
Discovered that the new plist file for the automated test was not checked in because the .hgignore file was too aggressive. I changed the .hgignore to not ignore the Xcode directory and instead added a longer list of things to ignore.
2010-05-12 12:49:28 -07:00
Sam Lantinga
338f95eb06 Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API.
Plus, this lets me start implementing cursor support.
2010-05-09 20:47:22 -07: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