- 08 Jan, 2012 4 commits
-
-
Sam Lantinga authored
The patch Mark attached looks good and valgrind gives it a clean bill of health: Mark.Howson@ntu.ac.uk 2010-12-15 07:45:25 PST Reproducible here under Windows and Linux. Looking at the code for SDL_Upsample_S16LSB_2c: const int dstsize = (int) (((double)cvt->len_cvt) * cvt->rate_incr); Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 2; const Sint16 *target = ((const Sint16 *) cvt->buf) - 2; while (dst > target) { dst[1] = ((Sint16) SDL_SwapLE16(sample1)); dst[0] = ((Sint16) SDL_SwapLE16(sample0)); dst -= 2; ... if dstsize is odd (and therefore dst), it'll write to target[1] which is one byte before the allocated buf. The attached patch to sdlgenaudiocvt.pl changes dst > target to dst >= target, and removes the - $channels for the upsample case. The patch is not fully tested, but seems to work here.
-
Sam Lantinga authored
-
Sam Lantinga authored
-
Sam Lantinga authored
Scott Percival 2012-01-08 04:21:22 PST I tested the new build on my two ARM machines, and fixed a few bugs: - if SDL_VIDEO_DRIVER_UIKIT, SDL_VIDEO_DRIVER_ANDROID or SDL_VIDEO_DRIVER_PANDORA are specified, function pointers are grabbed from the compile-linked library instead of through SDL_GL_GetProcAddress. (not sure if this is the best way to go about it) - removing "/usr/lib/" from all the library names (hey, with multiarch you can't be too sure anymore) - added glFinish to glesfuncs.h - changed the eglGetProcAddress arg type to "const char *" as per the EGL spec - filled in the stubs for X11_GLES_SetSwapInterval and X11_GLES_GetSwapInterval
-
- 26 Aug, 2011 1 commit
-
-
Tim Angus authored
-
- 08 Jan, 2012 12 commits
-
-
Sam Lantinga authored
Scott Percival 2011-07-03 06:41:51 PDT This submission is aimed at making life easier for OpenGL ES capable devices running a X11 stack (e.g. Maemo, Meego, TrimSlice, other ARM SoC boards not running Android). SDL's Pandora support already has the neccesary GLES-to-X11 glue code, however it's all ghetto'd off in Makefile.pandora and not very flexible. The patch: - adds an awesome --enable-video-opengles option to configure - re-modifies the opengles and opengles2 SDL_renderers to use function pointers - no idea why this was removed? - for SDL_Renderers, links in libGLESv1_CM, libGLES_CM (for PowerVR fans) or libGLESv2 at runtime - links in libEGL.so at runtime - the old code made an assumption that eglFunctions could be pulled from the active GLES library, PowerVR for one doesn't let you do that with their libGLESv2 - allows you to pick which of GLES v1 or v2 to load via SDL_GL_CONTEXT_MAJOR_VERSION So far I've tested this on a Nokia N900 (OMAP 3430/SGX 530 running Maemo 5) and a Toshiba AC100 (Tegra 2 running Ubuntu 10.10). I haven't tested it on... well, everything that isn't those two, such as a Pandora, iOS or Android device. The Pandora specific code should be kept intact (fingers crossed), and nothing painfully drastic has been added to the SDL_renderers. The library loading sequence in SDL_x11opengles has been updated to accomodate both NVIDIA's propensity to let developers get away with murder and PowerVR's alternative of punishing every missed step. The test apps work okay with GLES or GLES2 as the renderer. For some reason alpha blending doesn't seem to work on the Tegra 2; last week NVIDIA pushed out a new set of X11 GLES drivers, so I'll try and investigate once I upgrade those. Also, this patch adds things to configure.in, include/SDL_config.h.in and test/configure.in. I didn't know what the policy was re. committing generated spaghetti from autotools, so ./autogen.sh has to be run again. Sorry. I think that's about everything, let me know if there's anything I've overlooked.
-
Sam Lantinga authored
Liam 2011-08-23 09:09:18 PDT Hiya! Seems like there's no implementation of condition variables included when building with VS2010, adding the generic SDL_syscond.c file to the project seems to fix it right up.
-
Sam Lantinga authored
Gabriel Jacobo 2011-12-23 12:55:11 PST The attached files provide some improvement over the current handling of pause/resume in Android. - I disabled the exit(status) instruction in SDL_main as that makes the entire app instead of the SDL thread exit (while not needed for pause/resume it is needed for Live Wallpapers, an SDLActivity for which I'll upload in a separate bug). - Added nativePause and nativeResume which basically just mark the window as visible/hidden, something that the end user needs to take into consideration (ideally pausing the event loop). Also, this arrangement creates a new GL context when needed, which at least in my test system is every time you go away from the app and come back to it. So, this means that the textures need to be generated again after resuming (a problem the end user didn't have before because the app exited completely when it should've been pausing). I'd like to know if there's a standard way of letting the user know that the GL context has changed and that he needs to refresh his textures, or if this is out of the scope of the library and each user handles it in their own way (I don't know how/if this same thing is handled in the iPhone backend, but it would be wise to try to imitate that). Gabriel Jacobo 2011-12-23 12:57:10 PST Also, in the SDLActivity the EGL handling code is moved up to the Activity from the Surface code, as I think it is possible (in theory) that the surface is destroyed temporarily while the context remains alive (though in practice in my test system this is not the case)
-
Sam Lantinga authored
Jens Köhler 2011-09-09 04:47:40 PDT When calling SDL_CreateWindowFrom with a NSWindow which already contains a NSView, the window will be duplicated because another NSView is added. I attached a possible fix that prevents the creation of a second NSView.
-
Sam Lantinga authored
Martin Schreiber 2011-09-15 06:08:38 PDT patch attached
-
Sam Lantinga authored
Also added error message in case the library open failed in that case.
-
Sam Lantinga authored
-
Sam Lantinga authored
Don't crash if the gl_data isn't valid, just return NULL.
-
Sam Lantinga authored
When the window couldn't be created, the normal window destruction process happens, which among other things, destroys the framebuffer, if any.
-
Sam Lantinga authored
Fixed bug 1342 - SDL_CreateRenderer creates OpenGL ES 2.0 renderer in iPhone 3G using default index (-1) The uikit code wasn't checking to make sure the context was successfully created.
-
Sam Lantinga authored
-
Sam Lantinga authored
-
- 07 Jan, 2012 6 commits
-
-
Sam Lantinga authored
-
Sam Lantinga authored
-
Sam Lantinga authored
-
Sam Lantinga authored
C.W. Betts 2012-01-06 22:58:41 PST I would NOT use A. SDL 1.2 uses A, and if I understand correctly, SDL 1.3 and SDL 1.2 are not binary compatible. Having a different link path for 1.2 and 1.3 will solve any runtime linking errors that might occur. Sam Lantinga 2012-01-07 00:22:09 PST Good point. Until we switch SDL 1.3 to SDL2, we shouldn't use the same link path.
-
Sam Lantinga authored
Martin Gerhardy 2011-07-27 02:26:06 PDT the window reference is lost in the GL_CreateRenderer function. The attached patch should fix this error. #0 SDLSystem_LogOutputFunction (userdata=0x63b010, category=1, priority=SDL_LOG_PRIORITY_ERROR, message=0x7fffffffcd00 "Invalid window") at src/system/sdl/SDLSystem.cpp:8 #1 0x00007ffff7b1ddb3 in SDL_LogMessageV (category=1, priority=SDL_LOG_PRIORITY_ERROR, fmt=<value optimized out>, ap=<value optimized out>) at src/SDL_log.c:275 #2 0x00007ffff7b1df7c in SDL_LogError (category=<value optimized out>, fmt=<value optimized out>) at src/SDL_log.c:212 #3 0x00007ffff7b1d582 in SDL_SetError (fmt=0x7ffff7baaff0 "") at src/SDL_error.c:111 #4 0x00007ffff7b96f9e in SDL_GL_MakeCurrent (window=0x0, ctx=0xa62ce0) at src/video/SDL_video.c:2484 #5 0x00007ffff7b4ba0c in GL_ActivateRenderer (renderer=0xa8f680) at src/render/opengl/SDL_render_gl.c:195 #6 0x00007ffff7b4c59a in GL_ResetState (window=0x918010, flags=<value optimized out>) at src/render/opengl/SDL_render_gl.c:214 #7 GL_CreateRenderer (window=0x918010, flags=<value optimized out>) at src/render/opengl/SDL_render_gl.c:343 #8 0x00007ffff7b48053 in SDL_CreateRenderer (window=0x918010, index=<value optimized out>, flags=2) at src/render/SDL_render.c:166
-
Sam Lantinga authored
-
- 27 Jun, 2011 1 commit
-
-
Marco Trevisan (Treviño) authored
Use the convenience function XSetWMProperties to set size, input and class hints, it also automatically sets the WM_CLIENT_MACHINE (this one needed by _NET_WM_PID) and WM_LOCALE_NAME windows hints. Plus we add support to the _NET_WM_PID atom which is needed by many windows managers to correctly associate a SDL window to its process and to related .desktop file and icon for the given host.
-
- 07 Jan, 2012 7 commits
-
-
Sam Lantinga authored
bastien.bouclet@gmail.com 2011-06-12 11:08:58 PDT SDL_LowerBlit doesn't update the blit color map if the source surface has changed. A proposed fix is attached, storing the source palette version in the color map.
-
Sam Lantinga authored
bastien.bouclet@gmail.com 2011-06-13 05:50:58 PDT Static pixel format initialization has not been updated to reflect header changes in SDL_blit_N.c The attached patch fixes Altivec support for me. altivec.h is needed for some systems.
-
Sam Lantinga authored
Joseba García Echebarria 2011-06-30 19:03:56 PDT I just found that SDL is crashing in the iPad simulator for iOS 3.2 but not for iOS 4.2 or over when compiling with Xcode 4.0.2. The Xcode debugger points to line 127 in video/uikit/SDL_uikitopenglview.m as the line that triggers the crash. On those lines one can find: /* Use the main screen scale (for retina display support) */ if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) self.contentScaleFactor = [UIScreen mainScreen].scale; I believe the problem to be that the "scale" selector is supported in iOS 3.2 in the iPad, but contentScaleFactor is not. I'm no expert in Objective-C, but I believe the following code to be more correct (it doesn't crash for me): /* Use the main screen scale (for retina display support) */ if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] && [self respondsToSelector:@selector(contentScaleFactor)]) self.contentScaleFactor = [UIScreen mainScreen].scale; The same check is being performed in line 155 so I imagine it will crash there, too. Vittorio Giovara 2011-08-22 17:58:20 PDT yeah, -scale was introduced in 3.2 but made available only in 4.0, weird anyways we just need to check against contentScaleFactor as we can be sure that both are availble starting from 4.0 the attached patch addresses this
-
Sam Lantinga authored
Fixed bug 1344 - No OpenGL headers when compiling -> no working Software renderer at runtime neither Make sure we have at least one render driver.
-
Sam Lantinga authored
It would only be meaningful if we were planning to ship 1.2 as A, and 1.3 as B, which is completely worthless given the headers will be for 1.3 and the API is completely different.
-
Sam Lantinga authored
Pallav Nawani 2012-01-04 00:48:29 PST Issue: Attempted to compile SDL as a static library. DirectX SDK: Feb 2007 OS: Win 7 Visual C++ Express 2008 Compliation Mode: Static (Changed project settings from dll to lib) Error: C1021: invalid preprocessor command 'warning' It seems that the #warning directive does not exist in Vc++ Express 2008.
-
Sam Lantinga authored
-
- 06 Jan, 2012 1 commit
-
-
Sam Lantinga authored
--HG-- rename : README.iphoneos => README.iOS rename : Xcode-iPhoneOS/Demos/Default.png => Xcode-iOS/Demos/Default.png rename : Xcode-iPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj => Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj rename : Xcode-iPhoneOS/Demos/Icon.png => Xcode-iOS/Demos/Icon.png rename : Xcode-iPhoneOS/Demos/Info.plist => Xcode-iOS/Demos/Info.plist rename : Xcode-iPhoneOS/Demos/README => Xcode-iOS/Demos/README rename : Xcode-iPhoneOS/Demos/data/bitmapfont/kromasky_16x16.bmp => Xcode-iOS/Demos/data/bitmapfont/kromasky_16x16.bmp rename : Xcode-iPhoneOS/Demos/data/bitmapfont/license.txt => Xcode-iOS/Demos/data/bitmapfont/license.txt rename : Xcode-iPhoneOS/Demos/data/drums/ds_brush_snare.wav => Xcode-iOS/Demos/data/drums/ds_brush_snare.wav rename : Xcode-iPhoneOS/Demos/data/drums/ds_china.wav => Xcode-iOS/Demos/data/drums/ds_china.wav rename : Xcode-iPhoneOS/Demos/data/drums/ds_kick_big_amb.wav => Xcode-iOS/Demos/data/drums/ds_kick_big_amb.wav rename : Xcode-iPhoneOS/Demos/data/drums/ds_loose_skin_mute.wav => Xcode-iOS/Demos/data/drums/ds_loose_skin_mute.wav rename : Xcode-iPhoneOS/Demos/data/icon.bmp => Xcode-iOS/Demos/data/icon.bmp rename : Xcode-iPhoneOS/Demos/data/ship.bmp => Xcode-iOS/Demos/data/ship.bmp rename : Xcode-iPhoneOS/Demos/data/space.bmp => Xcode-iOS/Demos/data/space.bmp rename : Xcode-iPhoneOS/Demos/data/stroke.bmp => Xcode-iOS/Demos/data/stroke.bmp rename : Xcode-iPhoneOS/Demos/src/accelerometer.c => Xcode-iOS/Demos/src/accelerometer.c rename : Xcode-iPhoneOS/Demos/src/common.c => Xcode-iOS/Demos/src/common.c rename : Xcode-iPhoneOS/Demos/src/common.h => Xcode-iOS/Demos/src/common.h rename : Xcode-iPhoneOS/Demos/src/fireworks.c => Xcode-iOS/Demos/src/fireworks.c rename : Xcode-iPhoneOS/Demos/src/happy.c => Xcode-iOS/Demos/src/happy.c rename : Xcode-iPhoneOS/Demos/src/keyboard.c => Xcode-iOS/Demos/src/keyboard.c rename : Xcode-iPhoneOS/Demos/src/mixer.c => Xcode-iOS/Demos/src/mixer.c rename : Xcode-iPhoneOS/Demos/src/rectangles.c => Xcode-iOS/Demos/src/rectangles.c rename : Xcode-iPhoneOS/Demos/src/touch.c => Xcode-iOS/Demos/src/touch.c rename : Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj => Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj rename : Xcode-iPhoneOS/SDL/testsdl-Info.plist => Xcode-iOS/SDL/testsdl-Info.plist rename : Xcode-iPhoneOS/Template/SDL iOS Application/Default.png => Xcode-iOS/Template/SDL iOS Application/Default.png rename : Xcode-iPhoneOS/Template/SDL iOS Application/Icon.png => Xcode-iOS/Template/SDL iOS Application/Icon.png rename : Xcode-iPhoneOS/Template/SDL iOS Application/Info.plist => Xcode-iOS/Template/SDL iOS Application/Info.plist rename : Xcode-iPhoneOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns => Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns rename : Xcode-iPhoneOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist => Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist rename : Xcode-iPhoneOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj => Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj rename : Xcode-iPhoneOS/Template/SDL iOS Application/main.c => Xcode-iOS/Template/SDL iOS Application/main.c rename : Xcode-iPhoneOS/Test/Info.plist => Xcode-iOS/Test/Info.plist rename : Xcode-iPhoneOS/Test/README => Xcode-iOS/Test/README rename : Xcode-iPhoneOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj => Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
-
- 03 Jan, 2012 1 commit
-
-
Sam Lantinga authored
-
- 02 Jan, 2012 2 commits
-
-
Ryan C. Gordon authored
(Transplanted from hg changeset 331f27f01cdb to the 1.3 branch.)
-
Sam Lantinga authored
Removed extra build configurations
-
- 01 Jan, 2012 1 commit
-
-
Sam Lantinga authored
-
- 31 Dec, 2011 3 commits
-
-
Sam Lantinga authored
Upgraded SDL Xcode project for XCode 4.2, including switching Framework Version to "B", which is required by the Apple Store.
-
Sam Lantinga authored
-
Sam Lantinga authored
-
- 30 Dec, 2011 1 commit
-
-
Sam Lantinga authored
-