David Ludwig
31d9bd334b
WinRT: removed hack to flush out pending window-size-change events on app startup.
...
The hack appeared to work in the Windows Simulator, but not on real hardware, and
notably not on a Surface RT. Room may exist for a different, and more thorough hack.
2013-06-08 14:34:09 -04:00
David Ludwig
95485edebb
WinRT: fixed bug whereby landscape-only apps, as configured via an app's Package.appxmanifest file, would report an incorrect display mode on app init, if the device was in portrait mode
2013-05-26 20:27:13 -04:00
David Ludwig
2b39466c25
WinRT: added code to help debug events related to window-sizing and device-orientation
2013-05-26 19:40:12 -04:00
David Ludwig
266edfa1f8
WinRT: added hotplug support for joysticks/game-controllers
2013-05-21 20:08:53 -04:00
David Ludwig
2ee499e0c3
WinRT: fixed XInput-related linker errors on non-x86 platforms (such as ARM)
2013-05-20 11:09:08 -04:00
David Ludwig
6356c76c2f
WinRT: added preliminary joystick / game controller support (minus hotplugging)
2013-05-19 23:30:34 -04:00
David Ludwig
41f4c8977d
WinRT: Windows Phone 8 build/project updates
2013-05-12 22:38:39 -04:00
David Ludwig
42d450ffdb
WinRT: made sure SDL_GameController APIs get linked in (to SDL.dll)
2013-05-11 21:54:10 -04:00
David Ludwig
858ffda149
WinRT: mouse-pointer debugging improvements
2013-05-05 11:30:44 -04:00
David Ludwig
6ee6088ee2
WinRT: fixed a display mode reporting bug, whereby DPI wasn't getting taken into account. (Thanks to Sylvain Becker for the fix!)
2013-05-05 11:27:58 -04:00
David Ludwig
9bac42e973
WinRT: added additional, optional code to aid with keyboard event debugging
2013-05-05 10:27:14 -04:00
David Ludwig
18180bc951
WinRT: removed the "generic" + C++/CX hack-fix, now that a better fix is in official-SDL
2013-04-21 12:49:15 -04:00
David Ludwig
6bf31495f9
WinRT: merged with latest, official, SDL 2.x sources
2013-04-21 12:38:44 -04:00
David Ludwig
95a3bba282
future-proofing for Microsoft's C++/CX extensions, whereby "generic" is a reserved keyword
2013-04-20 23:05:08 -04:00
Jørgen P. Tjernø
84b7ed93dc
Fix overflow in recent gamecontroller trigger change.
2013-04-19 16:02:16 -07:00
Jørgen P. Tjernø
2a4188c11f
Make gamecontroller triggers have values in 0 - 32767.
...
This changes the old behavior of having values in the -32768 - 32767
range, like regular joystick axis. Now "button as axis" triggers (like
on Logitech controllers) and regular axis triggers (like on Xbox
controllers) have the same resting value, 0.
2013-04-19 10:51:21 -07:00
Gabriel Jacobo
4881297e05
Fix for bug #1776 by Jonathan Dearborn
2013-04-19 14:40:39 -03:00
Gabriel Jacobo
6ff972260a
Fixes bug #1709 , pthread tests fixes for CMake (Thanks Scott Percival!)
2013-04-19 13:25:39 -03:00
Ryan C. Gordon
8cc072db1b
Fixed using the event queue lock before the mutex was created.
...
This has the benefit of ending the otherwise-bogus complaints that
SDL_GetError() reports "Passed a NULL mutex" if you call it instead of
checking if SDL_CreateWindow() actually succeeded. :)
2013-04-19 11:58:38 -04:00
David Ludwig
48c5ee264e
WinRT: made SDL's inner WinRT CoreWindow be accessible to non-C++/CX code, in theory
2013-04-16 23:40:03 -04:00
Ryan C. Gordon
7cdcd5bebb
Cleaned up the const_cast mess a little.
2013-04-16 01:38:08 -04:00
Ryan C. Gordon
295c17e99b
Don't use glDisable(GL_TEXTURE_2D) in GLES2 renderer.
...
Fixes Bugzilla #1799 .
2013-04-17 11:45:50 -04:00
Andreas Schiffler
4e8c854aab
Fix bug 1789: SDL_IntersectRect intersection with empty rect does not set result to empty; add test coverage to Rect suite
2013-04-17 08:09:11 -07:00
Andreas Schiffler
fc589bd617
Fix bug 1764: incorrect variable assignment in RenderDrawLinesWithRects
2013-04-17 07:35:30 -07:00
Sam Lantinga
ab2a7e61cf
Fixed bug 1805 - Memory Leak issue in src/video/x11/edid-parse.c file
...
Nitz
In Function,
MonitorInfo *
decode_edid (const uchar *edid)
In this function "info" is going out of scope and leaks the storage it points to, if the first if condition get true:
if (!decode_header (edid))
return NULL;
So while returning from this if statement there should be free for "info" pointer.
2013-04-17 01:38:59 -07:00
Sam Lantinga
6b599f9c89
Fixed bug 1804 - Memory leak issue in src/video/x11/SDL_x11mouse.c
...
Nitz
In SDL_x11mouse.c file there is function named
static Cursor
X11_CreatePixmapCursor(SDL_Surface * surface, int hot_x, int hot_y)
{
// Some code
data_bits = SDL_calloc(1, surface->h * width_bytes);
mask_bits = SDL_calloc(1, surface->h * width_bytes);
if (!data_bits || !mask_bits) {
SDL_OutOfMemory();
return None;
}
// Some code
}
Here is the problem in if statement,
suppose if !data_bits is false and !mask_bits is true then,
data_bits will go out of scope and leaks the memory it points to.
Solution is that data_bits and mask_bits should be checked separately, not by using OR operator.
2013-04-17 01:35:10 -07:00
Sam Lantinga
4f8c0f33f9
Fixed bug 1802 - NULL pointer dereference in SDL_AllocRW() if out of memory.
...
Philipp Wiesemann
There is a NULL pointer dereference in SDL_AllocRW() if the system is out of memory. The "type" field is always written. This may be fixed with an early return.
Or an else{} or not writing the field and using slower SDL_calloc().
This fault was recently introduced (http://hg.libsdl.org/SDL/rev/681820ca0e78 ).
2013-04-17 01:32:06 -07:00
Sam Lantinga
ec2f595166
BMP files don't contain alpha information in the palette, the fourth element is reserved and must be zero.
2013-04-16 09:33:33 -07:00
Ryan C. Gordon
98dc9306b5
Removed C++-style single-line comments from a public header (thanks, Martin!).
...
Fixes Bugzilla #1803 .
2013-04-16 01:05:32 -04:00
Ryan C. Gordon
cb5cba6397
Maybe actually fix compiler warning this time.
2013-04-16 00:09:48 -04:00
Ryan C. Gordon
df8125df4b
Fixed a compiler warning on Visual Studio.
2013-04-15 22:49:23 -04:00
Ryan C. Gordon
006f31e2ec
Make the new SDL_RWops::hidden::unknown::data2 field a void*, not an int.
2013-04-14 18:05:14 -04:00
David Ludwig
86bfe54a2d
WinRT: build fixes for the loopwave and testthread test apps
2013-04-14 12:06:58 -04:00
David Ludwig
f9531484c0
WinRT: hack-fixed C++/CX compile errors regarding the 'generic' field in SDL_Event, which conflicts with a C++/CX keyword
2013-04-14 11:45:01 -04:00
David Ludwig
49820874a9
WinRT: merged with latest, official, SDL 2.x sources (at rev. bea100d73d13)
2013-04-14 11:42:55 -04:00
David Ludwig
a46b1c6663
WinRT: added render-to-texture support for D3D 11.1, via SDL_SetRenderTarget
2013-04-13 23:03:46 -04:00
Ryan C. Gordon
1e6e7727c6
Added a data2 field to the SDL_RWops::hidden::unknown.
...
This shouldn't change the ABI, since this struct had space left in the union.
2013-04-13 20:43:32 -04:00
Andreas Schiffler
94f59c7e7c
Add test coverage for SDL_SetWindowData and SDL_GetWindowData to Video suite
2013-04-13 09:45:39 -07:00
Ryan C. Gordon
a5ca62ea98
Fixed a typo (thanks, Ethan!).
2013-04-10 22:18:10 -04:00
Jørgen P. Tjernø
8405633512
Numlock & pause fix from Alfred.
...
Fix numlock and pause keys not being pressable on win32, they both report under
the same scancode, so use the VK to tell them apart
2013-04-10 14:11:26 -07:00
Ryan C. Gordon
f77b979436
More const_cast fixes for C++ apps using the public headers (thanks, Martin!).
2013-04-08 18:37:50 -04:00
David Ludwig
922323a1cd
WinRT: added texture channel color-modulation support for D3D 11.1
2013-04-07 22:35:58 -04:00
Ryan C. Gordon
1a2d04cab5
Fixed another infinite recursion accident in stdlib.
2013-04-05 16:34:59 -04:00
Ryan C. Gordon
76435d933b
Corrected some stdinc inline functions (thanks, Martin!).
...
qsort() returns void, so remove the "return" keyword, plus some C++
const_casting magic.
Fixes Bugzilla #1785 .
2013-04-04 11:35:22 -04:00
Jørgen P. Tjernø
6337624232
Improve testgamecontroller output & robustness.
2013-04-03 16:48:23 -07:00
Jørgen P. Tjernø
7f8886048e
Add 3 Logitech gamecontroller mappings for Mac OS X.
2013-04-03 16:48:20 -07:00
Ryan C. Gordon
7635069643
Fixed compiler warnings in Mac Xcode builds.
2013-04-03 11:58:04 -04:00
Ryan C. Gordon
f3c21ea99e
Another attempt at fixing compiler warnings for SDLTest_SurfaceImage_t.
2013-04-03 11:49:25 -04:00
Ryan C. Gordon
5b551af664
Compiler warning fixes for Windows message box code.
2013-04-03 11:48:03 -04:00
Ryan C. Gordon
09c6b9cdfb
Possibly fix compiler warnings, simplify SDLTest_SurfaceImage_t definition.
2013-04-03 11:38:05 -04:00