Commit graph

7462 commits

Author SHA1 Message Date
Sam Lantinga
e50052e494 Added a way to get the native Android window and EGL context 2014-06-02 09:01:26 -07:00
Sam Lantinga
f82322ac3d Fixed bug 2479 - [OS X] SDL_SetWindowFullscreen fails to switch to windowed
Eric Wasylishen

The problem seems to be the spaces handling code in -setFullscreenSpace: (SDL_cocoawindow.m) is incorrectly reporting that the SDL_WINDOW_FULLSCREEN -> windowed transition has already happened.

i.e. I saw this case was getting hit when trying to leave SDL_WINDOW_FULLSCREEN:

"else if (state == isFullscreenSpace) {
    return YES;  /* already there. */
}"

With the attached patch, both Control+Enter (SDL_WINDOW_FULLSCREEN toggle) and Option+Enter (SDL_WINDOW_FULLSCREEN_DESKTOP toggle) work in an sdl test app (I tried testwm2). Tested on OS X 10.9.2.
2014-06-02 09:01:10 -07:00
Sam Lantinga
3228a654cd Don't use D3D9Ex by default, since it can change behavior for games which rely on D3D9 classic. 2014-06-02 08:58:07 -07:00
Sam Lantinga
f4f604c8ac Fixed bug 2520 - Held double-click app startup creates a stuck MOUSEBUTTONDOWN event
snake5creator

When starting application with the usual "double click on file" method on Windows, only holding the last click, an unnecessary MOUSEBUTTONDOWN event is sent before the initial MOUSEMOTION event, and mouse button state is stuck in the sense that it takes a subsequent button release, followed by another press for the system to resume sending events (beginning with the next button release / MOUSEBUTTONUP event).

Input event log with held double-click startup: http://i.imgur.com/nypGKR2.png

Without: http://i.imgur.com/yaIqAvV.png
2014-05-31 14:03:04 -07:00
Sam Lantinga
a63394ad22 Fullscreen to windowed mode switch
From Melesie

I noticed that when user switches from fullscreen mode to windowed mode and exits application while in windowed mode, Windows performs an additional change of display settings, even though desktop resolution is the same as current one. This causes short black screen to show up. The only way I know of avoiding this is to explicitly switch to default display settings found in registry. MSDN documentation for ChangeDisplaySettingsEx states:

Passing NULL for the lpDevMode parameter and 0 for the dwFlags parameter is the easiest way to return to the default mode after a dynamic mode change.
2014-05-31 12:21:55 -07:00
Sam Lantinga
739c7e7b69 Fixed Direct3DCreate9Ex prototype 2014-05-31 11:53:19 -07:00
Sam Lantinga
6f697f2181 Fixed cast 2014-05-31 11:48:52 -07:00
Sam Lantinga
7ab938363f Use D3D9Ex when available
This hopefully works around crashes in Intel D3D9 support in Windows 8.1.
2014-05-31 11:37:12 -07:00
Sam Lantinga
932a752f54 Fixed SDL error when filtering events after shutdown.
This can happen when restoring video modes during video system shutdown
2014-05-31 11:33:25 -07:00
Philipp Wiesemann
822b690cac Added javadoc comments to document methods used by JNI. 2014-05-29 23:05:18 +02:00
Philipp Wiesemann
272e4b090a Added javadoc comments to prevent unused parameter warning. 2014-05-29 22:58:06 +02:00
Philipp Wiesemann
4efae3ae35 Fixed implicit boxing and unboxing of Java Objects warning. 2014-05-29 22:53:53 +02:00
Philipp Wiesemann
6f8e4f99dc Added missing stdio include in test program. 2014-05-29 22:48:10 +02:00
Philipp Wiesemann
4e8cb4d7be Fixed use of uninitialized variable warning in test program. 2014-05-29 22:44:08 +02:00
Ryan C. Gordon
5b6a0bbd6d Fixed stack overflow in X11_CreateWindow() (thanks, rapha and Brad!).
This should be a "long" which on a 64-bit system is likely to be > 32-bits,
 causing XGetICValues() to write past the end of the variable (and stack).

Fixes Bugzilla #2513.
2014-05-24 21:06:40 -04:00
Ryan C. Gordon
e61835ec15 Added note about Wayland and Mir packages for Ubuntu 14.04. 2014-05-24 19:49:03 -04:00
Ryan C. Gordon
b2ff607db8 Added some FIXMEs. 2014-05-24 01:27:19 -04:00
Ryan C. Gordon
842e912664 Fixed whitespace. 2014-05-24 01:25:27 -04:00
Ryan C. Gordon
7d3359d9c4 Generated dynapi stuff for the new WinRT entry points. 2014-05-24 01:23:57 -04:00
stopiccot
c076c21acb added comment
--HG--
branch : apk
2014-04-30 23:05:05 +03:00
stopiccot
82ba2c2c8b access google apk library through reflection
--HG--
branch : apk
2014-04-30 22:51:29 +03:00
stopiccot
20623e3dad Fixing issues discovered by Philipp Wiesemann
--HG--
branch : apk
2014-04-23 03:42:32 +03:00
stopiccot
a41b3ce38b inital apk extension support
--HG--
branch : apk
2014-04-07 21:20:39 +03:00
Sam Lantinga
4d9b83a876 Fail if we couldn't create the specified renderer 2014-04-05 16:25:30 -07:00
Philipp Wiesemann
e68f76da43 Removed empty statements. 2014-04-05 23:50:09 +02:00
Philipp Wiesemann
bbfa480b80 Fixed names of four hint environment variables. 2014-04-05 23:32:41 +02:00
Philipp Wiesemann
5e41b5887c Fixed unused local variable warning. 2014-04-05 23:24:33 +02:00
Philipp Wiesemann
274ec047ed Fixed typos in header comments. 2014-04-05 23:22:21 +02:00
Philipp Wiesemann
8158274826 Removed unused variable from test program. 2014-04-04 23:56:15 +02:00
Philipp Wiesemann
75fb3c2c6c Fixed doxygen comment in header. 2014-04-04 23:52:23 +02:00
David Ludwig
78755d7572 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".

--HG--
extra : rebase_source : cab688db2d74f9a60f7937fa1ab53475cbd59229
2014-03-30 11:50:59 -04:00
Sam Lantinga
d6d4c108fd Fixed the joystick side of XInput haptic detection on Windows 8 2014-03-31 10:38:26 -07:00
Sam Lantinga
492dbb3124 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
07f74cbbcc Fixed assertion loading button.bmp in testgamecontroller 2014-03-29 12:27:27 -07:00
Sam Lantinga
b2f1b89fbd Added testrumble to the Visual Studio 2013 solution 2014-03-29 12:27:02 -07:00
Ryan C. Gordon
ee2b15aebc Raspberry Pi builds should upload as .tar.xz instead of .tar.bz2.
Makes the archive about 40-50% smaller!

--HG--
extra : rebase_source : adac7393b54fb8c05cb868858c968da87f3d7199
2014-03-28 09:59:32 -04:00
Ryan C. Gordon
c36617ceb6 Changed a C++ single-line comment to /* */ style. 2014-03-26 16:19:52 -04:00
Pierre-Loup A. Griffais
6f15c8a12c 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
a08cc19712 Ignore unused mir event functions, need headers in Ubuntu 14.04 to use them. 2014-03-25 15:24:43 -07:00
Brandon Schaefer
61f0c01d38 Remove two unused variables, causing compiler warnings. 2014-03-25 15:18:18 -07:00
Brandon Schaefer
fdf9b30018 Re-enable Mir/Wayland support now that 2.0.3 has been released. 2014-03-25 14:33:34 -07:00
David Ludwig
0755238527 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
710797c3dd WinRT: Line ending fixes (CRLF to LF) 2014-03-24 22:12:38 -04:00
Gabriel Jacobo
e79e6a8637 Fixes #2456, controllermap's undo does not work correctly (by Bogdan Marinov) 2014-03-24 11:42:09 -03:00
Gabriel Jacobo
5d949ece7b Emit SDL_RENDER_DEVICE_RESET on Android when the GLES context is recreated 2014-03-24 11:04:42 -03:00
Ryan C. Gordon
b515741ed4 Added an assert to help static analyzer. 2014-03-24 07:12:26 -04:00
Sam Lantinga
c0e9a9afaf 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
4d02b5b07d Fixed warning on Mac OS X 2014-03-23 23:08:26 -07:00
Sam Lantinga
ce92ee5307 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.
bb174540%28v=vs.85%29.aspx
2014-03-23 22:53:50 -07:00
David Ludwig
0e9811178e 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.

--HG--
extra : rebase_source : 2047c915117c6711c7cfdc2c1ba3f89450435b8e
2014-03-23 22:07:01 -04:00