Commit graph

5692 commits

Author SHA1 Message Date
Philipp Wiesemann
628e39e91c Removed dead store from Java file because value never used. 2013-04-27 17:15:40 +02:00
Philipp Wiesemann
65291c1e99 Renamed inner class in Java file to avoid confusion with an unrelated class. 2013-04-27 17:10:14 +02:00
Philipp Wiesemann
67eb721095 Corrected spelling header file comments. 2013-04-27 14:33:27 +02:00
Philipp Wiesemann
423489e19d Changed Java source file to use constant from API instead of just a String. 2013-04-27 14:26:15 +02:00
Philipp Wiesemann
bdd9df5fd9 Added missing @Override annotations in Java source file to reduce warnings. 2013-04-27 14:13:30 +02:00
Philipp Wiesemann
dc6e420626 Replaces tabs with four spaces in C source file. 2013-04-27 13:55:47 +02:00
Philipp Wiesemann
f06595200f Corrected comment in header file. 2013-04-27 13:42:56 +02:00
Philipp Wiesemann
1e5aaadf49 Corrected a comment in Java source file. 2013-04-27 13:33:05 +02:00
Jørgen P. Tjernø
9e4a519493 Mac: Fix relative mode message after gaining focus.
This fixes a bug where relative mode would give a large jump if the
cursor was moved when the app doesn't have focus.

--HG--
extra : histedit_source : ff1b20a9e7f6e079c073c4ef761566b6c80b0f22%2C9879c6c838c69afea4aa2be80cbe137054600d12
2013-04-25 18:40:29 -07:00
Jørgen P. Tjernø
22358fddd1 Mac: Don't supress mousemoves after warp.
By default, synthesizing events supresses real events for a quarter
second. This makes for some wonky behavior.

--HG--
extra : histedit_source : 769156e3eba77c601de006c5aad1cdc1febe1d6c
2013-04-25 18:40:22 -07:00
Jørgen P. Tjernø
51619c5485 Don't warp mouse on focus lost.
This isn't working great, so undo it until we can fix it properly to save /
restore mouse positions.

--HG--
extra : histedit_source : d8fe81a1690bd9406df132c325c8dd7c61baec29%2C2243b548ccaec444b2e4bdab04ba67cdf236c4fb
2013-04-25 18:40:31 -07:00
Edward Rudd
42b825029c Allow disabling SDL_IPHONE_KEYBOARD in iOS builds 2013-04-25 18:05:08 -04:00
Sam Lantinga
8a91a76148 Fixed bug 1582 - Allow disabling SDL_VIDEO_DRIVER_WINDOWS
Marcus von Appen

Trying to build SDL 2.x (HG) on Win32 platforms with either VS.NET or MinGW requires one to have the video subsystem and SDL_VIDEO_DRIVER_WINDOWS flag enabled due to the helper window creation routines.

The attached patch changes the helper window creation behaviour, so that one can build SDL2 without the video subsystem or Windows video drivers on Win32 platforms.
2013-04-25 00:26:17 -07:00
Sam Lantinga
b72f0b741e Fixed bug 1583 - Fix build for disabled SDL render subsystem
Marcus von Appen

If one wants to disable the SDL render subsystem, the build breaks on several platforms due to an empty render_drivers array in SDL_render.c.
2013-04-25 00:15:09 -07:00
Ryan C. Gordon
83e561b48c Removed Cocoa OpenGL optimization that was probably good advice 10 years ago. 2013-04-24 23:11:48 -04:00
Jørgen P. Tjernø
d8ef30ac34 Move cursor into window when enabling relative mode or gaining focus in relative mode.
This prevents wonky behavior where the clicks won't go to the window
because the cursor was outside it when we enabled relative mode.
2013-04-24 12:20:51 -07:00
Jørgen P. Tjernø
238eacc409 Mac: Update mouse position on warp. 2013-04-24 12:20:48 -07:00
Jørgen P. Tjernø
192af6485f Test plan for relative mode. 2013-04-24 12:20:44 -07:00
Jørgen P. Tjernø
69bc11e564 Add SDL_GetDefaultCursor.
This fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1798
Thanks to Alex Szpakowski for suggestion & patch.
2013-04-24 10:42:44 -07:00
Gabriel Jacobo
8836a99081 Bug 1787 - memory leak in WIN_InitMouse() by Marcel Bakker 2013-04-24 12:22:08 -03:00
Gabriel Jacobo
742233249a Bug 1786 - memory leak in WIN_GetDisplayModes by Marcel Bakker 2013-04-24 11:49:52 -03:00
Andreas Schiffler
c443135e94 Fix double free in video test suite 2013-04-23 20:45:49 -07:00
Jørgen P. Tjernø
7d048468d3 Mac: Fix cursor not updating when re-focusing the window.
This fixes a bug where [NSCursor set] doesn't take when called in
certain event handlers (like windowDidBecomeKey:).

http://bugzilla.libsdl.org/show_bug.cgi?id=1795

--HG--
extra : histedit_source : 3f150addd3b1b7bc6397aba60ccf05f9065ffb8c
2013-04-23 18:47:44 -07:00
Jørgen P. Tjernø
059ea2c1c6 Mac: Fix unmatched hide/show cursor calls.
This tracks the previous hide/unhide state of the cursor, so we don't
re-hide a hidden cursor.

--HG--
extra : histedit_source : d41e30a604fb9ff0da8fcfdd9ca926618e35c750
2013-04-23 18:47:41 -07:00
Jørgen P. Tjernø
4f88e70fe6 Mac: Make mouse movement smooth at edge of window when grabbed.
There's a limit of one update every 250ms when warping the mouse, and we
can work around that by disassociating the cursor & the mouse before
issuing our warp, then re-associating them.

--HG--
extra : histedit_source : 91ddf6078107ea9faf1c769a459e99bce6e61180
2013-04-23 18:47:38 -07:00
Jørgen P. Tjernø
694ebd59a3 Make sure to send MOUSEMOTION on window enter.
This should hopefully fix bug #1612. We now send mousemotion events when
the cursor enters the window as well as when it leaves.

Thanks to Alex Szpakowski for the fix.

Fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1612

--HG--
extra : histedit_source : e89e8952efcc07da98a306757edeaeded31517a9
2013-04-23 18:47:32 -07:00
Gabriel Jacobo
4b4bea7294 Fixes PSP_DestroyTexture release of data (don't release the SDL_Texture pointer) 2013-04-23 16:54:52 -03:00
Gabriel Jacobo
b1b1c1e2d1 Moved warning about SDL_AndroidGetActivity to SDL_system.h 2013-04-23 16:44:54 -03:00
Andreas Schiffler
2b47360970 Disable one test that crashes audio suite when run together with other tests 2013-04-23 08:19:21 -07:00
Andreas Schiffler
e4f6322689 Add tests to audio suite 2013-04-23 08:07:52 -07:00
Jørgen P. Tjernø
4601f48f85 Add multimon & mouse tracking info to SDL_test_common. 2013-04-22 18:15:10 -07:00
Jørgen P. Tjernø
187143d618 SDL_GL_DeleteContext would leave an invalid current_glctx.
Calling SDL_GL_DeleteContext wouldn't update current_glctx, so you could
end up with use-after-free and other goodies when you deleted a context.
2013-04-22 18:15:08 -07:00
Jørgen P. Tjernø
5a4c9c40f2 Forgot to add this file to Mac crash fix. 2013-04-22 18:15:00 -07:00
Jørgen P. Tjernø
f7032de060 Send mouse leave updates for Windows and X11.
We now generate a final SDL_MOUSEMOTION before the cursor leaves the
window, followed by a SDL_WINDOWEVENT_LEAVE.
2013-04-22 18:14:55 -07:00
Jørgen P. Tjernø
c7fb60a46b Make Cocoa_ShowMessageBox work in background threads. 2013-04-22 18:14:32 -07:00
Jørgen P. Tjernø
be8f97cb6a Fix Mac crash when creating fullscreen window introduced in 9d43403e9fc5.
makeKeyAndOrderFront: was sending three KVO transitions for isVisible,
for false -> true, true -> false, and then false -> true. This was
causing an infinite recursion.

We now suspend monitoring of the KVO before makeKeyAndOrderFront, then
resume afterwards and send any changes in isVisible's state.
2013-04-22 18:14:26 -07:00
VALVE\alfred@alfredlinux.valvesoftware.com
3bf28ba7c8 - make sure to send a joy removed event even if the joystick wasn't opened under OSX 2013-04-22 15:24:35 -07:00
Jørgen P. Tjernø
7849e997f6 Mac no longer loses OpenGL context when window is hidden.
This fixes an issue that would arise when you minimize / order out an
OpenGL window on Mac, where the window would lose it's window device.
Without a window device, you cannot render to the window.

It does so by making two changes:
  - Windows are no longer "oneShot" (which caused their window device to
    get destroyed when they're minified or ordered out)
  - Windows are no longer "deferred" (which caused the OS to defer
    window device creation until the window is shown, which meant that
    we couldn't properly makeCurrent to it)

Thanks to http://www.mikeash.com/pyblog/nsopenglcontext-and-one-shot.html
2013-04-22 12:07:16 -07:00
Jørgen P. Tjernø
c59f7d106e Properly reflect hidden/shown windows on OSX.
This fixes a bug where windows would always be considered to be in the
shown/hidden state they were originally created in.
2013-04-22 12:07:13 -07:00
Gabriel Jacobo
53c00d6cad Fixes #1815, don't release the LocalRef returned by SDL_AndroidGetActivity 2013-04-22 11:18:45 -03:00
David Ludwig
cf8a84626b 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ø
e4b6ac8025 Fix overflow in recent gamecontroller trigger change. 2013-04-19 16:02:16 -07:00
Jørgen P. Tjernø
12a26f7c35 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
ba5fc3539a Fix for bug #1776 by Jonathan Dearborn 2013-04-19 14:40:39 -03:00
Gabriel Jacobo
be4412d0f2 Fixes bug #1709, pthread tests fixes for CMake (Thanks Scott Percival!) 2013-04-19 13:25:39 -03:00
Ryan C. Gordon
5c189f9803 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.  :)

--HG--
extra : rebase_source : 49ed52691094eab9dd4012bb97f32fbcc678551e
2013-04-19 11:58:38 -04:00
Ryan C. Gordon
8069b5a7f3 Cleaned up the const_cast mess a little.
--HG--
extra : rebase_source : d3ca36c9e2438c114afe339d1cbf704d318b6185
2013-04-16 01:38:08 -04:00
Ryan C. Gordon
71b29b3822 Don't use glDisable(GL_TEXTURE_2D) in GLES2 renderer.
Fixes Bugzilla #1799.

--HG--
extra : rebase_source : bdcc78e0cbdb2879c7ae24666bea567ce24dcd74
2013-04-17 11:45:50 -04:00
Andreas Schiffler
56c27c7be9 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
5bd319e5b5 Fix bug 1764: incorrect variable assignment in RenderDrawLinesWithRects 2013-04-17 07:35:30 -07:00