Ryan C. Gordon
8328f33947
Make XInput haptic code respect effect timeouts.
...
This is really just a hack until this code expands to be a robust haptic mixer.
(This is also untested, beyond compiling. Sorry!)
--HG--
extra : rebase_source : 1ea0101273d96c6d82db9b603a575e265d4ee426
2013-07-20 18:51:49 -04:00
Philipp Wiesemann
5875c163cf
Changed documentation comment for SDL_CreateShapedWindow().
...
See bug #1667 .
2013-07-20 21:55:15 +02:00
Philipp Wiesemann
32e6f653b6
Replaced use of malloc()/free() with SDL_malloc()/SDL_free() in test program.
2013-07-20 21:51:53 +02:00
Philipp Wiesemann
62c31ff5c3
Removed not needed SDL_WINDOW_SHOWN from test programs.
...
See bug #1667 .
2013-07-20 21:47:16 +02:00
Philipp Wiesemann
74e5c8cffd
Replaced use of strcmp() with SDL_strcmp() in tests.
2013-07-20 21:39:54 +02:00
Philipp Wiesemann
e96e39d53b
Removed not needed variable and work in standard library.
...
Found by Cppcheck (that variable's value was never used).
2013-07-20 21:35:26 +02:00
Ryan C. Gordon
d92ced54a0
Workaround crash bug in libXi <= 1.4.1 (thanks, Steve!).
...
Fixes Bugzilla #1812 .
2013-07-20 13:11:40 -04:00
Philipp Wiesemann
6fc856ae8a
Corrected comments in test library source.
2013-07-20 11:16:50 +02:00
Philipp Wiesemann
905c71baec
Changed return value of internal function to shorten generic haptic source.
2013-07-20 11:01:03 +02:00
Sam Lantinga
a663b9c637
Fixed bug 1977 - D3D_UpdateClipRect() sets the wrong width for the clip rect
...
Bithika Mookherjee
SDL_RenderSetClipRect() calls into renderer->UpdateClipRect(renderer).
I am not sure if UpdateClipRect() can point to a number of clip rect update functions, but on my platform it calls D3D_UpdateClipRect().
In that function, the rect to pass to IDirect3DDevice9_SetScissorRect() has it's right field set as:
r.right = rect->w + rect->w;
But actually, this should be:
r.right = rect->x + rect->w;
2013-07-19 22:43:14 -07:00
Ryan C. Gordon
93f82137fd
Fixed wrong type being passed to eglGetConfigAttrib() (thanks, Alexander!).
...
This wanted an EGLint*, not a VisualID* cast to an EGLint*.
Without this, 64-bit X11 fails here, because the datatype sizes are different.
Fixes Bugzilla 1686.
2013-07-19 00:22:57 -04:00
Ryan C. Gordon
600c62cf30
Added finger events to SDLTest_PrintEvent().
...
--HG--
extra : amend_source : 8e28c43eebf02b49e3f4502311a089090e65f2a6
2013-07-18 22:20:09 -04:00
Jørgen P. Tjernø
3f15d37da2
Mac: Handle SDL_CreateWindow with SDL_WINDOW_MINIMZED.
...
This fixes bug #1446 . You can now create a window with SDL_CreateWindow(...,
SDL_WINDOW_MINIMIZED), and not have it immediately restore itself.
It also changes SDL_RaiseWindow() to be a no-op on minimized or hidden windows,
which is how it behaves on Windows.
2013-07-16 01:02:51 -07:00
Ryan C. Gordon
5256d2e392
Made PND_setwindowgrab() a no-op. It was a cut/paste of PND_destroywindow().
...
This looks like the rest of the code doesn't deal with windows, and probably
just deals with a single fullscreen GLES context, like a console would, so
making setwindowgrab a no-op makes sense in this case; it's already "grabbed."
Fixes Bugzilla #1850 .
--HG--
extra : rebase_source : 29b07b9c8378f69fb8b5f201584befd8d7f005dd
2013-07-15 20:30:04 -04:00
Philipp Wiesemann
74e1355637
Changed strdup() to SDL_strdup().
2013-07-15 23:00:47 +02:00
Jørgen P. Tjernø
074edba0c1
Mac: Bring back FS windows when appropriate
...
This automatically restores FS windows when the application is made
active (Cmd-Tab, you click the Dock icon, or you launch the .app again).
2013-07-15 11:58:49 -07:00
Jørgen P. Tjernø
7aa0cf9eaa
Mac: CGMakePoint -> CGPointMake in previous change.
2013-07-15 11:58:45 -07:00
Jørgen P. Tjernø
2bfb402659
Mac: Fix SDL_WarpMouseInWindow in fullscreen.
...
If you switched from a window to fullscreen, your SDL_WarpMouseInWindow
calls would be offset by the x and y coordinates of the original window.
2013-07-15 11:57:18 -07:00
Ryan C. Gordon
5772df05d2
Turn the system mouse cursor back on before VideoQuit().
...
This is good policy, so it doesn't have a chance to leave it hidden on targets
that wouldn't necessarily reset it by default, but it also fixes a crash if
you try to use a message box after SDL_Quit() is called.
Fixes Bugzilla #1969 .
2013-07-15 14:38:19 -04:00
Ryan C. Gordon
52b4a55049
Minor indentation clean up.
2013-07-15 01:12:15 -04:00
Ryan C. Gordon
8f4fb24e2d
Make winmm and directsound audio targets robust against unsupported formats.
...
It now tries to make sure the hardware can support a given format, and if it
can't, it carries on to the next best format instead of failing completely.
--HG--
extra : rebase_source : 7b4e61c8030d1e1ce4c926bc0abc9b4d4af11dd9
2013-07-14 21:30:16 -04:00
Jørgen P. Tjernø
901d874a2b
Fix #1445 : Use xcrun to find CpMac
...
This should make the DMG building step more reliable on all current and future
Xcodes, by using xcrun to find the path to CpMac.
2013-07-14 15:55:34 -07:00
Jørgen P. Tjernø
e5ffe6b633
Fix #1667 : Docs about SDL_CreateWindow and flags.
...
Updates the docs to say you can use SDL_WINDOW_HIDDEN, instead of (the ignored)
SDL_WINDOW_SHOWN.
2013-07-14 15:46:43 -07:00
Sam Lantinga
87baf66d18
Re-enabled other messagebox tests, moved the SDL_Init() call as late as possible to show the circumstances where it's needed.
2013-07-14 12:16:10 -07:00
Sam Lantinga
7bc74ebaa4
Fixed bug 1970 - Cocoa message boxes ignore parent window requests
...
Ryan C. Gordon
Cocoa_ShowMessageBox() ignores the "window" field of SDL_MessageBoxData, which means you can't assign a parent window to a message box. This is particularly egregious on Mac OS X, because it'll actually make the NSAlert visually part of the parent window instead of just concerning itself with window focus.
2013-07-14 11:58:57 -07:00
Sam Lantinga
26c456e4ff
Added testing of messagebox with a parent window
2013-07-14 11:57:45 -07:00
Sam Lantinga
c43e19485b
Fixed code example for SDL_GetWindowWMInfo()
2013-07-14 11:57:01 -07:00
Sam Lantinga
3d97a0a1bb
Removed obsolete assertion code
2013-07-14 11:43:25 -07:00
Sam Lantinga
284b7113ad
Make sure a window is valid for a subsystem before using it in a messagebox
2013-07-14 11:41:57 -07:00
Sam Lantinga
73cb183fdb
If the video system has been initialized, only use that message box system.
...
Don't pass a window from one video driver to the messagebox function of another video driver. This makes bad things happen. :)
2013-07-14 11:11:42 -07:00
Philipp Wiesemann
991e2fb26c
Fixed compiler warnings in test program by using wrapped functions.
2013-07-14 19:56:22 +02:00
Philipp Wiesemann
1603534707
Changed use of isspace() to SDL_isspace().
2013-07-14 19:53:50 +02:00
Ryan C. Gordon
c944a4fdf9
Implement float32 support for winmm and directsound targets (Thanks, John!).
...
Fixes Bugzilla #1657 .
2013-07-14 13:27:54 -04:00
Ryan C. Gordon
4e5bd8491f
Fixed compiler warning in testtimer.c
2013-07-14 13:25:49 -04:00
Ryan C. Gordon
37bb3c5354
Protect SDL_PauseAudio*() with the audio callback lock.
...
Otherwise, you can pause audio and still have the callback running, or run
one more time. This makes sure the callback is definitely stopped by the
time you return from SDL_PauseAudio().
2013-07-14 12:42:12 -04:00
Ryan C. Gordon
e5c1f21fae
Fixed off-by-one error in SDL_AudioQuit() (thanks, Rainer!).
...
Audio Devices IDs are offset by one.
Fixes Bugzilla #1971 .
2013-07-14 11:28:18 -04:00
Philipp Wiesemann
a05aecab3b
Removed unused internal function.
...
Found by Cppcheck.
2013-07-14 14:32:26 +02:00
Philipp Wiesemann
4405163127
Fixed compiler warnings in test program by using wrapped functions.
2013-07-14 13:33:54 +02:00
Philipp Wiesemann
5aeed40282
Fixed compiler warnings in test programs by adding return statements.
2013-07-14 13:30:26 +02:00
Philipp Wiesemann
7ca8149a59
Fixed compiler warnings in test programs by adding includes directives.
2013-07-14 13:27:19 +02:00
Ryan C. Gordon
dbb91faaf9
Changed some for-loops to be a bit more clear.
2013-07-13 21:56:31 -04:00
Ryan C. Gordon
3137c0fc68
Don't copy structs to stack in cmpmodes(), use const pointers instead.
...
(and return 0 immediately if the pointers are the same.)
2013-07-13 21:50:40 -04:00
Ryan C. Gordon
0df5b7f912
Don't use SDL_memcmp() on modes to check if they've already been added.
...
They might have different driverdata values and thus not match.
Fixes Bugzilla #1407 .
2013-07-13 21:42:57 -04:00
Ryan C. Gordon
7f4744bf03
Explicitly check for Xext.h in the CMake project, fail if missing.
...
Added to match configure script change in hg changeset 8f118396264b.
2013-07-13 20:24:09 -04:00
Philipp Wiesemann
59401ae635
Fixed compiler warnings in test programs.
2013-07-13 21:13:09 +02:00
Philipp Wiesemann
f158b5f47e
Added missing fclose() in test program.
...
Found by Cppcheck.
2013-07-13 21:06:56 +02:00
Philipp Wiesemann
884898cbfc
Removed unused variable and not needed assignment in test program.
...
Found by Cppcheck.
2013-07-13 21:05:13 +02:00
Philipp Wiesemann
396bc93955
Fixed printf() usage in test program.
...
Found by Cppcheck.
2013-07-13 21:02:23 +02:00
Sam Lantinga
0eb5308b0f
Added a configure check for Xext.h
2013-07-13 10:41:57 -07:00
Sam Lantinga
6956070880
Added a hint to control the Windows timer resolution: SDL_HINT_TIMER_RESOLUTION
...
Added an API to watch hint changes: SDL_AddHintCallback(), SDL_DelHintCallback()
You can now dynamically set the joystick background event hint.
2013-07-13 03:13:41 -07:00