author Sam Lantinga
Sun, 13 Aug 2017 18:12:06 -0700
changeset 11263 f85618f8ba81
parent 10521 caea79aa9035
child 11449 b7f6c4f8fbb3
permissions -rw-r--r--
Fixed bug 2812 - Make libSDL2main.a usable on Android via a dummy symbol

Jonas Kulla

This eliminates the need to manually compile in SDL_main_android.c.
Instead, add "-lSDL2main -Wl,-u,SDL_main_dummy" when linking.

I don't know how the nkd-build process works, but unless it was
for some reason linking libSDL2main.a it should be unaffected.
     2 This is a list of major changes in SDL's version history.
     4 ---------------------------------------------------------------------------
     5 2.0.5:
     6 ---------------------------------------------------------------------------
     8 General:
     9 * Implemented audio capture support for some platforms
    10 * Added SDL_DequeueAudio() to retrieve audio when buffer queuing is turned on for audio capture
    11 * Added events for dragging and dropping text
    12 * Added events for dragging and dropping multiple items
    13 * By default the click raising a window will not be delivered to the SDL application. You can set the hint SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH to "1" to allow that click through to the window.
    14 * Saving a surface with an alpha channel as a BMP will use a newer BMP format that supports alpha information. You can set the hint SDL_HINT_BMP_SAVE_LEGACY_FORMAT to "1" to use the old format.
    15 * Added SDL_GetHintBoolean() to get the boolean value of a hint
    16 * Added SDL_RenderSetIntegerScale() to set whether to smoothly scale or use integral multiples of the viewport size when scaling the rendering output
    17 * Added SDL_CreateRGBSurfaceWithFormat() and SDL_CreateRGBSurfaceWithFormatFrom() to create an SDL surface with a specific pixel format
    18 * Added SDL_GetDisplayUsableBounds() which returns the area usable for windows. For example, on Mac OS X, this subtracts the area occupied by the menu bar and dock.
    19 * Added SDL_GetWindowBordersSize() which returns the size of the window's borders around the client area
    20 * Added a window event SDL_WINDOWEVENT_HIT_TEST when a window had a hit test that wasn't SDL_HITTEST_NORMAL (e.g. in the title bar or window frame)
    21 * Added SDL_SetWindowResizable() to change whether a window is resizable
    22 * Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity() to affect the window transparency
    23 * Added SDL_SetWindowModalFor() to set a window as modal for another window
    24 * Added support for AUDIO_U16LSB and AUDIO_U16MSB to SDL_MixAudioFormat()
    25 * Fixed flipped images when reading back from target textures when using the OpenGL renderer
    26 * Fixed texture color modulation with SDL_BLENDMODE_NONE when using the OpenGL renderer
    27 * Fixed bug where the alpha value of colorkeys was ignored when blitting in some cases
    29 Windows:
    30 * Added a hint SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING to prevent SDL from raising a debugger exception to name threads. This exception can cause problems with .NET applications when running under a debugger.
    31 * The hint SDL_HINT_THREAD_STACK_SIZE is now supported on Windows
    32 * Fixed XBox controller triggers automatically being pulled at startup
    33 * The first icon from the executable is used as the default window icon at runtime
    34 * Fixed SDL log messages being printed twice if SDL was built with C library support
    35 * Reset dead keys when the SDL window loses focus, so dead keys pressed in SDL applications don't affect text input into other applications.
    37 Mac OS X:
    38 * Fixed selecting the dummy video driver
    39 * The caps lock key now generates a pressed event when pressed and a released event when released, instead of a press/release event pair when pressed.
    40 * Fixed mouse wheel events on Mac OS X 10.12
    41 * The audio driver has been updated to use AVFoundation for better compatibility with newer versions of Mac OS X
    43 Linux:
    44 * Added support for the Fcitx IME
    45 * Added a window event SDL_WINDOWEVENT_TAKE_FOCUS when a window manager asks the SDL window whether it wants to take focus.
    46 * Refresh rates are now rounded instead of truncated, e.g. 59.94 Hz is rounded up to 60 Hz instead of 59.
    47 * Added initial support for touchscreens on Raspberry Pi
    49 OpenBSD:
    50 * SDL_GetBasePath() is now implemented on OpenBSD
    52 iOS:
    53 * Added support for dynamically loaded objects on iOS 8 and newer
    55 tvOS:
    56 * Added support for Apple TV
    57 * Added a hint SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION to control whether he Apple TV remote's joystick axes will automatically match the rotation of the remote.  
    59 Android:
    60 * Fixed SDL not resizing window when Android screen resolution changes
    61 * Corrected the joystick Z axis reporting for the accelerometer
    63 Emscripten (running in a web browser):
    64 * Many bug fixes and improvements
    67 ---------------------------------------------------------------------------
    68 2.0.4:
    69 ---------------------------------------------------------------------------
    71 General:
    72 * Added support for web applications using Emscripten, see docs/README-emscripten.md for more information
    73 * Added support for web applications using Native Client (NaCl), see docs/README-nacl.md for more information
    74 * Added an API to queue audio instead of using the audio callback:
    75     SDL_QueueAudio(), SDL_GetQueuedAudioSize(), SDL_ClearQueuedAudio()
    76 * Added events for audio device hot plug support:
    78 * Added SDL_PointInRect()
    79 * Added SDL_HasAVX2() to detect CPUs with AVX2 support
    80 * Added SDL_SetWindowHitTest() to let apps treat parts of their SDL window like traditional window decorations (drag areas, resize areas)
    81 * Added SDL_GetGrabbedWindow() to get the window that currently has input grab, if any
    82 * Added SDL_RenderIsClipEnabled() to tell whether clipping is currently enabled in a renderer
    83 * Added SDL_CaptureMouse() to capture the mouse to get events while the mouse is not in your window
    84 * Added SDL_WarpMouseGlobal() to warp the mouse cursor in global screen space
    85 * Added SDL_GetGlobalMouseState() to get the current mouse state outside of an SDL window
    86 * Added a direction field to mouse wheel events to tell whether they are flipped (natural) or not
    87 * Added GL_CONTEXT_RELEASE_BEHAVIOR GL attribute (maps to [WGL|GLX]_ARB_context_flush_control extension)
    88 * Added EGL_KHR_create_context support to allow OpenGL ES version selection on some platforms
    89 * Added NV12 and NV21 YUV texture support for OpenGL and OpenGL ES 2.0 renderers
    90 * Added a Vivante video driver that is used on various SoC platforms
    91 * Added an event SDL_RENDER_DEVICE_RESET that is sent from the D3D renderers when the D3D device is lost, and from Android's event loop when the GLES context had to be recreated
    92 * Added a hint SDL_HINT_NO_SIGNAL_HANDLERS to disable SDL's built in signal handling
    93 * Added a hint SDL_HINT_THREAD_STACK_SIZE to set the stack size of SDL's threads
    94 * Added SDL_sqrtf(), SDL_tan(), and SDL_tanf() to the stdlib routines
    95 * Improved support for WAV and BMP files with unusual chunks in them
    96 * Renamed SDL_assert_data to SDL_AssertData and SDL_assert_state to SDL_AssertState
    97 * Added a hint SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN to prevent window interaction while cursor is hidden
    98 * Added SDL_GetDisplayDPI() to get the DPI information for a display
    99 * Added SDL_JoystickCurrentPowerLevel() to get the battery level of a joystick
   100 * Added SDL_JoystickFromInstanceID(), as a helper function, to get the SDL_Joystick* that an event is referring to.
   101 * Added SDL_GameControllerFromInstanceID(), as a helper function, to get the SDL_GameController* that an event is referring to.
   103 Windows:
   104 * Added support for Windows Phone 8.1 and Windows 10/UWP (Universal Windows Platform)
   105 * Timer resolution is now 1 ms by default, adjustable with the SDL_HINT_TIMER_RESOLUTION hint
   106 * SDLmain no longer depends on the C runtime, so you can use the same .lib in both Debug and Release builds
   107 * Added SDL_SetWindowsMessageHook() to set a function to be called for every windows message before TranslateMessage()
   108 * Added a hint SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP to control whether SDL_PumpEvents() processes the Windows message loop
   109 * You can distinguish between real mouse and touch events by looking for SDL_TOUCH_MOUSEID in the mouse event "which" field
   110 * SDL_SysWMinfo now contains the window HDC
   111 * Added support for Unicode command line options
   112 * Prevent beeping when Alt-key combos are pressed
   113 * SDL_SetTextInputRect() re-positions the OS-rendered IME
   114 * Added a hint SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 to prevent generating SDL_WINDOWEVENT_CLOSE events when Alt-F4 is pressed
   115 * Added a hint SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING to use the old axis and button mapping for XInput devices (deprecated)
   117 Mac OS X:
   118 * Implemented drag-and-drop support
   119 * Improved joystick hot-plug detection
   120 * The SDL_WINDOWEVENT_EXPOSED window event is triggered in the appropriate situations
   121 * Fixed relative mouse mode when the application loses/regains focus
   122 * Fixed bugs related to transitioning to and from Spaces-aware fullscreen-desktop mode
   123 * Fixed the refresh rate of display modes
   124 * SDL_SysWMInfo is now ARC-compatible
   125 * Added a hint SDL_HINT_MAC_BACKGROUND_APP to prevent forcing the application to become a foreground process
   127 Linux:
   128 * Enabled building with Mir and Wayland support by default.
   129 * Added IBus IME support
   130 * Added a hint SDL_HINT_IME_INTERNAL_EDITING to control whether IBus should handle text editing internally instead of sending SDL_TEXTEDITING events
   131 * Added a hint SDL_HINT_VIDEO_X11_NET_WM_PING to allow disabling _NET_WM_PING protocol handling in SDL_CreateWindow()
   132 * Added support for multiple audio devices when using Pulseaudio
   133 * Fixed duplicate mouse events when using relative mouse motion
   135 iOS:
   136 * Added support for iOS 8
   137 * The SDL_WINDOW_ALLOW_HIGHDPI window flag now enables high-dpi support, and SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() gets the window resolution in pixels
   138 * SDL_GetWindowSize() and display mode sizes are in the "DPI-independent points" / "screen coordinates" coordinate space rather than pixels (matches OS X behavior)
   139 * Added native resolution support for the iPhone 6 Plus
   140 * Added support for MFi game controllers
   141 * Added support for the hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK
   142 * Added sRGB OpenGL ES context support on iOS 7+
   143 * Added support for SDL_DisableScreenSaver(), SDL_EnableScreenSaver() and the hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER
   144 * SDL_SysWMinfo now contains the OpenGL ES framebuffer and color renderbuffer objects used by the window's active GLES view
   145 * Fixed various rotation and orientation issues
   146 * Fixed memory leaks
   148 Android:
   149 * Added a hint SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH to prevent mouse events from being registered as touch events
   151 * Added support for SDL_DisableScreenSaver(), SDL_EnableScreenSaver() and the hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER
   152 * Added support for SDL_ShowMessageBox() and SDL_ShowSimpleMessageBox()
   154 Raspberry Pi:
   155 * Added support for the Raspberry Pi 2
   158 ---------------------------------------------------------------------------
   159 2.0.3:
   160 ---------------------------------------------------------------------------
   162 Mac OS X:
   163 * Fixed creating an OpenGL context by default on Mac OS X 10.6
   166 ---------------------------------------------------------------------------
   167 2.0.2:
   168 ---------------------------------------------------------------------------
   169 General:
   170 * Added SDL_GL_ResetAttributes() to reset OpenGL attributes to default values
   171 * Added an API to load a database of game controller mappings from a file:
   172     SDL_GameControllerAddMappingsFromFile(), SDL_GameControllerAddMappingsFromRW()
   173 * Added game controller mappings for the PS4 and OUYA controllers
   174 * Added SDL_GetDefaultAssertionHandler() and SDL_GetAssertionHandler()
   175 * Added SDL_DetachThread()
   176 * Added SDL_HasAVX() to determine if the CPU has AVX features
   177 * Added SDL_vsscanf(), SDL_acos(), and SDL_asin() to the stdlib routines
   178 * EGL can now create/manage OpenGL and OpenGL ES 1.x/2.x contexts, and share
   180 * Added a field "clicks" to the mouse button event which records whether the event is a single click, double click, etc.
   181 * The screensaver is now disabled by default, and there is a hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER that can change that behavior.
   182 * Added a hint SDL_HINT_MOUSE_RELATIVE_MODE_WARP to specify whether mouse relative mode should be emulated using mouse warping.
   183 * testgl2 does not need to link with libGL anymore
   184 * Added testgles2 test program to demonstrate working with OpenGL ES 2.0
   185 * Added controllermap test program to visually map a game controller
   187 Windows:
   188 * Support for OpenGL ES 2.x contexts using either WGL or EGL (natively via
   189   the driver or emulated through ANGLE)
   190 * Added a hint SDL_HINT_VIDEO_WIN_D3DCOMPILER to specify which D3D shader compiler to use for OpenGL ES 2 support through ANGLE
   191 * Added a hint SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT that is useful when creating multiple windows that should share the same OpenGL context.
   192 * Added an event SDL_RENDER_TARGETS_RESET that is sent when D3D9 render targets are reset after the device has been restored.
   194 Mac OS X:
   195 * Added a hint SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK to control whether Ctrl+click should be treated as a right click on Mac OS X. This is off by default.
   197 Linux:
   198 * Fixed fullscreen and focused behavior when receiving NotifyGrab events
   199 * Added experimental Wayland and Mir support, disabled by default
   201 Android:
   202 * Joystick support (minimum SDK version required to build SDL is now 12, 
   203   the required runtime version remains at 10, but on such devices joystick 
   204   support won't be available).
   205 * Hotplugging support for joysticks
   206 * Added a hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK to control whether the accelerometer should be listed as a 3 axis joystick, which it will by default.
   209 ---------------------------------------------------------------------------
   210 2.0.1:
   211 ---------------------------------------------------------------------------
   213 General:
   214 * Added an API to get common filesystem paths in SDL_filesystem.h:
   215     SDL_GetBasePath(), SDL_GetPrefPath()
   216 * Added an API to do optimized YV12 and IYUV texture updates:
   217     SDL_UpdateYUVTexture()
   218 * Added an API to get the amount of RAM on the system:
   219     SDL_GetSystemRAM()
   220 * Added a macro to perform timestamp comparisons with SDL_GetTicks():
   221     SDL_TICKS_PASSED()
   222 * Dramatically improved OpenGL ES 2.0 rendering performance
   223 * Added OpenGL attribute SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
   225 Windows:
   226 * Created a static library configuration for the Visual Studio 2010 project
   227 * Added a hint to create the Direct3D device with support for multi-threading:
   229 * Added a function to get the D3D9 adapter index for a display:
   230     SDL_Direct3D9GetAdapterIndex()
   231 * Added a function to get the D3D9 device for a D3D9 renderer:
   232     SDL_RenderGetD3D9Device()
   233 * Fixed building SDL with the mingw32 toolchain (mingw-w64 is preferred)
   234 * Fixed crash when using two XInput controllers at the same time
   235 * Fixed detecting a mixture of XInput and DirectInput controllers
   236 * Fixed clearing a D3D render target larger than the window
   237 * Improved support for format specifiers in SDL_snprintf()
   239 Mac OS X:
   240 * Added support for retina displays:
   241   Create your window with the SDL_WINDOW_ALLOW_HIGHDPI flag, and then use SDL_GL_GetDrawableSize() to find the actual drawable size. You are responsible for scaling mouse and drawing coordinates appropriately.
   242 * Fixed mouse warping in fullscreen mode
   243 * Right mouse click is emulated by holding the Ctrl key while left clicking
   245 Linux:
   246 * Fixed float audio support with the PulseAudio driver
   247 * Fixed missing line endpoints in the OpenGL renderer on some drivers
   248 * X11 symbols are no longer defined to avoid collisions when linking statically
   250 iOS:
   251 * Fixed status bar visibility on iOS 7
   252 * Flipped the accelerometer Y axis to match expected values
   254 Android:
   255 IMPORTANT: You MUST get the updated SDLActivity.java to match C code
   256 * Moved EGL initialization to native code 
   257 * Fixed the accelerometer axis rotation relative to the device rotation
   258 * Fixed race conditions when handling the EGL context on pause/resume
   259 * Touch devices are available for enumeration immediately after init
   261 Raspberry Pi:
   262 * Added support for the Raspberry Pi, see README-raspberrypi.txt for details