Commit graph

3035 commits

Author SHA1 Message Date
Ryan C. Gordon
a5d345e374 Don't use a bitfield for this.
It pads out to an int anyhow, but causes code bloat as the compiler tries to
 mask and shift for that specific bit.
2011-07-22 00:09:58 -07:00
Ryan C. Gordon
4b70200bf8 Work on systems without sa_sigaction. 2011-07-20 16:35:37 -07:00
Nathan Heisey
a6ec7506e1 Framebuffer support in progress. 2011-07-20 19:25:38 +00:00
Ryan C. Gordon
1a862ae6d3 Patched to compile on older GLX headers. 2011-07-18 14:55:24 -07:00
Ryan C. Gordon
93d2b83299 Added support for GLX_EXT_swap_control, and cleaned up some other extensions.
This allows the Nvidia Linux drivers to use SDL_GL_SetSwapInterval(0).
2011-07-18 14:34:19 -07:00
Ryan C. Gordon
d05ada5235 The SwapInterval APIs should fail without a current OpenGL context. 2011-07-18 14:31:37 -07:00
Ryan C. Gordon
b77354e7d9 Record the new OpenGL context as current during SDL_GL_CreateContext(). 2011-07-18 14:30:46 -07:00
Andreas Schiffler
9db859c159 Fixed SDL_SetError() by making NULL fmt a no-op, update test automation 2011-07-17 20:59:34 -07:00
Nathan Heisey
569fcd280c Should compile now (fixed typos(?)) 2011-07-14 17:58:47 +00:00
Nathan Heisey
63c52052ea Fixed video compile(?) 2011-07-13 09:37:00 +00:00
Nathan Heisey
9a7e7f87f9 Renamed all .c files in src/video/bwindow to .cc files. 2011-07-13 09:29:43 +00:00
Nathan Heisey
461d178134 Removed 1.2 files. 2011-07-12 15:09:44 +00:00
Nathan Heisey
70ba5c8150 Rewrote most of Haiku video support to conform with 1.3 functionality. 2011-07-12 15:06:12 +00:00
Nathan Heisey
4f1212a24b Replaced private event functionality with event sending. 2011-06-24 12:48:43 +00:00
Nathan Heisey
afa5bfc8d0 SDL 1.3 patch 00 for GSoC: Haiku - Implemented pthread spinlock in src/atomic/spinlock.c (in both trylock and
unlock).  Added appropriate checks in configure.in and include/SDL_configure.h.in.
2011-06-21 13:49:14 +00:00
Tim Angus
d39b9dd978 * Add missing file SDL_hints_c.h 2011-06-15 10:28:01 +01:00
Tim Angus
2f0bec3220 * SDL_IOS_IDLE_TIMER_DISABLED hint 2011-06-10 14:23:36 +01:00
Tim Angus
a36a856bf9 * SDL_IOS_ORIENTATIONS hint 2011-06-10 14:23:24 +01:00
Dimitris Zenios
b43aca329d Fixes a bug in SDL_UpdateTexture when using SDL_RENDERER_SOFTWARE and texture access is SDL_TEXTUREACCESS_STATIC 2011-06-10 12:13:06 +03:00
Ryan C. Gordon
2fdcb7bdfc Fixed memory leak in SDL_DestroyRenderer.
Fixes Bugzilla #1219.

Thanks to Dimitris Zenios for the patch!
2011-07-16 14:59:12 -07:00
Ryan C. Gordon
0b3c783570 Cocoa: Update the current GL context when its window moves or resizes.
According to the NSOpenGLContext docs, you need to do this, and we were
 previously masking the need in the SDL_GL_MakeCurrent() implementation.
2011-07-16 11:52:09 -07:00
Ryan C. Gordon
34edc62460 Turn SDL_GL_MakeCurrent() into a no-op if setting the same context twice. 2011-07-15 17:05:32 -07:00
Ryan C. Gordon
c4348f44f7 Linux: Search a smaller set of potential joystick axes.
Newer kernels seem to report bogus axes in the higher ranges, for example
 with a standard PlayStation 3 controller plugged in via USB.
2011-07-13 17:38:09 -07:00
Ryan C. Gordon
1fc724be50 Properly set up default resolutions.
Fixes Bugzilla #1191.

Thanks to Jeremy Jurksztowicz for the fix!
2011-07-05 22:05:56 -04:00
Nathan Heisey
dfe639930e Implemented pthread spinlocks. 2011-06-22 10:33:48 +00:00
Ryan C. Gordon
590a060f3b Assert code's stdio interface was reading from the wrong variable.
Thanks to Frank Zago for the catch.
2011-06-03 16:03:10 -04:00
Ryan C. Gordon
f2b3dc5a5a Make assert dialog work on Cocoa target even if we haven't initialized video.
--HG--
extra : rebase_source : 04ec77f4a3a3f61fdb1255c4fc3b8c88efd68ffb
2011-04-20 15:14:18 -04:00
Ryan C. Gordon
b94f23a46d Removed assertion list terminator (just do it like a normal linked list). 2011-04-19 14:12:56 -04:00
Sam Lantinga
e740162fb0 Fixed: Windows always fails with SDL_HapticOpenFromJoystick
The windows function SDL_SYS_HapticOpenFromJoystick fails because DIDEVICEINSTANCE joy_instance does not have its dwSize field initialized.  The attached patch includes the fix along with a fix for two similar problems.

Daniel Heath
2011-04-19 08:08:50 -07:00
Sam Lantinga
605263ee5f Removed buggy and LGPL MMX mixing routines. 2011-04-08 13:16:33 -07:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
c336f6f154 Fixed build error 2011-04-06 17:10:14 -07:00
Sam Lantinga
5e1ffb1cc3 Allow overriding the app delegate on iOS
Vittorio G.  to Eric, Sam

Actually this is much simpler than i thought, I just had to specify a
class method to get the delegate name and then the category can
override that method!
I've attached the patch that enables this features: in my code i could
remove my custom main() and simply add

@implementation SDLUIKitDelegate (customDelegate)
+(NSString *)getAppDelegateClassName {
   return @"HedgewarsAppDelegate";
}
@end

I tested it and with the sdl demos it loads the normal
SDLUIKitDelegate, while in my code it loads my HedgewarsAppDelegate!
2011-04-05 09:50:25 -07:00
Sam Lantinga
0e83d1d4f3 Fixed setting programmatically setting the size of a window on X11 for non-resizable windows.
Patch by Matthew Smaling
2011-04-05 09:47:34 -07:00
Sam Lantinga
65b0f3090a Fixed bug 1173 (No mouse wheel event on linux/x11)
Matthias      2011-03-20 23:07:02 PDT

On X11, SDL 1.3 does not generate a mouse wheel event. Instead, button
down/buttton up events are generated by SDL. After looking at the code in
SDL_x11events.c, I assume this is due to the fact that X11 does not have a
dedicated mouse wheel event.

I did a little research on the behavior of mouse wheel events on X11 systems.
Apparently, mouse wheel events generate a button down/button up event with the
same time, i.e. with exact same timestamp.

Attached you can find my changes to SDL_x11events.c, which generates SDL mouse
wheel events for those button down events that have a button release event
immediately following it (for the same button, and with the same timestamp).

I did have to make an assumption: As standard X11 implementations know only 5
buttons, I have mapped Button4 to "wheel up" (i.e. +1), and Button5 to "wheel
down" (i.e. -1).

Note that if you include this patch, no SDL button down/up events will be
generated on X11 platforms for mouse wheel events (which is probably a
significant change for those that have programmed their code to work with
them).
2011-04-05 09:35:56 -07:00
Ryan C. Gordon
b786ea8b06 Some more iOS orientation rotation fixes.
- Always use a UIViewController, even if window is not resizable.
- Let non-resizable windows still flip over, so user can hold device with the
correct orientation, but upside down, if that's more comfortable.
- Don't set the UIScreen unless we're forced to, as it resets some state.
- Minor correction with conventions for -[self init] tapdance.

--HG--
extra : rebase_source : d1b861f1174282eccb34f5efd183b03f6efcc2fa
2011-04-04 23:38:15 -04:00
Sam Lantinga
126bbbaa50 Added SDL_GetRenderer() 2011-04-04 09:29:13 -07:00
Ryan C. Gordon
b950cf4653 iOS: Correctly resize renderbuffers when rotating orientation.
Fixes strange rendering after rotating the device.

--HG--
extra : rebase_source : 6962fd0710f95a81773157507aca653f9a3e1115
2011-04-03 18:33:32 -05:00
Airlangga Cahya Utama
932c46e9ca Move variable declaration position to stick with C standart. 2011-04-03 18:24:27 +07:00
Sam Lantinga
e17ed1c762 Fixed compile error. 2011-03-29 03:05:26 -07:00
Sam Lantinga
b705071877 Filter out SDL_WINDOWEVENT_SIZE_CHANGED events too 2011-03-28 23:44:51 -07:00
Sam Lantinga
8e668b0606 Make sure the resize event gets through 2011-03-28 20:56:28 -07:00
Ryan C. Gordon
ab0fcbfbd2 Added orientation rotation for iOS. 2011-03-28 23:21:22 -04:00
Ryan C. Gordon
8a8592e34c iOS: Report both landscape and portrait orientation as display modes. 2011-03-27 01:35:19 -04:00
Sam Lantinga
3b72fdeffe NDS update
Frank Zago to SDL

I've cleaned up a few bugs in the nds code. A few more tests now pass.
There's still a few things to do, but overall I think it's starting to be in a
good shape.

The patch also includes a bug fix for SDL_ConvertSurfaceFormat() (gcc warning).
2011-03-26 21:26:05 -07:00
Sam Lantinga
85ad17e7d6 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency() 2011-03-25 14:45:04 -07:00
Sam Lantinga
98e5ddb37d Android defines linux, but doesn't have the gettid system call. 2011-03-25 13:48:48 -07:00
Sam Lantinga
5c01c4797c SDL 1.3 requires a 64-bit type for the platform. 2011-03-25 13:47:49 -07:00
Sam Lantinga
a38339ac08 Warn people not to run their applications as root! 2011-03-25 12:54:21 -07:00
Sam Lantinga
f0b1c9b859 The API sets the priority for the current thread, not an arbitrary thread.
Implemented thread priority as the 'nice' value on Linux.  High priority threads require root permissions (you shouldn't give your game root permissions though!)
2011-03-25 12:44:06 -07:00