Commit Graph

74 Commits

Author SHA1 Message Date
Sam Lantinga
a0e3c884d4 Updated to version 2.0.21 for development 2022-01-17 15:32:27 -08:00
kenmays
094e94402d haiku: Remove BDirectWindow, fix OpenGL handling.
From e6cc4e7f4b8189be55dd3b0e13e54e59f73d7672 Mon Sep 17 00:00:00 2001
From: X512 <danger_mail@list.ru>
Date: Thu, 30 Jan 2020 04:01:58 +0900
Subject: libsdl2: Remove BDirectWindow, fix OpenGL handling.

* BDirectWindow changed to BWindow.
* Implemented fullscreen.
* Introduced view for non-OpenGL drawing.
* Drawing thread removed, window thread is used instead.
* Use BGLView as OpenGL context. Implement proper context switching and OpenGL
  locking. Only one context per window is supported. BGLView should be not
  deleted when window is closed, it deleted when deleting context.
2022-01-12 09:32:56 -08:00
Sam Lantinga
9294634840 Updated to version 2.0.20 for release 2022-01-07 18:29:40 -08:00
Sam Lantinga
120c76c84b Updated copyright for 2022 2022-01-03 09:40:21 -08:00
Ozkan Sezer
8cee50eea5 removed stdlib.h from SDL_psp_main.c now that exit() is gone. 2021-12-07 19:32:56 +03:00
Wouter Wijsman
da5dbb4763
Fix SDL2main on PSP (#5076)
- Fix SDL2main on PSP
  SDL2main was not working for PSP, because it wasn't being activated and
  it wasn't unsetting the main. Besides that a debug screen being started
  was causing issues with joystick input and the sceKernelExitGame calli
  is no longer needed with the current PSPDEV SDK.
- Clean up imports in PSP main
- Set PSP GPU and user modes in main
- Fix exit callback in PSP main
2021-12-07 18:43:50 +03:00
Sam Lantinga
5fc901d4f3 Updated to version 2.0.19 for development 2021-11-30 09:58:21 -08:00
Sam Lantinga
7242075b2b Updated version to 2.0.18 for release 2021-11-26 08:12:45 -08:00
Sam Lantinga
3f6ebffff4 Updated to version 2.0.17 for development 2021-08-10 15:02:36 -07:00
Sam Lantinga
a91ab883e9 Fixed building on Windows with cmake, ninja, and clang 2021-08-06 12:28:24 -07:00
Sam Lantinga
cb1fd30e9a Updated to version 2.0.16 for release 2021-07-31 13:28:54 -07:00
Sam Lantinga
3a4b217d6c Allow defining SDL_MAIN_HANDLED on iOS if you're using another runtime that provides an application delegate 2021-07-31 12:44:29 -07:00
Sam Lantinga
deed21a83d Removed useless forward declaration 2021-07-31 12:44:11 -07:00
Steven Noonan
f1ad942a11 SDL_windows_main: use HeapAlloc/HeapFree for command line arguments
If a developer uses SDL_SetMemoryFunctions, we can't rely on SDL_free()
working when SDL_main() returns.

Signed-off-by: Steven Noonan <steven@valvesoftware.com>
Signed-off-by: Sam Lantinga <slouken@libsdl.org>
2021-04-22 17:26:13 -07:00
Ozkan Sezer
8cb421b26d SDL_windows_main.c: use new WIN_StringToUTF8W macro 2021-01-04 10:20:10 +03:00
Sam Lantinga
9130f7c377 Updated copyright for 2021 2021-01-02 10:25:38 -08:00
Sam Lantinga
350f1b0d16 Updated SDL to version 2.0.15 for development 2020-12-22 10:36:15 -08:00
Sam Lantinga
a2098a47b6 Updated SDL to 2.0.14 in preparation for release candidate 2020-12-08 18:56:06 -08:00
Ryan C. Gordon
940419b0a6 uikit: Fixed a typo in a comment. 2020-11-10 13:09:59 -05:00
Ryan C. Gordon
fa23e3d00b locale: Implemented SDL_GetPreferredLocales().
This was something I proposed a long time ago, Sylvain Becker did
additional work on it, then back to me.

Fixes Bugzilla #2131.
2020-05-04 02:27:29 -04:00
Sam Lantinga
93ed3c8baf Updated SDL to version 2.0.13 for development builds 2020-03-10 18:25:47 -07:00
Sam Lantinga
983bbf9ef3 Backed out changeset 51622f74dc85 2020-03-10 18:35:31 -07:00
Sam Lantinga
4fb06a2a38 Updated SDL to version 2.0.13 for development builds 2020-03-10 18:25:47 -07:00
Sam Lantinga
74ed215618 Updated version to 2.0.12 for release candidate build 2020-03-01 14:58:16 -08:00
Sam Lantinga
a8780c6a28 Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
Peter Kosyh
33ae5e5e99 haiku: mouse_relative fix
Partially fixes Bugzilla #4442.
2019-11-11 22:23:33 -05:00
Peter Kosyh
79510b7569 haiku: mouse->ShowMouse method added
Partially fixes Bugzilla #4442.
2019-11-11 22:22:40 -05:00
Gerasim Troeglazov
95a402d745 haiku: Add support for relative mouse mode.
Partially fixes Bugzilla #4442.
2019-11-11 22:21:17 -05:00
Gerasim Troeglazov
bd648bd5a3 haiku: Add simple relative mode for mouse.
Partially fixes Bugzilla #4442.
2019-11-11 22:18:21 -05:00
Peter Kosyh
55b5d8dce6 haiku: Invert mouse wheel values to match what SDL expects.
Partially fixes Bugzilla #4442.
2019-11-11 21:59:39 -05:00
EXL
b22fb9e2ba haiku: Implement message box for Haiku
Add implementation for functions:

SDL_ShowSimpleMessageBox()
SDL_ShowMessageBox()

Add simple customization support also.
Fix build for x86_gcc2.

Partially fixes Bugzilla #4442.
2019-11-11 16:44:40 -05:00
Sam Lantinga
3fe2d8368c Updated SDL development builds to version 2.0.11 2019-09-22 10:37:16 -07:00
Ozkan Sezer
1b7fc81e3f minor whitespace tidy-up. 2019-07-31 19:40:50 +03:00
Sam Lantinga
f8400cbba9 Fixed bug 4692 - Command line parsing
Galadrim

As I have seen, SDL implements its own command line parser for Windows in SDL_windows_main.c. Unfortunately, it doesn't seem to allow command line arguments with trailing backslashes if quoting is required.

Usually, when you write an application that gets command line arguments passed as argc and argv, the parsing is done by parse_cmdline. The Windows API also provides the function CommandLineToArgvW, so an application can parse itself if only the command line string is provided. Both functions behave almost identically according to their documentation. If the argument "\\" (including the quotes) is passed, they both turn it into a single backslash.

The SDL command line parser on the other hand doesn't recognize the second quote character as the closing character in this example and therefore includes it in the parsed argument. The parser does not count the number of backslashes preceding a quote. It always treats a quote as escaped if a backslash is in front of it. Therefore, it should be impossible to quote and escape an argument correctly, if it has a trailing backslash and contains characters that require quoting.

Of course, each application is allowed to implement its own parsing rules, so SDL is free to do so. But the problem I see is that there are arguments, that are impossible to be passed to the parser correctly, as I described above. Is there a reason, why SDL does not simply use CommandLineToArgvW instead of implementing its own parser?

Here are some links that show that correct argument parsing, as it is usually done in Windows, is quite complicated:

https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-commandlinetoargvw

http://www.windowsinspired.com/how-a-windows-programs-splits-its-command-line-into-individual-arguments/
2019-07-31 09:11:20 -07:00
Ozkan Sezer
4953e050f5 use SDL_zeroa at more places where the argument is an array. 2019-07-31 05:11:40 +03:00
Sam Lantinga
67c67f3a6b Updated version to 2.0.10 2019-06-17 10:13:28 -07:00
Sam Lantinga
de82759c84 Added support for building SDL as a dynamic library on iOS 2019-03-19 07:53:33 -07:00
Sam Lantinga
5e13087b0f Updated copyright for 2019 2019-01-04 22:01:14 -08:00
Ryan C. Gordon
e542d1a36d winmain: Patched to compile on C89 compilers. 2018-10-29 20:18:50 -04:00
Ryan C. Gordon
f434a98c26 winmain: Don't use SDL_malloc (or SDL_stack_alloc, which might be malloc).
Otherwise, we are using the allocator before the app can set up its own hooks.

Now we use VirtualAlloc, and WideCharToMultiByte (because SDL_iconv uses
SDL_malloc, too!) to get ready to call into SDL_main.

This also makes console_wmain() call into the same routines as everything
else, so we don't have to deal with those allocations, too. Hopefully we
end up with the same results from GetCommandLine() as we do in wargv.

Fixes Bugzilla #4340.
2018-10-29 20:00:03 -04:00
Sam Lantinga
bc6c199790 Updated version to 2.0.9 2018-09-26 10:08:14 -07:00
Sam Lantinga
5febdfcece Fixed whitespace 2018-09-24 11:49:25 -07:00
Ryan C. Gordon
941c5b4760 haiku: Rename internal functions from BE_* to HAIKU_*
Fixes Bugzilla #2349.
2018-08-07 18:07:11 -04:00
Sam Lantinga
1143857d76 Fixed bug 4073 - Unquoted Unicode argument parsing broken on Windows due to incorrect usage of SDL_isspace() 2018-02-10 12:43:11 -08:00
Sam Lantinga
e3cc5b2c6b Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga
2c5724ef5d Updated version to 2.0.8 since SDL_image depends on it 2017-11-04 21:58:48 -07:00
David Ludwig
0e032d5860 WinRT: Move Windows::Foundation::Initialize to SDL2.dll, from SDL_main.
This allows C# UWP applications to use SDL2's SDL_WinRTRunApp function.

Kudos to Ethan Lee (flibitijibibo@flibitijibibo.com) for the patch.  Thanks!
2017-10-24 13:21:11 -04:00
Sam Lantinga
0ce23a5498 Updated version to 2.0.7 2017-10-12 08:08:04 -07:00
Sam Lantinga
dbb0a2aa74 Removed the need for libSDL2main.a on Android, and separated JNI initialization out for other integrations 2017-08-28 14:34:15 -07:00
Sam Lantinga
2dc5d32fab Updated version to 2.0.6 2017-08-18 18:16:37 -07:00