Commit graph

4332 commits

Author SHA1 Message Date
Sam Lantinga
e0bf2dc643 Made it possible to build SDL from a fresh checkout without any additional steps.
The trick is that if you're using configure and you don't want to have SDL_config.h and SDL_revision.h to show up as modified, you need to configure and build from a separate directory.

You also need to include SDL_revision.h directly if you want to use the SDL_REVISION constant, as a side effect of these changes.

--HG--
rename : include/SDL_config.h.default => include/SDL_config.h
2011-02-16 02:37:09 -08:00
Sam Lantinga
20ae4187a4 Needed to allocate memory for the shadow surface if we needed to create one. 2011-02-16 01:40:44 -08:00
Sam Lantinga
3c7c3d8d8b Okay, _now_ SDL_WM_ToggleFullScreen() works on all platforms. :) 2011-02-16 01:26:39 -08:00
Sam Lantinga
1738e5f49d Hot damn, SDL_WM_ToggleFullScreen() works on all platforms now. :) 2011-02-16 00:45:10 -08:00
Sam Lantinga
d119c3824f Fixed resetting the Direc3D renderer on mode change 2011-02-16 00:11:48 -08:00
Sam Lantinga
6c726ca475 Fixed a host of issues with Windows fullscreen modes. Toggling fullscreen OpenGL works now in my test environment. 2011-02-15 23:07:14 -08:00
Sam Lantinga
d865e46b13 Allow centering on a different display 2011-02-15 22:51:29 -08:00
Sam Lantinga
3e5d117b19 Fixed gcc -pedantic warning 2011-02-15 21:57:31 -08:00
Sam Lantinga
99260d91a1 Implemented X11 fullscreen toggling with modern window managers 2011-02-15 17:23:02 -08:00
Sam Lantinga
8abd1a0541 Patch to fix includes from Frank Zago 2011-02-15 16:41:04 -08:00
Sam Lantinga
c1b336b8ee Don't accidentally pick a YV12 format as the closest format. 2011-02-15 15:50:21 -08:00
Sam Lantinga
a6be4e7267 Don't reset the viewport unless you have to. 2011-02-15 14:17:42 -08:00
Sam Lantinga
2a4134c20a Whoops, need to actually clip to the viewport in the software renderer. 2011-02-15 14:10:50 -08:00
Sam Lantinga
c804b92b9e Changed the concept of a render clip rect to a render viewport.
The render viewport is automatically re-centered when the window changes size, so applications that don't care will not have to handle recalculating their rendering coordinates.

Fixed API for drawing and filling multiple rectangles - the parameter should be an array of rects, not an array of pointers to rects.

Fixed API for updating window rects for consistency with other APIs - the order is pointer to array followed by count in array.
2011-02-15 13:59:59 -08:00
Ken Rogoway
32d70d6f2b Software scaling support. Not very fast, but it seems to work. 2011-02-14 11:50:18 -06:00
Sam Lantinga
20b4d9f762 Patch from Ken Rogoway:
Migrate all of the recent changes into the SDL VS2005 project file.
Fix missing return value in SDL_pixels.c
Fix compile error in testscale.c, variable was incorrectly named.
Added VS2005 project file for testscale
2011-02-14 00:45:16 -08:00
Sam Lantinga
72cdb910fb Center the old SDL 1.2 screen in the window if we can't get the size we wanted. 2011-02-13 23:09:18 -08:00
Sam Lantinga
98f0920828 Fixed crash while resizing a window on Mac OS X. 2011-02-13 22:53:12 -08:00
Sam Lantinga
da8fc93d71 The format_version isn't used anymore. 2011-02-13 22:30:06 -08:00
Sam Lantinga
19ffc209ef Fixed renderer variable scope. 2011-02-13 14:05:33 -08:00
Sam Lantinga
1c7ff9df09 Removed renderer definition, removed extra -I statements since no other platform has them (files should be explicit in their include paths). 2011-02-13 14:02:37 -08:00
Sam Lantinga
f9a5f416fb Frank Zago to SDL
On 02/12/2011 01:44 PM, Sam Lantinga wrote:
> BTW, you probably want to nuke the NDS renderer and just implement these three
> functions instead:
>     int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 *
> format, void ** pixels, int *pitch);
>     int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, int numrects,
> SDL_Rect * rects);
>     void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);

Patch attached. The renderer for the DS is not used anymore, but I left the
file in place if someone wants to finish it.

I've also added a README.ds and fixed the spinlocks.
2011-02-13 14:01:02 -08:00
Sam Lantinga
5095592ce5 A few fixes:
Fixed creating render texture framebuffer.
Removed the need for palette watch, added surface format caching.
Added an SDL_DONTFREE flag so you can't free the window and 1.2 shadow surfaces.
2011-02-13 13:46:10 -08:00
Sam Lantinga
13ba84bf0e Whoops, work in progress, didn't mean to commit. 2011-02-13 01:31:07 -08:00
Sam Lantinga
978839d076 Updated the platform test for the new CPU feature functions. 2011-02-13 01:29:29 -08:00
Sam Lantinga
5fe61f6aaa Needed to pass the renderer in. 2011-02-13 00:18:05 -08:00
Eric Wing
38437fce7f Changed output directory of Universal libSDL.a for iOS to respect build configurations. Template generator was updated to reflect these changes as well. 2011-02-12 21:52:30 -08:00
Eric Wing
bfd339b994 merged 2011-02-12 21:34:36 -08:00
Eric Wing
9a464ae798 merged 2011-02-12 19:16:09 -08:00
Sam Lantinga
93ab733085 Fixed bug #1117
There's a new event that's always sent when the window changes size, and that event is what the renderers listen for to determine if they need to rebind their context.
2011-02-12 19:02:14 -08:00
Sam Lantinga
fbfad97573 Fixed bug #1116
Don't allocate the window's texture data until after creating the renderer, in case the renderer recreates the window.
2011-02-12 17:51:47 -08:00
Sam Lantinga
9526c9da70 changeset: 5278:b4b71ec2af73
tag: tip
user: Martin Decky <martin@decky.cz>
date: Sat Feb 12 22:27:14 2011 +0100
summary: fix typo (assigning height value into displayrect.w instead of displayrect.h)
2011-02-12 17:36:09 -08:00
Sam Lantinga
bb1d345990 This should match the header change. 2011-02-12 12:04:23 -08:00
Sam Lantinga
52df6c6092 changeset: 5272:cb08ef104ac4
tag: tip
user: Martin Decky <martin@decky.cz>
date: Sat Feb 12 20:53:06 2011 +0100
summary: improve header files compatibility with SDL 1.2 applications (namely QEMU)
2011-02-12 12:04:00 -08:00
Sam Lantinga
e38cbfcc5a Removed the atomic file for the old API 2011-02-12 11:43:22 -08:00
Sam Lantinga
96656bb924 Frank Zago to sdl
The following patch fixes some of the bitrot for the Nintendo DS port.
The support is still basic at the moment, but it allows to run the "general"
test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that John
Magnotti posted on Feb 1st.
2011-02-12 11:36:56 -08:00
Sam Lantinga
5fc9a80e24 The YV12 image isn't w*h*2, it's actually w*h + w*h/4 + w*h/4 2011-02-12 10:13:53 -08:00
Sam Lantinga
ba0ff6d7c8 Fixed a crash caused by the 1.2 code path getting a YV12 texture. :) 2011-02-12 08:17:58 -08:00
Sam Lantinga
e74e437b3c Only expose the OpenGL flag to SDL 1.2 if it was requested.
The window flags mean the window is OpenGL capable.  The surface flag means that the surface is a stub surface representing a window that has an OpenGL context attached.
2011-02-12 08:17:37 -08:00
Sam Lantinga
8443161ffd Removed private API use that was causing AppStore rejection
Pavel Kanzelsberger to SDL

I tried to submit a SDL application to the Mac AppStore and it got rejected because SDL cocoa is using a Private (non-public) API. Problematic part is here:

SDL_cocoaevents.m

@implementation NSApplication(SDL)
- (void)setRunning
{
    _running = 1;
}
@end

Symbol _running in NSApplication is private and shouldn't be used. Any ideas what could I do about this?
2011-02-12 07:57:35 -08:00
Sam Lantinga
78a17dbc64 Ah there, that fixed it. :) 2011-02-12 00:42:39 -08:00
Sam Lantinga
53654196fd Initial pass at shader YV12 support - doesn't quite work yet. 2011-02-12 00:25:02 -08:00
Sam Lantinga
8ecd7110d2 Fixed SSE4 detection, and split it into SSE 4.1 and 4.2 2011-02-11 23:02:35 -08:00
Sam Lantinga
e5803d148c Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
059ef6ad0d There is only one width and height for the window. If those are changed during the course of a fullscreen mode change, then they'll stay that size when returning to windowed mode. 2011-02-11 20:49:13 -08:00
Sam Lantinga
d63ef6e2a4 itsnotabigtruck has given me permission to replace the license for his contribution. 2011-02-11 19:11:27 -08:00
Sam Lantinga
0314fd4e0f Updated CPU detection code for SSE3 and SSE4 and removed obsolete 3DNow! and Altivec support. 2011-02-11 14:51:04 -08:00
Sam Lantinga
e8f3f1e948 More removal of leak code. 2011-02-11 14:42:58 -08:00
Sam Lantinga
fcc17ebcb2 Finished removing unused leak detection code. 2011-02-11 14:42:06 -08:00
Sam Lantinga
5a0ad0fca0 Removed unused leak detection code. 2011-02-11 14:23:22 -08:00