Commit Graph

219 Commits

Author SHA1 Message Date
Philipp Wiesemann
3d8686ddbf Android: Fixed compile warning about a missing prototype (thanks, Sylvain!).
Fixes Bugzilla #3351.
2016-07-17 21:42:53 +02:00
David Ludwig
5ce0bfa718 WinRT: workaround a possible Windows bug, whereby hiding cursors, disables mouse-moved events
This workaround, unfortunately, requires that apps directly link to a set of
Win32-style cursor resource files (that contain a transparent cursor image).
Copies of suitable resource files are in src/core/winrt/, and should be
included directly in an app's MSVC project.

A rough explanation of this workaround/hack, and why it's needed (and
seemingly can't be done through programmatic means), is in this change's code.
2016-05-14 23:29:49 -04:00
Ryan C. Gordon
24fad21a24 Patched to compile on Haiku...? 2016-04-12 18:40:44 -04:00
Ryan C. Gordon
b0c0d27997 Patched to compile on various platforms. 2016-04-12 18:11:36 -04:00
Ryan C. Gordon
5006582bed threads: Move SDL's own thread creation to a new internal API.
This allows us to set an explicit stack size (overriding the system default
and the global hint an app might have set), and remove all the macro salsa
for dealing with _beginthreadex and such, as internal threads always set those
to NULL anyhow.

I've taken some guesses on reasonable (and tiny!) stack sizes for our
internal threads, but some of these might turn out to be too small in
practice and need an increase. Most of them are simple functions, though.
2016-04-12 16:45:10 -04:00
Eric Wing
0e05655f92 Android: C89 cleanup to avoid warnings/errors since the default gcc mode on Android is still pre-C99. 2016-02-09 17:36:42 -08:00
Sam Lantinga
41012240cc Fixed sed error on Mac OS X and updated copyright on a few last files 2016-01-02 10:38:51 -08:00
Sam Lantinga
255c182471 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Sam Lantinga
a84e92c1ff Fixed bug 3083 - Android JNIEXPORT and JNICALL missing
Martin Gerhardy

Just a minor thing, but a huge outcome. All the other jni related functions already have those flags, but the nativeInit function lacks them - so it might be stripped away.
2015-08-01 22:03:50 -07:00
Sam Lantinga
78f2198e6c Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Ryan C. Gordon
13a886b08d Windows: Added a FIXME. 2015-02-19 21:51:13 -05:00
Ryan C. Gordon
9f07d548f8 Windows: Free the argv we allocated for console_wmain(). 2015-02-19 21:50:40 -05:00
Ryan C. Gordon
7745b57434 Windows: Added a FIXME. 2015-02-19 21:49:30 -05:00
Ryan C. Gordon
838f951126 Windows: Make a distinction between ANSI mainline and UTF-8 mainline. 2015-02-19 21:49:15 -05:00
Ryan C. Gordon
ceb7c77af8 Windows: Support unicode arguments for console applications (thanks, Jorgen!).
Fixes Bugzilla #2864.
2015-02-19 21:44:41 -05:00
Philipp Wiesemann
e7bde43d07 Added missing guards in implementation for PSP.
Thanks to Martin Gerhardy for pointing this out.
2015-01-31 22:45:54 +01:00
Edward Rudd
835d487683 add in support for passing down the "natural" (or flipped) scrolling direction in the MouseWheelEvent event 2014-12-03 11:00:56 -05:00
Sam Lantinga
06bc0e968d 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).
2014-11-28 04:51:33 -08:00
Philipp Wiesemann
caf09d0cb5 Fixed limitation for number of custom main() arguments on Android.
Limitation was size of the reference table because local refs were not deleted.
2014-11-25 22:31:14 +01:00
Philipp Wiesemann
fa7abca4ec Fixed bug 2476 - Allow custom main() arguments
rettichschnidi

I would like to pass custom arguments from my Java code (subclass of SDLActivity) to the native SDL2 binary.
2014-10-17 23:36:45 +02:00
Philipp Wiesemann
d4d1f23355 Fixed typo in source comment. 2014-10-17 23:26:02 +02:00
Sam Lantinga
7db5ff2019 Updated version to 2.0.4 2014-09-02 06:55:47 -07:00
Ryan C. Gordon
849b3144f4 Remove dependency on C runtime from Windows SDLmain. 2014-07-27 19:52:52 -04:00
Sam Lantinga
ebdb8f10c0 Fixed bug 2638 - (Signed) Can't create signed apps in Android
Pablo Mayobre

When generating a signed app with SDL 2.0.3 an issue comes up, watching at the Error Log points out that the issue lies in the src/main/android/SDL_android_main.c where the process name is defined as "SDL_app", this name turns into an erroneous name so it should be changed to "app_process"
2014-07-12 13:05:41 -07:00
Gabriel Jacobo
b97431cd83 Fix another NaCl warning 2014-06-20 11:50:31 -03:00
Gabriel Jacobo
fa3bf63b5c Initialize nacl_io, removes SDL_NaClMount/Umount
It's just easier to use nacl_io's mount/umount directly.
2014-06-20 10:59:51 -03:00
Gabriel Jacobo
adce68ed69 Fixes audio for Native Client, and other fixes...
- SDL_NaClMount, SDL_NaClUmount
- Default mounting of https at / in SDL's main function
- More documentation in README-nacl.txt
2014-06-08 18:18:13 -03:00
Gabriel Jacobo
01a18871e3 Chrome's Native Client backend implementation 2014-06-06 15:45:59 -03:00
Philipp Wiesemann
bb9a20954a Fixed unused local variable warning. 2014-04-05 23:24:33 +02:00
David Ludwig
8c3e6e0078 Fixed a build error when including WinRT's SDLmain file directly in an app 2014-03-15 10:37:40 -04:00
Sam Lantinga
b0e0446659 Added missing copyright notices 2014-03-13 21:21:26 -07:00
Sam Lantinga
0ae88759fb Integrated David Ludwig's support for Windows RT 2014-03-09 11:36:47 -07:00
Sam Lantinga
32547d0c59 Fixed line endings on WinRT source code 2014-03-09 11:06:11 -07:00
Sam Lantinga
c75b319a11 Updated SDL to version 2.0.3 2014-03-09 10:38:30 -07:00
Sam Lantinga
1af9aa0b1e Updated SDL to version 2.0.2 2014-02-09 03:09:56 -08:00
Sam Lantinga
dba255c1e5 Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
David Ludwig
c96c4f3dc4 WinRT: merged with latest SDL 2.x/HG code
SDL 2.x recently accepted patches to enable OpenGL ES 2 support via Google's ANGLE library.  The thought is to try to eventually merge SDL/WinRT's OpenGL code with SDL-official's.
2013-11-28 22:09:21 -05:00
Ryan C. Gordon
03d5719413 Make internal SDL sources include SDL_internal.h instead of SDL_config.h
The new header will include SDL_config.h, but allows for other global stuff.
2013-11-24 23:56:17 -05:00
Ryan C. Gordon
9187576376 Fixed comment typo. 2013-11-14 20:24:40 -05:00
Ryan C. Gordon
b444dd2714 Renamed things named after BeOS to be named after Haiku instead. 2013-11-14 11:51:24 -05:00
David Ludwig
529fcd3ee3 WinRT: merged with SDL 2.0.1 codebase 2013-10-27 21:26:46 -04:00
Ryan C. Gordon
69038e11f2 Backed out changeset c8a0b7c05db8, done testing Buildbot changes. 2013-10-20 20:24:00 -04:00
Ryan C. Gordon
6a1ca8b789 Intentionally breaking Windows and Raspberry Pi builds to test Buildbot change. 2013-10-20 20:02:02 -04:00
Sam Lantinga
2451a67018 Fixed building using MinGW
Our SDL_windows.h needed to be included before anything else so UNICODE is defined.
2013-10-17 23:02:29 -07:00
Sam Lantinga
6fca598f55 Updated SDL to version 2.0.1 2013-10-10 21:50:25 -07:00
David Ludwig
4dd121471c WinRT: unified the two, public, app-init functions
This function, SDL_WinRTRunApp, can be used to help launch either XAML or non-XAML/Direct3D-only based apps.
2013-09-22 12:26:53 -04:00
David Ludwig
ab565ef643 WinRT: ugh, at least one file in an app's project seems to require C++/CX compilation.
Assuming this is true, that file might as well be the one that contains WinMain.
2013-09-16 22:43:12 -04:00
David Ludwig
5da0adaea5 WinRT: renamed SDL_winrt_main.cpp to indicate that it should only be used in non-XAML apps
This can break builds of existing SDL/WinRT apps.  To fix, remove the reference to SDL_winrt_main.cpp, then add a reference to the renamed file, SDL_winrt_main_NonXAML.cpp.  If you get a build error about a missing .winmd file, enable the /ZW compiler flag for that one file (at minimum).
2013-09-16 22:27:30 -04:00
David Ludwig
81dbaa1e44 WinRT: reduced the size of SDL_winrt_main.cpp by a little bit 2013-09-16 21:09:58 -04:00
David Ludwig
374f121a28 WinRT: made SDL_winrt_main.cpp not have to be compiled as C++/CX (via the /ZW compiler flag)
This file can still be compiled as C++/CX, however that is now optional/not-required.
2013-09-15 23:53:51 -04:00