sdl2_frt/include
Sam Lantinga 1a4c0d4e17 Fixed bug 4377 - SDL_PIXELFORMAT enum is anonymous, which prevents its use in a templated function
zen3d

While trying to build Pixie lisp (https://github.com/pixie-lang/pixie), which uses SDL for multimedia output, the mandelbrot example won't build. The problem is that internally pixie uses a templated function to dump a value, and gcc chokes because SDL_PIXELFORMAT_RGA8888 is an anonymous enum.

I solved the problem locally by changing from:
   enum {
      SDL_PIXELFORMAT_UNKNOWN,
      ... etc. ...
      SDL_PIXELFORMAT_YUYV = ... etc ...
   };
to:
   typedef enum {
      SDL_PIXELFORMAT_UNKNOWN,
      ... etc. ...
      SDL_PIXELFORMAT_YUYV = ... etc ...
   } SDL_PIXELFORMAT_ENUM;
The net result of this change is that the enum containing SDL_PIXELFORMAT_* is no longer an anonymous enum and can now be used by a templated function.

This local change fixes Pixie lisp for me.

I did notice that you use the idiom
   typedef enum {
      ... etc ...
   } SDL_FOO;
elsewhere in your code, so that change to SDL_PIXELFORMAT doesn't look like it would have a negative impact.
2018-11-12 19:23:49 -08:00
..
begin_code.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
close_code.h close_code.h: #error if included without matching begin_code.h 2018-11-06 23:45:50 +03:00
SDL_assert.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_atomic.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_audio.h commit c6b28f46b8116552ec2b38d1d3c8535df28ba7a1 2018-10-01 09:47:10 -07:00
SDL_bits.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_blendmode.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_clipboard.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_config_android.h First pass on the new SDL sensor API 2018-08-21 12:11:34 -07:00
SDL_config_iphoneos.h Don't build SDL_JOYSTICK_HIDAPI by default on iOS 2018-10-26 09:27:31 -07:00
SDL_config_macosx.h Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
SDL_config_minimal.h Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
SDL_config_os2.h SDL_power.c: Adjust SDL_POWER_DISABLED ifdefs to avoid zero-size array 2018-10-15 11:01:00 +03:00
SDL_config_pandora.h Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
SDL_config_psp.h Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
SDL_config_windows.h Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
SDL_config_winrt.h Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
SDL_config_wiz.h Added a dummy sensor driver 2018-08-21 13:29:21 -07:00
SDL_config.h add a minimal config and makefile to test watcom/os2 builds. 2018-10-14 23:56:56 +03:00
SDL_config.h.cmake mir: Removed mir client support. 2018-11-02 21:34:17 -04:00
SDL_config.h.in mir: Removed mir client support. 2018-11-02 21:34:17 -04:00
SDL_copying.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cpuinfo.h audio: Added ARM NEON versions of audio converters. 2018-05-16 02:03:06 -04:00
SDL_egl.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_endian.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_error.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_events.h Added SDL_GetDisplayOrientation() to get the display orientation, and added a new event SDL_DISPLAYEVENT to notify the application when the orientation changes. 2018-08-22 21:48:28 -07:00
SDL_filesystem.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_gamecontroller.h Generalized the XInput user index into a player index 2018-10-25 16:53:14 -07:00
SDL_gesture.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_haptic.h Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. 2018-08-09 16:00:17 -07:00
SDL_hints.h Merge SDL-ryan-batching-renderer branch to default. 2018-10-31 15:03:41 -04:00
SDL_joystick.h Generalized the XInput user index into a player index 2018-10-25 16:53:14 -07:00
SDL_keyboard.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_keycode.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_loadso.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_log.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_main.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_messagebox.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_mouse.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_mutex.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_name.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_opengl_glext.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_opengl.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_opengles2_gl2.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_opengles2_gl2ext.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_opengles2_gl2platform.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_opengles2_khrplatform.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_opengles2.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_opengles.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_pixels.h Fixed bug 4377 - SDL_PIXELFORMAT enum is anonymous, which prevents its use in a templated function 2018-11-12 19:23:49 -08:00
SDL_platform.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_power.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_quit.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_rect.h render: Add floating point versions of various draw APIs. 2018-10-23 01:34:03 -04:00
SDL_render.h render: Add floating point versions of various draw APIs. 2018-10-23 01:34:03 -04:00
SDL_revision.h revert files I didnt mean to commit! 2017-09-29 10:15:44 -07:00
SDL_rwops.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_scancode.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_sensor.h Fixed a comment typo. 2018-09-05 21:24:13 -04:00
SDL_shape.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_stdinc.h Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. 2018-08-09 16:00:17 -07:00
SDL_surface.h Fixed bug 4264 - SDL_CreateTextureFromSurface generates error message but returns ok 2018-09-24 16:41:55 -07:00
SDL_system.h Moved SDL_IsTablet() to a cross-platform API function 2018-08-21 20:03:54 -07:00
SDL_syswm.h fix bug #4362 - SDL_syswm.h with SDL_PROTOTYPES_ONLY broken in C++ mode 2018-11-06 20:50:24 +03:00
SDL_test_assert.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test_common.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test_compare.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test_crc32.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test_font.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test_fuzzer.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test_harness.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test_images.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test_log.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test_md5.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test_memory.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test_random.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_test.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_thread.h SDL_thread.h: undefine SDL_CreateThreadWithStackSize before redefining. 2018-10-12 01:03:40 +03:00
SDL_timer.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_touch.h Add SDL_TouchDeviceType enum and SDL_GetTouchDeviceType(SDL_TouchID id). 2018-11-10 16:15:48 -04:00
SDL_types.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_version.h Updated version to 2.0.9 2018-09-26 10:08:14 -07:00
SDL_video.h Added SDL_GetDisplayOrientation() to get the display orientation, and added a new event SDL_DISPLAYEVENT to notify the application when the orientation changes. 2018-08-22 21:48:28 -07:00
SDL_vulkan.h vulkan: SDL_Vulkan_GetInstanceExtensions should accept a NULL window. 2018-08-24 09:49:48 -04:00
SDL.h First pass on the new SDL sensor API 2018-08-21 12:11:34 -07:00