Log

Author Commit Date CI Message
Sam Lantinga a503dabe 2013-10-20T23:23:25 Fixed a crash initializing Android touch IDs
Sam Lantinga f8c11bb9 2013-10-20T23:05:53 Fixed the status bar visibility in iOS 7
Sam Lantinga 85c2e236 2013-10-20T22:23:09 Fixed Y axis inversion on iOS; positive is up, negative is down.
Sam Lantinga 08fa8da7 2013-10-20T21:56:15 Fixed bug 2129 - fix for bug 2121 breaks linking for mingw and throws multiple warnings Andreas Ertelt The problem in question is caused by changeset 7771 (http://hg.libsdl.org/SDL/rev/5486e579872e / https://bugzilla.libsdl.org/show_bug.cgi?id=2121) The redefinition of __inline__ (introduced by the addition of begin_code.h:128's "|| __STRICT_ANSI__") results in mingw's gcc throwing multiple warning: always_inline function might not be inlinable [-Wattributes] as well as a whole bunch of redefinitions of mingw internals which break linking of projects including the SDL2 headers.
Sam Lantinga 4ca34ad4 2013-10-20T21:34:38 Prevent conflicts when linking both SDL2 and SDL2_gfx
Sam Lantinga aa86e05d 2013-10-20T20:49:36 Fixed windows compile
Sam Lantinga f5fa492e 2013-10-20T20:42:55 Added a macro SDL_TICKS_PASSED() to correctly compare two 32-bit tick values. Went through the code and used the macro and fixed a couple places that were using incorrect timestamp comparisons.
Sam Lantinga 04e170ce 2013-10-20T20:41:30 Added __WINDOWS__ to reflect both 32 and 64-bit windows platforms
Ryan C. Gordon d7103996 2013-10-20T23:38:19 Fix some edge cases in XInput haptic timing.
Ryan C. Gordon dddb8787 2013-10-20T23:08:45 Disable Win32 thread naming again. See Bugzilla #2089.
Ryan C. Gordon 0e699eb5 2013-10-20T21:18:05 Added SDL_GL_FRAMEBUFFER_SRGB_CAPABLE (thanks, David!). Fixes Bugzilla #1985.
Ryan C. Gordon d1bde399 2013-10-20T20:24:00 Backed out changeset 737771c47c6f, done testing Buildbot changes.
Ryan C. Gordon df368084 2013-10-20T20:02:02 Intentionally breaking Windows and Raspberry Pi builds to test Buildbot change.
Ryan C. Gordon f28c7fe8 2013-10-20T16:03:11 Backed out hg changeset add2dbe99fe2. REFGUID is apparently a const type.
Ryan C. Gordon c521ae84 2013-10-20T16:02:24 Patched to compile on non-C99 Microsoft compiler.
Ryan C. Gordon a614f186 2013-10-20T16:01:10 Patched to compile on Windows.
Ryan C. Gordon b285b600 2013-10-20T15:55:47 Allow XInput haptics to run for SDL_HAPTIC_INFINITY time (thanks, Mitchell!). Partially fixes Bugzilla #2126.
Ryan C. Gordon 6e1169dd 2013-10-20T15:49:52 Fixed goofy logic in haptic device comparison code. Mitchell Keith Bloch did the research on this bug, and came up with a slightly different patch than this. Partially fixes Bugzilla #2126.
Ryan C. Gordon 54dce3f5 2013-10-20T15:45:48 Don't bother calling SDL_SYS_HapticEffectType() at all for XInput devices.
Ryan C. Gordon 5e74299a 2013-10-20T15:40:20 Fix adding of XInput devices (thanks, Mitchell!) Partially fixes Bugzilla #2126.
Sam Lantinga ade13fd7 2013-10-20T10:39:26 It's okay to quit things more than once.
Sam Lantinga 20f5167d 2013-10-20T10:35:51 Use vertex arrays for drawing points in addition to lines
Sam Lantinga 8fc4fdf1 2013-10-20T10:19:51 Fixed bug 1392 - Debian patch: do not propagate -lpthread manuel.montezelo Since the bug report[1] in 2006 Debian is shipping the patch attached. [1] http://bugs.debian.org/375822 Maybe nowadays you don't propagate that library for linking, so maybe the patch should be dropped, but at the moment I do not have an easy/quick way to check it. So I am submitting this report in the case that you consider it useful (even if maybe the patch itself has to be reworked), or otherwise learn if the patch is unneeded or even harmful.
Sam Lantinga 82b8e6df 2013-10-20T10:10:14 Fixed bug 2158 - Pixel missing in SDL_RenderDrawLines Sean McKean I am running Ubuntu 12.04 (GL version 1.4 Mesa 8.0.4) , and on drawing a set of lines through the renderer through SDL_RenderDrawLines() (looped or not) or SDL_RenderDrawRect() I notice a pixel missing. For RenderDrawLines() it seems to be the second point in the sequence; for RenderDrawRect() it is the lower-right. This can be fixed by specifying SDL_RenderDrawPoint(s), but wouldn't it be easier to specify each pixel in a GL_POINTS glBegin/End loop in the OpenGL code, just to make sure? I also ran the same program on Android; the rendering seemed to be correct, which uses glDrawArrays.
Sam Lantinga a25b5192 2013-10-20T09:58:37 Fixed compiling with the new X11 symbol wrapping
Stefanos Apostolopoulos 6a3478c2 2013-10-20T17:23:43 Fix bug 1300 by querying current border size in ConfigureNotify, and adjusting window coordinates accordingly.
Sam Lantinga e343273a 2013-10-19T01:29:23 Fixed bug 2162 - SDL_RenderClear not clearing entire render target Kevin Wells Overview: SDL_RenderClear is only clearing part of a texture when it is the render target and a different size than the screen. Steps to Reproduce: 1) This only occurs with the render driver set to direct3d, so: SDL_SetHint(SDL_HINT_RENDER_DRIVER,"direct3d") Also, my window was 1280x720. 2) Create a texture for a render target with a resolution of 1024x1024: texture=SDL_CreateTexture(main_window.renderer,SDL_PIXELFORMAT_RGBA8888,SDL_TEXTUREACCESS_TARGET,1024,1024); SDL_SetTextureBlendMode(texture,SDL_BLENDMODE_BLEND); 3) Target the texture for rendering: SDL_SetRenderTarget(main_window.renderer,texture); 4) Set the draw color to whatever you want (problem occurs with both 0,0,0,0 and 0,0,0,255 among others) and then clear the render target: SDL_SetRenderDrawColor(main_window.renderer,0,0,0,0); SDL_RenderClear(main_window.renderer); Actual Results: Only about the top 3/4s of the texture gets cleared on calling SDL_RenderClear. The bottom 1/4 or so does not clear. Expected Results: Entire render target should be cleared.
Ryan C. Gordon b4a00144 2013-10-18T10:56:45 Fixed the XInput2 X11 symbols.
Sam Lantinga 5a026006 2013-10-18T00:49:59 Fixed bug 2108 - CMake does not set X11 includes properly for sdl2-config and friends Marcus von Appen The autotools-based code uses X_CFLAGS and some hackish x_includes code to add some necessary includes to SDL_CFLAGS for proper X11 and OpenGL include handling. At the moment, the cmake-baed build code does not do that. Below is a patch, which provides the necessary changes to add a proper include to the SDL_CFLAGS.
Sam Lantinga 379c0054 2013-10-18T00:47:22 Fixed bug 2123 - SDL_BlitScaled crashes in src/video/SDL_blit_N.c:2145 We need to reset the blit function when switching between scaled and unscaled blits.
Sam Lantinga a329c7f1 2013-10-18T00:13:51 Fixed bug 2139 - SDL_CreateWindow/WIN_GL_LoadLibrary fails due to external iconv not being able to convert path J?nis R?cis Brief history: We recently ported a game from SDL 1.2 to SDL 2. While doing Windows testing, I soon discovered that the game exits without opening a window with my cross-compiled SDL2.dll, but works great with the SDL2.dll from the MinGW SDK on libsdl.org. It was as simple as swapping out the DLLs to make it work. Running the game in Wine showed that the game actually does run, up until the call to SDL_CreateWindow, which fails and leads the game to print out an error: Failure to create window (LoadLibrary("OPENGL32.DLL"): (null)) Which basically says that there was no error, but maybe that's a Wine quirk. The error string originates in SDL_windowsopengl.c, in WIN_GL_LoadLibrary, which contains this piece of code: wpath = WIN_UTF8ToString(path); _this->gl_config.dll_handle = LoadLibrary(wpath); SDL_free(wpath); if (!_this->gl_config.dll_handle) { char message[1024]; SDL_snprintf(message, SDL_arraysize(message), "LoadLibrary(\"%s\")", path); return WIN_SetError(message); } After some digging, I discovered the culprit: WIN_UTF8ToString returns NULL. Why? Because it calls iconv_open from an iconv.dll that does not support the UCS-2-INTERNAL encoding. Why does the official SDL2.dll work? Because it calls no external iconv functions at all. It turns out that the Fedora MinGW infrastructure (from which I obtained the conventiently prebuilt iconv.dll) does not provide a DLL from libiconv, but instead provides a DLL from a minimal Windows library called win-iconv. Which knows a good bit, but doesn't know anything about UCS-2-INTERNAL: http://code.google.com/p/win-iconv/source/browse/trunk/win_iconv.c#155 So there are two problems here: 1) The error message is clearly useless, because LoadLibrary is an innocent bystander. Instead wpath should probably checked for NULL, and a more appropriate error should be set. Ideally something that makes it clear than an external iconv is causing trouble. 2) SDL doomed itself at the ./configure step, by finding an existing iconv and happily using it without confirming support for the mandatory encodings required by SDL. There are certainly a few easy ways out of the situation (although I didn't yet manage to figure out how to prevent ./configure from looking for external iconv), but this had me completely stomped for a good while, so I figured it's worth writing down if anything. (Search also found this, which talks a little about using UTF-16LE instead of UCS-2-INTERNAL: https://bugzilla.libsdl.org/show_bug.cgi?id=2075)
Sam Lantinga 7ae171d1 2013-10-17T23:44:30 Fixed bug 2155 - automatically remap accelerometer coordinates according to screen orientation on Android Denis Bernard Background information: http://android-developers.blogspot.fr/2010/09/one-screen-turn-deserves-another.html and http://developer.android.com/reference/android/hardware/SensorEvent.html Right now, the Android accelerometer event handler feeds raw accelerometer data to the SDL Joystick driver. The result is that for landscape-only applications, the axis need to be swapped if running on a portrait device (like a phone), and vice-versa: running a portrait only app on a landscape device like a tablet. The purpose of this patch is to perform coordinate remapping of the accelerometer data before feeding it to the SDL joystick driver so that the X axis of the joystick is always aligned with the X axis of the display, same for the Y axis. This has been tested on applications that support screen orientation changes as well as applications with fixed screen orientations, both on phones and tablets.
Sam Lantinga 7ad441a3 2013-10-17T23:40:13 Fixed bug 2069 - Device addition/removal queries all USB devices rather than only HID devices. Andreas Ertelt SDL_dxjoystick.c is setting the classguid for device (dis)connect events to USB Devices in general: dbh.dbcc_classguid = GUID_DEVINTERFACE_USB_DEVICE; Wouldn't it make more sense to have it just subscribe to Hid device events? This would mean less meaningless events reaching the application.
Sam Lantinga 3f8df109 2013-10-17T23:15:27 Fixed 1598 - Mingwin build fails on src/audio/xaudio2/SDL_xaudio2.c
Sam Lantinga 888d807a 2013-10-17T23:05:40 Removed redundant #ifdef
Sam Lantinga 12ca3ce3 2013-10-17T23:02:29 Fixed building using MinGW Our SDL_windows.h needed to be included before anything else so UNICODE is defined.
Ryan C. Gordon a2bd8970 2013-10-18T01:36:41 Don't supply duplicate X11 symbols inside SDL. Fixes static linking when something else also uses X11.
Sam Lantinga 95dc9940 2013-10-17T20:49:30 Fix to unbreak SDL_GetSystemRAM() on FreeBSD Marcus von Appen Revision eecbcfed77c9 of the SDL hg repo introduces the new SDL_GetSystemRAM() function, which breaks the build on FreeBSD. Find attached a patch, which unbreaks the build and also should (for most cases) properly implement the sysctl support it.
Sam Lantinga 14e13e13 2013-10-17T17:38:55 Fixed compiler warning if dynamic X11 loading isn't enabled.
Sam Lantinga 7db31223 2013-10-17T17:37:23 Fixed using the wrong variable when reporting a missing SDL scancode mapping.
Sam Lantinga 2e6b4b96 2013-10-17T11:56:33 Fixed compiling on Mac OS X, added a system RAM test
Sam Lantinga 8b79cbad 2013-10-17T11:32:56 Added an API to get the amount of system RAM
Sam Lantinga 852004a2 2013-10-17T11:32:14 The _SC_PHYS_PAGES method of calculating RAM works on Linux.
Sam Lantinga 01164655 2013-10-14T09:15:41 Merged
Sam Lantinga 64e1b1ca 2013-10-14T09:14:09 Fixed project conflict during commit
Sam Lantinga 6435a82d 2013-10-14T09:12:30 Backed out revision fb5ab0e91c56, the platform specific messagebox functions don't have the right prototype since they're designed to be used standalone.
Sam Lantinga 4b603abf 2013-10-14T08:56:55 For some reason, trying to raise the window programmatically while it's alt-tabbed away will minimize it. Added a workaround for this.
Sam Lantinga fea2699c 2013-10-14T08:56:50 Fixed the windows message debug output so it works without HAVE_LIBC
Sam Lantinga e7e86c6d 2013-10-14T08:56:45 Adding static lib to SDL builds on Windows. CR: SamL
Sam Lantinga 06cab857 2013-10-14T08:56:37 Added support for SDL_PIXELFORMAT_UYVY surfaces on Mac OS X
Sam Lantinga 8ec3ba38 2013-10-13T19:59:40 Fixed accumulating mouse wheel motion for the Microsoft Wireless Mouse 5000
Sam Lantinga 080c919b 2013-10-13T19:51:58 Fixed function feature test for Visual Studio 2012 norfanin Fixes the version check for some functions that are only present with the MSVC 2013 CRT libraries. I did my testing wrong and failed to see that 2012 doesn't have these functions. Microsoft implemented them in their upcoming 2013 version, though. The attached patch changes it to the check for the next version. I also removed the HAVE_ITOA because that would require linking with oldnames.lib and it's easier to just let the SDL implementation take over.
Sam Lantinga 2337a684 2013-10-13T19:49:45 Fixed bug 2149 - Don't search for libusbhid except on BSD Joseph Carter There's a whole set of configure tests for BSD's libusbhid, and they only matter on BSD. However, if you have the library on Linux, it gets pulled in as library bloat. And it's bloat of the highest order since not a single function call to the library is ever made unless you're on a *BSD.
Sam Lantinga a7b2db05 2013-10-13T19:48:45 Added an assert to catch init/quit call mismatch that might bite people.
Gabriel Jacobo e9d21339 2013-10-13T17:15:43 Prevent keystrokes from leaking through to the console when using evdev. This uses the same method Weston and X use. Sadly, to be fully effective when launching remotely, this needs root permissions.
Gabriel Jacobo 074a1c4c 2013-10-12T16:29:34 Fixes X11 video backend compilation when no GL is available For example, in our Raspberry Pi sysroot.
Edward Rudd 7bc98157 2013-10-12T11:21:40 added simple Drag & drop test
Gabriel Jacobo f6fa4158 2013-10-12T11:35:47 Updates the Raspberry Pi README
Ryan C. Gordon 9a0954c5 2013-10-11T10:58:05 Do a full sysroot for the Raspberry Pi buildbot. This gets us ALSA and X11, etc.
Sam Lantinga 4349cb57 2013-10-10T21:51:39 Fixed bug 2146 - Enable static linking of libSDL on Android Denis Bernard This patch to Android.mk adds support for static linking of libSDL for Android applications. A patched readme with static build instructions is also provided. It does not break existing build environments setup according to the README-android.txt since the static library version will not be built in not required. The static build uses the Android NDK module system (see docs/IMPORT-MODULE.html in the NDK folder and step 5 in the instructions below). Instructions: 1. Copy the android-project directory wherever you want to keep your projects and rename it to the name of your project. 2. Create a symlink to SDL/src/main/android/SDL_android_main.c as <project>/jni/src/SDL_android_main.c 3. Rename <project>/jni/src/Android_static.mk to <project>/jni/src/Android.mk (overwrite the existing one) 4. Edit <project>/jni/src/Android.mk to include your source files 5. create and export an environment variable named NDK_MODULE_PATH that points to the parent directory of this SDL directory. e.g.: export NDK_MODULE_PATH="$PWD"/.. 6. Edit <project>/src/org/libsdl/app/SDLActivity.java and remove the call to System.loadLibrary("SDL2") line 42. 7. Run 'ndk-build' (a script provided by the NDK). This compiles the C source Although this requires an environment variable to be setup, it can be added once and for all to the main Android.mk of the project.
Sam Lantinga a7e1fddd 2013-10-10T21:50:25 Updated SDL to version 2.0.1
Sam Lantinga 15682c0c 2013-10-10T20:58:20 Report joystick added/removed events even if we don't have udev. T. Joseph Carter As discussed (possibly to death), the Linux joystick driver does not actually report events for added or removed joysticks when you haven't got udev support. We simply cannot know about removed joysticks without udev. But we can (and we should) report adding them. This brings the legacy case in line with pretty much the rest of SDL's joystick drivers.
Ryan C. Gordon 69e1e779 2013-10-10T02:37:36 Raspberry Pi build script: let caller specify final tarball name.
Ryan C. Gordon f7e0a9b2 2013-10-10T02:21:41 Patched to compile in C90 mode.
Ryan C. Gordon 6b2291d1 2013-10-10T02:06:14 Fixed tarball name in Raspberry Pi build script.
Ryan C. Gordon 4f305b85 2013-10-10T01:46:39 Added script that the buildbot will use for cross-compiling to Raspberry Pi.
Gabriel Jacobo 89131435 2013-10-10T00:49:57 Adds gl_profile_mask to test framework, uses it in testgles
Gabriel Jacobo d0fddfab 2013-10-10T00:30:03 Fixes Bug 2134 - [Android] Black screen after resume (sometimes)
Gabriel Jacobo eaa4300f 2013-10-09T11:30:01 Fixes testgles and testgl
Gabriel Jacobo 24f23771 2013-10-09T10:29:01 Adds test framework to Android.mk and a simple utility to build Android projects
J?rgen P. Tjern? 2568a367 2013-10-07T16:01:40 Mac: Better handling when someone else is the app delegate.
J?rgen P. Tjern? c455f729 2013-10-07T14:16:38 Fix SDL_SetWindowPosition on fullscreen windows. This reverts http://hg.libsdl.org/SDL/rev/7cdeb64faa72 and fixes it in the correct way. If you call SDL_SetWindowPosition on a fullscreen window, it would update the x & y variables for the window, but not actually move the window (since it was fullscreen). That would make the internal state of the SDL_Window incorrect, causing SDL_WarpMouseInWindow to offset incorrectly. This makes it so SDL_SetWindowPosition updates the `windowed' x & y coordinates, which take effect when you revert from fullscreen.
Sam Lantinga cca09422 2013-10-06T20:39:23 Only allocate a joystick instance ID once we know it's a joystick. This fixes compatibility with code that assumes 0 based joystick instance IDs.
Sam Lantinga 11c45c4e 2013-10-06T13:50:36 Removed unused variables (thanks Joseph!)
Sam Lantinga 8f46bcfd 2013-10-06T13:49:23 Check for NULL joystick in SDL_JoystickGetGUID()
Sam Lantinga 90a219a3 2013-10-05T21:15:55 Fixed bug where a Logitech wireless keyboard with built-in mouse touchpad didn't get recongized as both devices.
Sam Lantinga 52966427 2013-10-05T19:09:03 Fixed bug 2132 - Tests may use invalid SDL_window pointers when windows are closed norfanin Some of the tests keep using the pointers of a destroyed SDL_Window when the common event handling handled the close event. The event handler itself does not NULL the pointer after the destruction. The attached patch adds a loop in the handler that will assign NULL to the destroyed window. It also adds checks to some of the tests so they skip those windows by checking for NULL.
Sam Lantinga 36b75917 2013-10-05T12:29:05 Do a 32-bit compare on RGBA values. Thsi should be inlined in optimized builds.
Philipp Wiesemann 0db36f51 2013-10-05T17:08:19 Added detection of touch devices before first touch events happen on Android. On Android available touch devices are now added with video initialization (like the keyboard). This fixes SDL_GetNumTouchDevices() returning 0 before any touch events happened although there is a touch screen available. The adding of touch devices after a touch event was received is still active to allow connecting devices later (if this is possible) and to provide a fallback if the new init did not work somehow. For the implementation JNI was used and API level 9 is required. There seems to be nothing in the Android NDK's input header (input.h) to implement everything on C side without communication with Java side.
Ryan C. Gordon 5607cc45 2013-10-05T00:29:57 Avoid redundant state changes in the GLES2 renderer.
Ryan C. Gordon 500e4f6f 2013-10-04T11:25:14 Removed "u_colorTable" uniform from the GLES2 renderer. It's not used anywhere.
Gabriel Jacobo 9c489c7c 2013-10-04T08:23:37 Fix EGL/OpenGL ES paths
Sam Lantinga 9cbd05df 2013-10-03T21:41:09 Report an error if creating a render target fails
Sam Lantinga 50989846 2013-10-03T20:48:52 Added optional error checking for OpenGL ES 2.0 in the same style as the OpenGL renderer. You can enable it like this: SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
Sam Lantinga e5ef978e 2013-10-03T20:42:43 Fixed a potential double-free bug if glGenTextures() failed.
Gabriel Jacobo b39a4daf 2013-10-03T10:28:10 SDL_TEXTINPUT support for EVDEV
Sam Lantinga 1f21484b 2013-10-03T03:31:05 Fixed const/non-const warning
Sam Lantinga 8fbd7dc7 2013-10-03T00:54:58 Fixed bug 2130 - Two members of Windows WindowData not initialized norfanin SetupWindowData in SDL_windowswindow.c doesn't initialize two members of SDL_WindowData with NULL. This is an issue because other parts of the SDL code seem to make the assumption that this is the case. WIN_DestroyWindowFramebuffer for example uses data->mdc and data->hbm if they're not NULL.
Ryan C. Gordon ce45fa28 2013-10-02T22:18:04 SDLK_DELETE should probably be SDLK_BACKSPACE on iOS. The key on the software keyboard works like backspace, at least. Not sure what happens with a bluetooth keyboard here.
Ryan C. Gordon 958640e5 2013-10-02T22:16:11 Get rid of glGetError() calls in GLES2 renderer. It's not usually useful, and it causes pipeline stalls.
Gabriel Jacobo 57e09318 2013-10-01T08:47:06 Uses SDL_UDEV for Linux joystick hotplugging
Sam Lantinga 69a4351e 2013-09-30T22:35:32 Fixed bug 2121 - GCC throws error on SDL_FORCE_INLINE when compiling with -ansi
Sam Lantinga 22a972a4 2013-09-30T22:16:14 Fixed bug 2122 - SDL_CreateTexture allows illegal texture sizes Lloyd Bryant SDL_CreateTexture() is succeeding (i.e. returning a valid pointer) when the requested horizontal or vertical size of the texture exceeds the maximum allowed by the render. This results in hard-to-understand errors showing up when later attempting to use that texture (such as with SDL_SetRenderTarget()).
Sam Lantinga 058aba08 2013-09-30T21:57:03 Fixed bug 2119 - compiler warnings (-pedantic) SDL_video.h:111:42
Gabriel Jacobo 889b6bd7 2013-09-28T19:23:59 Removes unused property use_egl from internal structure gl_config
Gabriel Jacobo c691de00 2013-09-28T19:17:27 Fix: SDL_EVDEV_device_removed does not need UDEV
Sam Lantinga 202528a4 2013-09-28T14:07:17 Call AddRef() on the device so it doesn't accidentally get released from underneath the caller.
Sam Lantinga 25f607a3 2013-09-28T14:07:14 Make it clear we're just returning a D3D9 device, allowing for new functions to get other D3D versions
Sam Lantinga cf5e5a83 2013-09-28T14:07:08 Added a hint to create the D3D device in thread-safe mode: SDL_HINT_RENDER_DIRECT3D_THREADSAFE
Sam Lantinga 803965bc 2013-09-28T14:07:05 Added platform specific call: SDL_RenderGetD3DDevice()