Commit Graph

14438 Commits (7561116873d99e6a566c6cdabd343090f7553c9d)

Author SHA1 Message Date
David Ludwig 065b2cf470 WinRT: made all SDL_Windows get sized to the WinRT-defined window size
This change removes some code that attempted to allow non-standard window sizes, the idea of which was to do display scaling, and a hackish one at that.  If display scaling is needed, use SDL_Renderer as appropriate.
2013-08-27 10:56:10 -04:00
David Ludwig 409d9b1ce7 WinRT: removed a deprecated hack regarding window resizing and Direct3D viewports 2013-08-27 09:53:58 -04:00
David Ludwig d78b26ed69 WinRT: moved most platform-specific keyboard and mouse code to shared locations 2013-08-26 17:17:53 -04:00
David Ludwig 73dfcdcfe1 WinRT: removed some old debugging code from SDL_mutexP and SDL_mutexV 2013-08-20 22:18:48 -04:00
David Ludwig dcb1689fb2 WinRT: made a note that WinRT doesn't appear to support modifying a thread's priority 2013-08-20 22:16:09 -04:00
David Ludwig 6300b3606f WinRT: made SDL_ThreadID() return the native thread ID, rather than a fake one 2013-08-20 22:04:09 -04:00
David Ludwig 3fce6688b8 WinRT: made testthread log output via SDL_Log
- this will allow output to be read via Visual C++'s Output pane
2013-08-20 21:55:13 -04:00
David Ludwig 90a9278f9d WinRT: made the C++11-based threading backend only try to catch exceptions that it knows it (the threading APIs) might throw, rather than all exceptions 2013-08-20 21:54:34 -04:00
David Ludwig 19a168b4b3 WinRT: file naming and placement cleanup
- moved SDL_WinRTApp.* from src/video/windowsrt/ to src/core/winrt/, and renamed them to SDL_winrtapp.* (to mimick case-sensitivity used elsewhere in SDL)
- renamed all "windowsrt" directories (in src) to "winrt", as the shorthand name is used more often (and, IMO, "WinRT" != "Windows RT", not entirely at least)
2013-08-20 21:22:32 -04:00
David Ludwig eaf26ff66a WinRT: added a stub implementation of UpdateClipRect to the D3D 11.1 renderer 2013-08-13 20:33:15 -04:00
David Ludwig 45ef345df0 WinRT: fixed a crash in some display orientation hint code 2013-08-13 20:28:48 -04:00
David Ludwig 3dde6e1e9f WinRT: made sure SDL_main gets used in the latest SDL 2.0.0 based code 2013-08-13 20:28:10 -04:00
David Ludwig 11dc53221b WinRT: Windows Phone 8 build fixes 2013-08-13 20:11:51 -04:00
David Ludwig d41fdc94d6 WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0 2013-08-13 20:09:52 -04:00
David Ludwig f7049b93d5 WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d4ce48ff30d1) 2013-08-12 22:29:55 -04:00
Sam Lantinga 1ad936eb29 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.
2013-08-11 19:56:43 -07:00
Sam Lantinga 1df1e69691 Added the platform specific messagebox function to the video function list 2013-07-14 11:28:44 -07:00
Sam Lantinga 8fbd7dc735 Fixed bug 2130 - Two members of Windows WindowData not initialized
norfanin

SetupWindowData in SDL_windowswindow.c doesn't initialize two members of SDL_WindowData with NULL. This is an issue because other parts of the SDL code seem to make the assumption that this is the case. WIN_DestroyWindowFramebuffer for example uses data->mdc and data->hbm if they're not NULL.
2013-10-03 00:54:58 -07:00
Ryan C. Gordon ce45fa28e2 SDLK_DELETE should probably be SDLK_BACKSPACE on iOS.
The key on the software keyboard works like backspace, at least. Not sure
 what happens with a bluetooth keyboard here.
2013-10-02 22:18:04 -04:00
Ryan C. Gordon 958640e5d1 Get rid of glGetError() calls in GLES2 renderer.
It's not usually useful, and it causes pipeline stalls.
2013-10-02 22:16:11 -04:00
Gabriel Jacobo 57e09318dd Uses SDL_UDEV for Linux joystick hotplugging 2013-10-01 08:47:06 -03:00
Sam Lantinga 69a4351eb0 Fixed bug 2121 - GCC throws error on SDL_FORCE_INLINE when compiling with -ansi 2013-09-30 22:35:32 -07:00
Sam Lantinga 22a972a440 Fixed bug 2122 - SDL_CreateTexture allows illegal texture sizes
Lloyd Bryant

SDL_CreateTexture() is succeeding (i.e. returning a valid pointer) when the requested horizontal or vertical size of the texture exceeds the maximum allowed by the render.  This results in hard-to-understand errors showing up when later attempting to use that texture (such as with SDL_SetRenderTarget()).
2013-09-30 22:16:14 -07:00
Sam Lantinga 058aba086c Fixed bug 2119 - compiler warnings (-pedantic) SDL_video.h:111:42 2013-09-30 21:57:03 -07:00
Gabriel Jacobo 889b6bd794 Removes unused property use_egl from internal structure gl_config 2013-09-28 19:23:59 -03:00
Gabriel Jacobo c691de00c5 Fix: SDL_EVDEV_device_removed does not need UDEV 2013-09-28 19:17:27 -03:00
Sam Lantinga 202528a48f Call AddRef() on the device so it doesn't accidentally get released from underneath the caller. 2013-09-28 14:07:17 -07:00
Sam Lantinga 25f607a3c2 Make it clear we're just returning a D3D9 device, allowing for new functions to get other D3D versions 2013-09-28 14:07:14 -07:00
Sam Lantinga cf5e5a8360 Added a hint to create the D3D device in thread-safe mode: SDL_HINT_RENDER_DIRECT3D_THREADSAFE 2013-09-28 14:07:08 -07:00
Sam Lantinga 803965bcc2 Added platform specific call: SDL_RenderGetD3DDevice() 2013-09-28 14:07:05 -07:00
Sam Lantinga 9f390e7967 Moved SDL_Direct3D9GetAdapterIndex() to SDL_windowsvideo.c since it doesn't belong in the window code. 2013-09-28 14:06:59 -07:00
Sam Lantinga 89c31bb42a Implemented SDL_UpdateYUVTexture() for Direct3D 2013-09-28 14:06:55 -07:00
Sam Lantinga 17c9ff85e2 Added missing SDL_assert.h 2013-09-28 14:06:51 -07:00
Sam Lantinga 57bd514707 Added optimized YUV texture upload path with SDL_UpdateYUVTexture() 2013-09-28 14:06:47 -07:00
Sam Lantinga d0a57ea2b5 Rolled back my LoadLibrary change. The first failed call causes a dialog to pop up in Windows apps (but not console apps) and that's really bad. I'll have to deal with this in my app. 2013-09-28 14:06:39 -07:00
Sam Lantinga dfa53e7e3c SDL_LoadObject on Windows now calls LoadLibrary a second time in its EX form whenever the first load fails. This second call uses the "altered" search path for DLL dependencies, which includes searching the directory that the DLL itself lives in. 2013-09-28 14:06:31 -07:00
Sam Lantinga b6be1435c5 Moved D3D_LoadDLL and SDL_Direct3D9GetAdapterIndex to SDL_windowswindow.c at Jorgen's insistence. That file is wrapped in a more appropriate define check so it will work if somebody builds a binary without D3D support.
Added a reference to SDL_Direct3D9GetAdapterIndex to SDL_test_common.c so SDL will fail to compile if the new symbol isn't included properly.

CR: Jorgen
2013-09-28 14:06:20 -07:00
Gabriel Jacobo 1ccbad9603 Do not use UDEV references in EVDEV if UDEV has not been detected 2013-09-28 15:48:32 -03:00
Sam Lantinga 99789c71c1 Fixed bug 1820 - building SDL as a static library with static runtime doesn't compile/link with visual studio
norfanin

Adds a condition so only the MSVC 2012 compiler defines the macros for the functions of its version.

Attaching a patch that adds a condition so that the HAVE_X supported by MSVC 2012 only get defined with that compiler. MSVC 2008 and 2010 will then build without any modification to the SDL source code.

Also moved HAVE_M_PI to a separate check. The Microsoft headers require _USE_MATH_DEFINES to be defined before they define the constants.
2013-09-28 10:30:51 -07:00
Gabriel Jacobo 9ceed73db4 Raspberry Pi support (also unified UDEV and EVDEV support) 2013-09-28 13:28:19 -03:00
Philipp Wiesemann b9a2230806 Fixed doxygen warning. 2013-09-28 12:55:32 +02:00
Philipp Wiesemann 90afb94ec6 Corrected name of SDL_Color field from unused to a. 2013-09-28 12:48:26 +02:00
Sam Lantinga 8b6ad7ffba Fixed bug 2101 - CWBackPixel causes weird window flickering on window resize
aBothe

I tried to experiment a bit with SDL2 and OpenGL today and noticed that something caused some weird flickering when resizing my nicely drawn SDL2/OpenGL window:
Just after resizing, the background went black and I had to let my OpenGL code redraw the contents..
However, after some hours spent with googling I found out that in OpenGL examples where this CWBackPixel flag was not used when creating X windows, there was no flickering while resizing the window.

See http://www.sbin.org/doc/Xlib/chapt_04.html @ "The Window Background" for more info.
2013-09-27 23:47:57 -07:00
Sam Lantinga b9567776d7 # User Darren Salt <devspam@moreofthesa.me.uk>
# Date 1379621782 -3600
#      Thu Sep 19 21:16:22 2013 +0100
Work around a false-positive in the X11 mouse wheel code

This false positive occurs when one particular button on my mouse is
pressed. The kernel which I'm using is patched to cause a release event to
be synthesised immediately when the mouse says that this button is pressed
because the mouse doesn't signal release until the button is next pressed.

(Also documents a false negative, observed with the horizontal scroll wheel
on the same mouse.)
2013-09-27 23:35:17 -07:00
Sam Lantinga c95761e00a Fixed bug 2100 - directfb fails to build 2013-09-27 23:29:05 -07:00
Sam Lantinga 3ef5a97706 Fixed the name of the environment variable to match the name of the hint. 2013-09-27 23:19:22 -07:00
Edward Rudd 869a707612 add in High DPI support (aka Retina)
- based on J?rgen's patch with a few bug fixes
2013-09-20 13:43:00 -04:00
Sam Lantinga 0103bc0bff Default to OpenGL ES 2.0 instead of 1.0 when it's available. 2013-09-27 22:09:51 -07:00
Sam Lantinga d3d6f9ad19 Fixed syntax error in C style block comment. 2013-09-14 11:25:52 -07:00
Ryan C. Gordon bfe1b1d066 Don't incorrectly report success for negative swap intervals on Mac OS X. 2013-09-14 01:30:57 -04:00