Commit Graph

1422 Commits

Author SHA1 Message Date
stopiccot 3727528eb9 access google apk library through reflection 2014-04-30 22:51:29 +03:00
stopiccot 3cdae42d65 Fixing issues discovered by Philipp Wiesemann 2014-04-23 03:42:32 +03:00
stopiccot 612f4a69db inital apk extension support 2014-04-07 21:20:39 +03:00
Sam Lantinga d5c109b2f4 Fail if we couldn't create the specified renderer 2014-04-05 16:25:30 -07:00
Philipp Wiesemann 83200a3225 Removed empty statements. 2014-04-05 23:50:09 +02:00
Philipp Wiesemann a24745f48d Fixed names of four hint environment variables. 2014-04-05 23:32:41 +02:00
Philipp Wiesemann 2d8b86bb07 Fixed unused local variable warning. 2014-04-05 23:24:33 +02:00
Philipp Wiesemann aeebdc501a Fixed typos in header comments. 2014-04-05 23:22:21 +02:00
Philipp Wiesemann 9a56cde24c Removed unused variable from test program. 2014-04-04 23:56:15 +02:00
Philipp Wiesemann 02045dcb3a Fixed doxygen comment in header. 2014-04-04 23:52:23 +02:00
David Ludwig abcb264c12 WinRT: "SDL" to "SDL2", both for .dll output files, and for MSVC project names.
All WinRT builds of SDL will now output, "SDL2.dll".  Previously, the Windows
8.x/RT builds would output, "SDL.dll", and Windows Phone 8 builds would output,
"SDL_WinPhone.dll".  The change to "SDL2.dll" puts WinRT dll naming in-line with
that seen on Win32.

SDL/WinRT's MSVC project files will now appear as either "SDL2-WinRT" or
"SDL2-WinPhone", when displaying in MSVC.

This set of changes should not break any older WinRT or Windows Phone 8 app
builds that rely on MSVC's Project-to-Project reference system to build SDL2 for
the correct platform(s), and to install SDL2 dll files into the apps' output
packages.  App builds that reference SDL dll files directly should, however,
now reference "SDL2.dll".
2014-03-30 11:50:59 -04:00
Sam Lantinga c3c24a335d Fixed the joystick side of XInput haptic detection on Windows 8 2014-03-31 10:38:26 -07:00
Sam Lantinga 764aa147ad Fixed XInput haptic support on Windows 8
It turns out the XBox 360 controller driver never reports force feedback capability, so we'll try to set 0 state and see if that succeeds.
2014-03-29 12:29:38 -07:00
Sam Lantinga 229b438d42 Fixed assertion loading button.bmp in testgamecontroller 2014-03-29 12:27:27 -07:00
Sam Lantinga 20680d7db0 Added testrumble to the Visual Studio 2013 solution 2014-03-29 12:27:02 -07:00
Ryan C. Gordon 6123f15e77 Raspberry Pi builds should upload as .tar.xz instead of .tar.bz2.
Makes the archive about 40-50% smaller!
2014-03-28 09:59:32 -04:00
Ryan C. Gordon 17a8d2934d Changed a C++ single-line comment to /* */ style. 2014-03-26 16:19:52 -04:00
Pierre-Loup A. Griffais 833cfe534a Remove the RaiseWindow call from OnWindowRestored for now.
It seems like a net improvement in all the scenarios Sam and I could
think of, and looking at hg history it was added for fullscreen
window management specifically. Much of that code has changed since
then, but maybe it needs to stay there for that and simply be moved
to a fullscreen condition check.

It would solve this issue:

https://bugzilla.libsdl.org/show_bug.cgi?id=2439

As well as cases where on SteamOS, we hide/show specific Steam
overlay windows while expecting them to stay in the background, since
changing the window stacking order really angers the NVIDIA driver.

CR: Sam.
2014-03-26 12:54:51 -07:00
Brandon Schaefer 8938c2b5db Ignore unused mir event functions, need headers in Ubuntu 14.04 to use them. 2014-03-25 15:24:43 -07:00
Brandon Schaefer 2298ed170f Remove two unused variables, causing compiler warnings. 2014-03-25 15:18:18 -07:00
Brandon Schaefer b0502ce831 Re-enable Mir/Wayland support now that 2.0.3 has been released. 2014-03-25 14:33:34 -07:00
David Ludwig a99bf4d705 WinRT: Call IDXGIDevice3::Trim before app-suspend, as required on Windows 8.1
Thanks to Sylvain Becker for pointing this out!
2014-03-24 22:51:03 -04:00
David Ludwig cbf718461c WinRT: Line ending fixes (CRLF to LF) 2014-03-24 22:12:38 -04:00
Gabriel Jacobo 22a7dd0be8 Fixes #2456, controllermap's undo does not work correctly (by Bogdan Marinov) 2014-03-24 11:42:09 -03:00
Gabriel Jacobo 1f92c9dcac Emit SDL_RENDER_DEVICE_RESET on Android when the GLES context is recreated 2014-03-24 11:04:42 -03:00
Ryan C. Gordon dd81dad1ad Added an assert to help static analyzer. 2014-03-24 07:12:26 -04:00
Sam Lantinga 26823b1bb4 Added an event SDL_RENDER_DEVICE_RESET, which is triggered on Direct3D 11 when the device has been lost and all textures need to be recreated. 2014-03-23 23:09:22 -07:00
Sam Lantinga 25919bf252 Fixed warning on Mac OS X 2014-03-23 23:08:26 -07:00
Sam Lantinga 3317e4340d Fixing Alt-Enter handling, submitted by Nader Golbaz
I encountered a little issue: DXGI monitors application's message queue and this behavior interferes with SDL if the application already handles Alt-Enter sequence. I think it is necessary to disable this behavior.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb174540%28v=vs.85%29.aspx
2014-03-23 22:53:50 -07:00
David Ludwig 119dff5546 WinRT: Implemented SDL_ShowMessageBox for Windows 8.x/RT hosts
This change does not include message box support for Windows Phone 8, which does
not offer the same message box APIs that Windows 8.x/RT does.
2014-03-23 22:07:01 -04:00
Ryan C. Gordon 6ab50a5e2e Tossed in some SDL_asserts to make static analyzer happier.
(Most of its complaints here are that these ints can be negative, although
they wouldn't been in sane cases. Checking sanity is what assertions do, and
it placates the analyzer appropriately.)
2014-03-23 18:56:47 -04:00
David Ludwig 46a80b04d8 D3D11: Fixed a crash after a GPU device-reset on Win32 2014-03-23 16:08:32 -04:00
David Ludwig 6ce684e92b D3D11: Added code to handle GPU-device-removed scenarios
These scenarios can happen when a GPU is switched, its driver updated, or in
some virtual machines (such as Parallels) are suspended and then resumed.  In
these cases, all GPU resources will already be lost, and it's up to the app to
recover.

For now, SDL's D3D11 renderer will handle this by freeing all GPU resources,
including all textures, and then sending a SDL_RENDER_TARGETS_RESET event.
It's currently up to an app to intercept this event, destroy all of its
textures, then recreate them from scratch.
2014-03-23 13:48:16 -04:00
Sam Lantinga c3d1037665 Better keyboard detection when some of the keys are remapped, thanks to Lewis Wall 2014-03-23 09:44:04 -07:00
David Ludwig c2243092d7 WinRT: Miscellaneous app-backgrounding/restoring event fixes and additions
SDL_WINDOWEVENT_FOCUS_LOST is now sent when an app's native window is hidden.
Likewise, SDL_WINDOWEVENT_FOCUS_GAINED is sent when an app's window is shown.
This mimicks behavior seen on iOS and Android.

SDL_WINDOWEVENT_MINIMIZED and SDL_WINDOWEVENT_RESTORED are now sent when the
app's native window is hidden and shown.  Previously, these were sent when an
app was suspended and resumed.  On Windows 8.x/RT, an app may be sent to the
background without being suspended, which previously meant that
SDL_WINDOWEVENT_MINIMIZED might never have been sent.  (On Windows Phone 8,
however, this seems to be different, whereby apps sent to the background appear
to always get suspended.)
2014-03-23 11:04:47 -04:00
David Ludwig 50ee99ecb2 WinRT: Made app-backgrounded events get sent at separate, distinct times.
SDL_APP_WILLENTERBACKGROUND is now sent as soon as the app is told that it is
about to go to the background.  SDL_APP_DIDENTERBACKGROUND is sent via a WinRT
'deferral operation', which is how WinRT gives apps a bit of extra time
(multiple seconds worth) to prepare for an app-backgrounding.

The distinction may be important as the deferral operation's code is always run
in a separate thread.  For Direct3D-only apps, this means that between the
two SDL app-backgrounded events, SDL_APP_WILLENTERBACKGROUND will be the only
one run from the main thread.  Given that some WinRT operations can only be done
on the main thread (operations to the CoreWindow fall into this category), this
could be important.

It is important to note that pre-deferral code may only have a very short bit of
time to execute code, less so than code run in the deferral operation (where
SDL_APP_DIDENTERBACKGROUND is sent from), which usually gets several seconds to
run.
2014-03-23 08:56:52 -04:00
David Ludwig 823bf72130 WinRT globals cleanup: Removed WINRT_GlobalSDLVideoDevice 2014-03-22 21:08:05 -04:00
David Ludwig b51a3206c8 WinRT: Got OpenGL ES 2 working with the latest version of ANGLE/WinRT.
SDL/WinRT did have support for OpenGL ES 2 via an older version of ANGLE/WinRT,
however its API changed a few months ago, and SDL/WinRT would crash when trying
to use it.  It would also occasionally crash when using the older version.

This changeset should make SDL/WinRT work with the latest version, as
available via MS Open Tech's git repository of it at
https://github.com/msopentech/angle

Older versions of ANGLE/WinRT (from either https://github.com/stammen/angleproject
or https://bitbucket.org/DavidLudwig/angleproject) will need to be updated to
MS Open Tech's latest version.
2014-03-22 20:48:18 -04:00
Ryan C. Gordon cc52939853 Static analysis fix: more cleanups of unused variables, etc, in blitters. 2014-03-21 10:40:15 -04:00
Ryan C. Gordon 7bf36abfc0 Static analysis fix: more dead stores. 2014-03-21 00:57:43 -04:00
Ryan C. Gordon ba4b3aa944 Patched to compile on C89 compilers, removed more streamer code. 2014-03-20 18:00:41 -04:00
Ryan C. Gordon e177b1cc49 Static analysis fix: clean up unused variables and dead stores in blitters. 2014-03-20 17:55:24 -04:00
Ryan C. Gordon 6d6fba4b0a #ifdef'd out the audio streamer code.
It's been hardcoded out forever now, but I've now forcibly removed it with
the preprocessor so static analysis doesn't complain about it for now.

Eventually I want to rewrite or remove this code.
2014-03-20 17:00:33 -04:00
Ryan C. Gordon a43dbfad0d Static analysis fix: Removed unused variable.
(We don't care if closing the device fails anyhow).
2014-03-20 16:56:37 -04:00
Ryan C. Gordon 3aae0ed2c5 Static analysis fix: uninitialized data.
(This is Clang not knowing that SDL_SetError() always returns -1.)
2014-03-20 16:54:20 -04:00
Ryan C. Gordon d7a253b5ec Static analysis fix: uninitialized data.
(Clang doesn't know that "_this" was already checked for NULLness elsewhere.)
2014-03-20 16:25:30 -04:00
Ryan C. Gordon 93ba5bd899 Static analysis fix: uninitialized value.
(A false positive: clang doesn't know SDL_SetError() always returns -1.)
2014-03-20 16:23:18 -04:00
Ryan C. Gordon a25bd63cc5 Static analysis fix: leaking Objective-C object. 2014-03-20 16:05:57 -04:00
Ryan C. Gordon 84b919a2a7 Static analysis fix: dereference of a NULL pointer. 2014-03-20 11:22:57 -04:00
Ryan C. Gordon b99a6253da Static analysis fix: let clang know _this->displays isn't NULL. 2014-03-20 11:14:02 -04:00