Commit Graph

33 Commits (58aecf0a5409a7c85300197631d5292ade2d253d)

Author SHA1 Message Date
Sam Lantinga cc0296c934 SDL API renaming: SDL_surface.h
Fixes https://github.com/libsdl-org/SDL/issues/6884
2022-12-27 06:36:39 -08:00
Sam Lantinga 0d54115235 SDL API renaming: SDL_render.h
Fixes https://github.com/libsdl-org/SDL/issues/6883
2022-12-27 06:21:13 -08:00
Sam Lantinga fc478c1bc0 SDL API renaming: SDL_joystick.h
Fixes https://github.com/libsdl-org/SDL/issues/6881
2022-12-27 05:50:46 -08:00
Frank Praznik abdfa809db Prepend key modifier enum values with 'SDL_' 2022-12-23 20:35:49 -08:00
Sam Lantinga 5a45d2e58b Updated Xcode project for SDL_main as a header-only library 2022-12-15 10:53:44 -08:00
Daniel Gibson 8e0693c982 Make iOS/tvOS (uikit) SDL_main header-only
Also adjusted iOS demo's includes to <SDL3/..> and explicit SDL_main.h

untested, I don't have Xcode (or a Mac, for that matter)

The xcode projects (for both Xcode-iOS/ and Xcode/) will probably
have to be adjusted for the SDL_main changes to work, but now at least
the iOS demo source should work as is :)
2022-12-15 08:01:01 -08:00
Ryan C. Gordon 5a2d0b69c8
render: Remove SDL_GetRenderDriverInfo and change SDL_CreateRenderer.
Fixes #6625.
2022-12-13 23:27:35 -05:00
Sylvain Becker 932f61348d
Remove mask versions of SDL_CreateRGBSurface* #6701 (#6711)
* Rename SDL_CreateRGBSurface{,From} to SDL_CreateSurface{,From}, which now takes a format parameter
2022-12-01 08:04:02 -08:00
Sylvain Becker fc4fc5295f
Remove depth field from SDL_CreateRGBSurfaceWithFormat and SDL_Create… (#6685)
* Remove depth field from SDL_CreateRGBSurfaceWithFormat and SDL_CreateRGBSurfaceWithFormatFrom
* Removed unused 'flags' parameter from SDL_CreateRGBSurface and SDL_CreateRGBSurfaceWithFormat
* Removed unused 'flags' parameter from SDL_ConvertSurface and SDL_ConvertSurfaceFormat
2022-11-29 09:40:09 -08:00
Sylvain Becker 6a2200823c
Cleanup add brace (#6545)
* Add braces after if conditions

* More add braces after if conditions

* Add braces after while() conditions

* Fix compilation because of macro being modified

* Add braces to for loop

* Add braces after if/goto

* Move comments up

* Remove extra () in the 'return ...;' statements

* More remove extra () in the 'return ...;' statements

* More remove extra () in the 'return ...;' statements after merge

* Fix inconsistent patterns are xxx == NULL vs !xxx

* More "{}" for "if() break;"  and "if() continue;"

* More "{}" after if() short statement

* More "{}" after "if () return;" statement

* More fix inconsistent patterns are xxx == NULL vs !xxx

* Revert some modificaion on SDL_RLEaccel.c

* SDL_RLEaccel: no short statement

* Cleanup 'if' where the bracket is in a new line

* Cleanup 'while' where the bracket is in a new line

* Cleanup 'for' where the bracket is in a new line

* Cleanup 'else' where the bracket is in a new line
2022-11-27 08:38:43 -08:00
Sylvain ce5da5d579
Don't compare pointer against '0', but NULL 2022-11-16 21:47:43 +01:00
Sylvain c0029f01d7 remove 'free' in comment 2021-11-22 08:38:46 -08:00
Sylvain d31251b014 use SDL's functions version inplace of libc version 2021-11-22 08:38:46 -08:00
Sam Lantinga a7e2e3a329 Fixed rendering in the iOS touch demo 2021-11-09 13:36:44 -08:00
Sam Lantinga 1bd4b7fdf1 Updated iOS tests and demos for latest SDL linking requirements 2020-11-06 13:03:07 -08:00
Sam Lantinga dc60b975f3 Removed old iOS-only project and demos 2020-11-06 11:32:59 -08:00
Sam Lantinga 28602b1235 The volume was too high, clamp to SDL_MIX_MAXVOLUME 2017-09-22 11:15:57 -07:00
Sam Lantinga e8187a3f78 Updated iOS keyboard test to cover text input rect and orientation changes 2017-09-14 09:56:16 -07:00
Alex Szpakowski efc43a1d88 More cleanup of the iOS keyboard demo. 2017-08-15 23:00:54 -03:00
Alex Szpakowski a0a09f646c Improve iOS keyboard demo code a bit. 2017-08-15 22:53:57 -03:00
Philipp Wiesemann b84fe2c06b ios: Fixed math include in demos. 2017-05-25 23:01:59 +02:00
Philipp Wiesemann 37b49e6344 ios: Fixed compiler warnings about unused variables in demo. 2017-04-09 23:00:26 +02:00
Sam Lantinga b4e069e7f8 Fixed bug 3517 - Compiler warnings with gcc -Wstrict-prototypes
felix

Compiling even a simple SDL2 'hello world' program with gcc -Wstrict-prototypes (GCC 6.2.1) results in warnings like:

/usr/include/SDL2/SDL_gamecontroller.h:143:1: attention : function declaration isn't a prototype [-Wstrict-prototypes]
 extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings();
 ^~~~~~

It seems there is a missing 'void' between the parentheses.
2016-12-26 02:12:21 -08:00
Philipp Wiesemann c2cb0b0ff4 iOS: Removed unused constant in demo. 2016-09-30 23:31:24 +02:00
Philipp Wiesemann 357c3dd746 iOS: Updated comment in demo. 2016-09-26 23:09:19 +02:00
Alex Szpakowski a8b033d7c4 Update the code for the iOS demos to handle modern devices. Fixes bug #3337 2016-09-25 00:23:35 -03:00
Alex Szpakowski f050576665 Initial Apple TV / tvOS support.
The Apple TV remote is currently exposed as a joystick with its touch surface treated as two axes. Key presses are also generated when its buttons and touch surface are used.

A new hint has been added to help deal with deciding whether to background the app when the remote's menu button is pressed: SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS.
2016-09-13 22:18:06 -03:00
Philipp Wiesemann f3ca4e4d50 iOS: Fixed compiling demos on C89 compilers. 2016-04-01 21:14:49 +02:00
Philipp Wiesemann 62ebc527d0 iOS: Removed not needed SDL_WINDOW_SHOWN from rectangles demo. 2016-03-28 21:01:46 +02:00
Philipp Wiesemann bd60850b82 iOS: Fixed keyboard demo ignoring quit requests and window closing.
This also fixed a warning about an unused variable.
2016-03-28 21:01:26 +02:00
Philipp Wiesemann e9ca5b28a6 iOS: Replaced #import with #include in two demos.
This extension to C is not required here and made the demos less portable.
2016-03-27 22:26:34 +02:00
Philipp Wiesemann 5fa0cbc4ba iOS: Restored older version of rectangles demo.
The demo did not draw rectangles like described in the demo README.
2016-03-27 22:25:13 +02:00
Philipp Wiesemann 0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00