|
e542d1a3
|
2018-10-29T20:18:50
|
|
winmain: Patched to compile on C89 compilers.
|
|
f434a98c
|
2018-10-29T20:00:03
|
|
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.
|
|
b262b0eb
|
2018-10-22T20:50:32
|
|
Small stack allocations fall back to malloc if they're unexpectedly large.
|
|
1143857d
|
2018-02-10T12:43:11
|
|
Fixed bug 4073 - Unquoted Unicode argument parsing broken on Windows due to incorrect usage of SDL_isspace()
|
|
8aab39cb
|
2016-10-14T08:27:44
|
|
Fixed bug 3452 - Getting unicode arguments for the main entry point on Windows
Simon Hug
There are currently three entry points in the SDL2_main code for windows: main, wmain and WinMain. Only the latter two properly convert the arguments to UTF-8.
Console applications linked with MSVC will always link with the main entry point (wmain has to be selected by manually setting the entry point). This makes it likely that such programs will not have proper unicode arguments.
|
|
14e7da75
|
2016-10-12T19:50:16
|
|
Backed out change 7d3df1df4e91 which was: Fixed bug 3320 - SDL_windows_main.c defines both console application entry points
With that change only the wmain() entry point was defined, and applications that linked with main() would no longer build.
|
|
d870f271
|
2016-10-01T12:31:31
|
|
Fixed bug 3320 - SDL_windows_main.c defines both console application entry points
Simon Hug
The SDLmain file src/main/windows/SDL_windows_main.c defines both entry points for console applications, main and wmain. This seems to confuse MSVC. It outputs a LNK4067 warning and then chooses main, which is a shame because only wmain has the unicode handling. Using SDLmain.lib provided on libsdl.org, the linker also goes for main.
I'm proposing to not define the main entry point at all. wmain should be supported well enough with MSVC.
|
|
708def87
|
2016-10-01T11:48:15
|
|
Fixed bug 3338 - console_wmain doesn't null terminate the argv array
Simon Hug
The function console_wmain in src/main/windows/SDL_windows_main.c does not null terminate the argument list it is creating. As specified by the C standard, "argv[argc] shall be a null pointer."
The SDLTest framework makes use of that null pointer and some test programs can cause an access violation because it's missing.
|
|
0e45984f
|
2015-06-21T17:33:46
|
|
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().
|
|
b72938c8
|
2015-04-20T12:22:44
|
|
Windows: Always set the system timer resolution to 1ms by default.
An existing hint lets apps that don't need the timer resolution changed avoid
this, to save battery, etc, but this fixes several problems in timing, audio
callbacks not firing fast enough, etc.
Fixes Bugzilla #2944.
|
|
fe6c797c
|
2015-04-10T23:30:31
|
|
Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
|
|
33b9d9ad
|
2015-02-19T21:51:13
|
|
Windows: Added a FIXME.
|
|
674eb556
|
2015-02-19T21:50:40
|
|
Windows: Free the argv we allocated for console_wmain().
|
|
e974ccf8
|
2015-02-19T21:49:30
|
|
Windows: Added a FIXME.
|
|
f7c4c3d0
|
2015-02-19T21:49:15
|
|
Windows: Make a distinction between ANSI mainline and UTF-8 mainline.
|
|
e93ee5d7
|
2015-02-19T21:44:41
|
|
Windows: Support unicode arguments for console applications (thanks, Jorgen!).
Fixes Bugzilla #2864.
|
|
b88ca1b4
|
2015-02-10T16:28:56
|
|
the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here.
Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture.
More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
|
|
b48e54aa
|
2015-01-26T22:00:29
|
|
Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation
Jonas Kulla
The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c.
I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
|
|
70438be2
|
2014-12-03T10:55:23
|
|
WinRT: fixed bug whereby SDL would override an app's default orientation
WinRT apps can set a default, preferred orientation via a .appxmanifest file.
SDL was overriding this on app startup, and making the app use all possible
orientations (landscape and portrait).
Thanks to Eric Wing for the heads up on this!
|
|
4dab32a2
|
2014-11-28T04:51:33
|
|
Fixed bug 2786 - "UCS-2-INTERNAL" iconv encoding is not supported everywhere, use UTF-16LE instead
Jonas Kulla
src/main/windows/SDL_windows_main.c:137:
cmdline = SDL_iconv_string("UTF-8", "UCS-2-INTERNAL", (char *)(text), (SDL_wcslen(text)+1)*sizeof(WCHAR));
I'm trying to compile an SDL2 application for windows using the mingw-w64 32bit toolchain provided by my distro (Fedora 19). However, even the simplest test program that does nothing at all fails to startup with a "Fatal error - out of memory" message because the mingw iconv library provided by my distro does not support the "UCS-2-INTERNAL" encoding and the conversion returns null.
From my little bit of research, it turns out that even though this encoding is supported by the external GNU libiconv library, some glibc versions (?) don't support it with their internal iconv routines, and will instead provide the native endian encoding when "UCS-2" is specified.
Nonetheless, I wonder why the native endianness is considered in the first place when Windows doesn't even run on any big endian archs (to my knowledge). And true enough, 'WIN_StringToUTF8' from core/windows/SDL_windows.h is used everywhere else in the windows backend, which is just a macro to iconv with "UTF-16LE" as source. Therefore it would IMO make sense to use this macro here as well, which would solve my problem (patch attached).
|
|
9c398852
|
2014-11-22T22:20:40
|
|
Corrected header file documentation comment.
|
|
24c86b55
|
2014-09-11T19:24:42
|
|
[X11] Reconcile logical keyboard state with physical state on FocusIn
since the window system doesn't do it for us like other platforms.
This prevents sticky keys and missed keys when going in and out
of focus, for example Alt would appear to stick if switching away
from an SDL app with Alt-Tab and had to be pressed again.
CR: Sam
|
|
2230df55
|
2014-07-27T19:52:52
|
|
Remove dependency on C runtime from Windows SDLmain.
|
|
3dcb451f
|
2014-04-09T21:29:19
|
|
Added a README file regarding WinRT support
To note, this file is currently formatted with CRLF line endings, rather than
LF, to allow the file to be viewed with Notepad.
|
|
f9a58968
|
2014-03-13T21:21:26
|
|
Added missing copyright notices
|
|
f848adff
|
2013-11-29T10:06:08
|
|
Improve Android pause/resume behavior.
|
|
d1bde399
|
2013-10-20T20:24:00
|
|
Backed out changeset 737771c47c6f, done testing Buildbot changes.
|
|
df368084
|
2013-10-20T20:02:02
|
|
Intentionally breaking Windows and Raspberry Pi builds to test Buildbot change.
|
|
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.
|
|
dad42067
|
2013-08-12T11:13:50
|
|
Fixes #2022, do not resume on Android when surfaceChanged
If the app is in landscape mode and the user presses the power button, a pause
is followed immediately by a surfaceChanged event because the lock screen
is shown in portrait mode. This triggers a "false" resume.
So, we just pause and resume following the onWindowFocusChanged events.
Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before
blocking the event pump.
|
|
1ad936eb
|
2013-08-11T19:56:43
|
|
Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow()
Rainer Deyke
I'm running Linux Mint 15 with the Cinnamon window manager. SDL_DestroyWindow consistently locks up for me when the window if fullscreen.
|