Commit Graph

2219 Commits

Author SHA1 Message Date
Sam Lantinga
cbe0bbeb02 Fixed compiler warnings 2009-12-05 22:13:36 +00:00
Sam Lantinga
08dd462d5a Fixed compilation on Mac OS X 10.4 2009-12-05 19:57:49 +00:00
Sam Lantinga
ab85a49998 Don't add any renderers if you can't add any displays 2009-12-04 09:01:48 +00:00
Sam Lantinga
624f566965 Fixed calls to SDL_AddRenderDriver() 2009-12-04 08:45:08 +00:00
Sam Lantinga
f11bc297a2 Fixed compiling the D3D renderer 2009-12-04 08:26:32 +00:00
Sam Lantinga
1b9db6b1d5 Added support for SDL 1.2 environment variables:
SDL_VIDEO_FULLSCREEN_DISPLAY, SDL_VIDEO_FULLSCREEN_HEAD
2009-12-03 08:43:12 +00:00
Sam Lantinga
6d60a7e907 Fixed mouse events for fullscreen windows on Mac OS X 2009-12-03 08:33:39 +00:00
Sam Lantinga
2c7165c6f4 Restore the video mode after shutting down the renderer, which fixes an error deleting the OpenGL context on Mac OS X. 2009-12-03 05:05:26 +00:00
Sam Lantinga
f6828e88f9 Missing pop over a jump 2009-12-03 04:33:05 +00:00
Sam Lantinga
17424210d2 Restore the desktop mode when requested 2009-12-02 07:55:23 +00:00
Sam Lantinga
efacf93c19 If we're fullscreen on a single-head system and lose focus, minimize 2009-12-02 07:42:10 +00:00
Sam Lantinga
932374c12d On multi-display systems it's perfectly reasonable to have focus on a window on another monitor while the application is fullscreen. 2009-12-02 07:38:28 +00:00
Sam Lantinga
147d40ba98 Don't need to hide the menu bar if we're not on the main display 2009-12-02 07:28:58 +00:00
Sam Lantinga
7b253b6d72 Changed so that it's obvious that the two code blocks are related. 2009-12-02 07:25:06 +00:00
Sam Lantinga
98d4ce80cb Fixed mouse coordinates for fullscreen mode 2009-12-02 06:10:18 +00:00
Sam Lantinga
8d573748a7 The window positions are relative to the origin of the windowing system (upper left of the primary display).
Fixed the mouse positions for windowed mouse movement.
2009-12-01 12:08:34 +00:00
Sam Lantinga
3a9270299d Added support for placing windows on different displays 2009-12-01 11:50:00 +00:00
Sam Lantinga
339da23b8c Ensure that the main display is picked up first 2009-12-01 10:41:58 +00:00
Sam Lantinga
67759dc02c Allow mirrored displays, but only the primary display in a mirrored set. 2009-12-01 10:34:01 +00:00
Sam Lantinga
4fb5822326 Explicitly clear fullscreen status rather than relying on the window focus behavior. 2009-12-01 09:04:28 +00:00
Sam Lantinga
fcd49aba49 Whenever a window becomes fullscreen, shown, unminimized, and has input focus it will change the display to the corresponding fullscreen video mode.
If it loses any of those properties the desktop mode will be restored.
2009-12-01 08:56:12 +00:00
Sam Lantinga
2ce40757c1 Removed a little redundancy in the naming 2009-12-01 06:15:10 +00:00
Sam Lantinga
8adb9fc3cc Work in progress on multi-display support:
* Added display parameter to many internal functions so video modes can be set on displays that aren't the public current one.
* The fullscreen mode is associated with fullscreen windows - not displays, so different windows more naturally have a mode associated with them based on their width and height.  It's no longer necessary to specify a fullscreen mode, a default one will be picked automatically for fullscreen windows.
2009-12-01 05:57:15 +00:00
Sam Lantinga
27e8049669 Reduced the push/pop sequence to a single pair, and ported this fix over to the other architectures. 2009-11-30 21:04:25 +00:00
Sam Lantinga
e989a1a23e Fixed crash - need to save and restore rbx around cpuid, since the compiler may be assuming the stack pointer isn't being modified when filling in %0.
I did it around each call to cpuid which isn't strictly necessary, but is definitely future proof. :)
2009-11-30 19:52:34 +00:00
Sam Lantinga
e967be32b1 Added support for 32-bit BMP files with an alpha channel 2009-11-30 17:57:12 +00:00
Sam Lantinga
ef2e845497 Adam Strzelecki to SDL
D3D renderer shall try mapping YV12 and I420 (IYUV) to D3D texture formats via FOURCC. This will enable HW acceleration for those formats when driver is capable (most of them are). Note that SDL's IYUV maps I420 FOURCC on Woe.
2009-11-27 03:11:26 +00:00
Sam Lantinga
c0587b4d69 Adam Strzelecki to SDL
Currently SDL uses GL_RGB for internalFormat when GL_YCBCR_MESA is passed as format for glTextImage2D when using Linux Mesa's OpenGL. However this is wrong and makes glTextImage2D fail with invalid argument error. GL_YCBCR_MESA should be also internalFormat (not GL_RGB) there and this is what can be found googling various source codes using GL_YCBCR_MESA.
2009-11-26 05:55:57 +00:00
Sam Lantinga
3f0a66d3ef Add error messages for failure cases 2009-11-25 06:00:00 +00:00
Mike Gorchak
b74b046318 Override renderer for OpenGL window, only in case if OpenGL or OpenGL ES renderers are enabled. 2009-11-24 19:28:27 +00:00
Sam Lantinga
9f88d7348e Fixed bug #771
Cleaned up the code a bit and made sure that an OpenGL window gets the OpenGL
renderer.  Inspired by a patch from Mason Wheeler.
2009-11-24 16:43:18 +00:00
Sam Lantinga
9943aa0b1b Eric Wing to Sam, hfutrell
This one is quite puzzling. I found a partial workaround, but I don't fully understand the reasons yet.

First, the console is complaining about not finding a nib for MainWindow.
I tried removing the entry for this in the info.plist, and the message went away, but it didn't really change anything.

Second, I stepped through this with the debugger and broke up some lines. It seems that the basic act of calling
       view = [SDL_uikitopenglview alloc];

or even
       view = [SDL_uikitview alloc]

will crash the program. The debugger messages plus the stack trace make me think it's not finding the SDL_uikitview classes for some reason. But I don't understand why this would be.

view = [UIView alloc] will not crash the program.

For kicks, I added a new definition of a class called SDL_object which subclasses NSObject in the same files as SDL_uikitopenglview and then call
       view = [SDL_object alloc];

This does not crash the program.

So, then I modified SDL_object to subclass UIView. No crash.

Next, I made SDL_object subclass UIView<UITextFieldDelegate> . This crashes.

So it is the act of conforming to the UITextFieldDelegate protocol that is crashing things.

I don't understand why it would crash on alloc though. I'm guessing either a delegate needs to be set somewhere or one of the required methods needs to be implemented. But in the former case, I would not expect a crash, but a silent message to nil and something else doesn't work. And in the latter case, I would expect a compiler warning and an exception thrown instead of a crash.

Anyway, my temporary workaround is to change the interface declaration for SDL_uikitview to look like:

#if SDL_IPHONE_KEYBOARD
@interface SDL_uikitview : UIView<UITextFieldDelegate> {
#else
@interface SDL_uikitview : UIView {
#endif

And then disable the keyboard support in the SDL_config_iphoneos.h file.
/* enable iPhone keyboard support */
#define SDL_IPHONE_KEYBOARD 0


-Eric

On Nov 23, 2009, at 1:43 AM, Sam Lantinga wrote:

> I ran into a blocking startup crash with the Happy demo on iPhone OS 3.1.2 on my new iPhone:
>
> #0    0x323fea14 in _class_isInitialized
> #1    0x323fea68 in _class_initialize
> #2    0x32403e92 in prepareForMethodLookup
> #3    0x32401244 in lookUpMethod
> #4    0x323fea10 in _class_lookupMethodAndLoadCache
> #5    0x323fe746 in objc_msgSend_uncached
> #6    0x323feb26 in _class_initialize
> #7    0x323fea58 in _class_initialize
> #8    0x32403e92 in prepareForMethodLookup
> #9    0x32401244 in lookUpMethod
> #10   0x323fea10 in _class_lookupMethodAndLoadCache
> #11   0x323fe746 in objc_msgSend_uncached
> #12   0x000554dc in UIKit_GL_CreateContext at SDL_uikitopengles.m:103
> #13   0x0004f89e in SDL_GL_CreateContext at SDL_video.c:3155
> #14   0x000579e8 in GLES_CreateRenderer at SDL_renderer_gles.c:282
> #15   0x0004d7b8 in SDL_CreateRenderer at SDL_video.c:1509
> #16   0x00002bc2 in SDL_main at happy.c:156
> #17   0x000571b2 in -[SDLUIKitDelegate postFinishLaunch] at
> SDL_uikitappdelegate.m:77
> #18   0x313f9ef2 in __NSFireDelayedPerform
> #19   0x32567bb2 in CFRunLoopRunSpecific
> #20   0x3256735c in CFRunLoopRunInMode
> #21   0x32912cbe in GSEventRunModal
> #22   0x32912d6a in GSEventRun
> #23   0x32b6276e in -[UIApplication _run]
> #24   0x32b61472 in UIApplicationMain
> #25   0x00057088 in main at SDL_uikitappdelegate.m:50
>
> Any ideas?
>
> See ya!
> --
>       -Sam Lantinga, Founder and President, Galaxy Gameworks LLC
2009-11-24 08:12:32 +00:00
Sam Lantinga
07d9b53f03 Fixed bug #891
Mason Wheeler      2009-11-23 06:59:48 PST

There's code in SDL_RecreateWindow specifically to handle SDL_WINDOW_FOREIGN,
but it appears to have been overlooked in the allowed_flags constant.  This
causes the line

    window->flags = (flags & allowed_flags);

to strip SDL_WINDOW_FOREIGN from the window's flags, which breaks some code in
WIN_WindowProc in SDL_win32Events.c that treats foreign windows differently.
This can be trivially fixed by defining allowed_flags as

    const Uint32 allowed_flags = (SDL_WINDOW_FULLSCREEN |
                                  SDL_WINDOW_OPENGL |
                                  SDL_WINDOW_BORDERLESS |
                                  SDL_WINDOW_RESIZABLE |
                                  SDL_WINDOW_INPUT_GRABBED |
                                  SDL_WINDOW_FOREIGN);
2009-11-24 04:59:50 +00:00
Sam Lantinga
b7dc66d719 Mason Wheeler to sdl
I updated SDL, and suddenly my SDL frames stopped working.  They'd "initialize" full of gibberish, and I couldn't render anything to them.  After a bit of digging, I found a problem: the renderer initialization routine in my SDL frame code wasn't getting called anymore.

procedure TSdlFrame.Paint;
begin
   if SDL_SelectRenderer(FWindowID) = -1 then
      CreateRenderer;
   SDL_RenderPresent;
end;

function TSdlFrame.CreateRenderer: boolean;
const
   pf: tagPIXELFORMATDESCRIPTOR = (nSize: sizeof(pf); nVersion: 1;
       dwFlags: PFD_DRAW_TO_WINDOW or PFD_SUPPORT_OPENGL or PFD_DOUBLEBUFFER;
       iPixelType: PFD_TYPE_RGBA; cColorBits: 24; cAlphaBits: 8;
       iLayerType: PFD_MAIN_PLANE);

   RENDERERS: array[TRendererType] of AnsiString = ('software', 'gdi', 'opengl', 'd3d');
var
  pFormat: integer;
begin
   if (SDL_SelectRenderer(FWindowID) = 0) then
   begin
      result := true;
      Exit;
   end;
   if FRendererType = rtOpenGL then
   begin
      pFormat := ChoosePixelFormat(canvas.Handle, @pf);
      if not SetPixelFormat(canvas.Handle, pFormat, @pf) then
         outputDebugString(PChar(SysErrorMessage(GetLastError)));
      if wglCreateContext(canvas.Handle) = 0 then
         outputDebugString(PChar(SysErrorMessage(GetLastError)));
   end;
   if (SDL_CreateRenderer(FWindowID, SDL_RendererIndex(RENDERERS[FRendererType]), [sdlrPresentFlip3, sdlrAccelerated]) = 0) then
   begin
      SDL_ShowWindow(FWindowID);
      assert(SDL_SetRenderDrawColor(0, 0, 0, 255) = 0);
      FFlags := SDL_GetWindowFlags(FWindowID);
      if assigned(FOnAvailable) then
         FOnAvailable(self);
   end
   else outputDebugString(pChar(format('SDL_CreateRenderer failed: %s', [sdl_GetError])));
   result := SDL_SelectRenderer(FWindowID) = 0;
end;

This is a critical issue.  The Paint method gets called when the control receives a WM_PAINT message from Windows.  I can't create the renderer before then, or it will fail and cause trouble.  And when I do create it, it needs to be created with certain parameters.  So imagine my surprise when I started debugging into the DLL and found that SDL_SelectRenderer was trying to be "helpful" by creating the renderer for me if it didn't already exist!  Now not only does my initialization code not get called, I end up with the wrong renderer and so things don't render as expected when I try to use the window.
2009-11-24 04:48:12 +00:00
Sam Lantinga
1b236a4901 Set the error so someone can get more information 2009-11-22 20:53:53 +00:00
Sam Lantinga
8c5da01bc8 The Direct3D Read/Write pixels interface is in progress. 2009-11-22 06:37:43 +00:00
Sam Lantinga
9fd8542b46 Whoops, actually set the SDL error, don't just print the error. 2009-11-22 06:34:45 +00:00
Sam Lantinga
24d9e6a497 Added comment for pixel-perfect line workaround. 2009-11-21 07:26:52 +00:00
Sam Lantinga
dd6317ef08 Of COURSE that trick wouldn't work on all renderers. Fall back to something for now, hopefully figure out a better way to do this later.
If we have to, we can use vertical line and horizontal line textures for vertical and horizontal lines, and then create custom textures for diagonal lines and software render those.  It's terrible, but at least it would be pixel perfect.
2009-11-21 07:22:59 +00:00
Sam Lantinga
cda15a93c7 This is terrible, but the OpenGL standard says that lines are half open, which means that one endpoint is not covered so adjoining lines don't overlap. It also doesn't define which end is open, and indeed Mac OS X and Linux differ. Mac OS X seems to leave the second endpoint open, but Linux uses the right-most endpoint for x major lines and the bottom-most endpoint for y major lines. 2009-11-21 07:14:21 +00:00
Sam Lantinga
4cbe158f13 Fixed the coordinates for pixel coverage in blits 2009-11-21 06:34:43 +00:00
Sam Lantinga
d0c931c89a It's not the last pixel, it's the rightmost pixel, or if they're both the same x coordinate, the bottommost pixel. 2009-11-21 06:19:34 +00:00
Mike Gorchak
f351b80476 RenderReadPixels and RenderWritePixels functions work with back buffer now and all asynchronous operations are flushed before reading or writing to backbuffer. Thanks Sam for clarification of this. 2009-11-21 06:17:50 +00:00
Sam Lantinga
58effb88d3 My first OpenGL shader! Momma will be so proud!
This shader implements the software renderer mask semantics where the source pixel is multiplied by the color and alpha modulation values and then any pixel with non-zero alpha is fully opaque.

The OpenGL renderer on Mac OS X now passes all the automated render tests! :)
2009-11-21 05:29:31 +00:00
Mike Gorchak
744dfa75a8 Support for UTF-8 text input has been added. 2009-11-20 14:42:40 +00:00
Mike Gorchak
516d648ebd RenderReadPixels and RenderWritePixels now work properly. 2009-11-20 07:07:41 +00:00
Mike Gorchak
ada6df0ab1 Deinitialization fixes, in case if QNXGF driver is not initialized properly. 2009-11-20 07:06:50 +00:00
Mike Gorchak
00648d42b4 Support for RendererReadPixels and RendererWritePixels has been added to photon renderer. 2009-11-19 08:44:07 +00:00
Sam Lantinga
e665ed1ee6 Mike Gorchak to Sam
Hello Sam!

You have reverted back my patches for OpenGL renderer :)

To reproduce an issue, compare graphics output while running these tests:

testdraw2 --renderer opengl --blend mask --cyclealpha
and
testdraw2 --renderer software --blend mask --cyclealpha

You will see, that software renderer output is different from opengl renderer output.

Thanks!
2009-11-19 08:02:00 +00:00
Sam Lantinga
287d2b84fc Found a way to implement mask semantics in OpenGL 2009-11-19 05:33:41 +00:00
Sam Lantinga
abb42ffd01 Include the endpoint in the line we're drawing 2009-11-19 04:59:19 +00:00
Sam Lantinga
36c5366455 Adjust the vertices to be over the texel center. 2009-11-19 04:33:35 +00:00
Sam Lantinga
3e539ff849 Implemented SDL_RenderReadPixels()/SDL_RenderWritePixels() for the dummy renderer.
This is helpful to validate the automated test suite, since this renderer is super simple and should always pass tests.
2009-11-18 09:20:01 +00:00
Sam Lantinga
9cc7fc361e Don't add the OpenGL renderers for drivers that don't support OpenGL 2009-11-18 09:17:29 +00:00
Sam Lantinga
46db19c1fd If we explicitly request a driver, try to initialize it. 2009-11-18 08:54:13 +00:00
Sam Lantinga
9cc81118d2 Fixed GL_RenderReadPixels() - thanks Ryan! 2009-11-18 08:07:37 +00:00
Sam Lantinga
a9553c1c3d First pass (untested) at RenderWritePixels() 2009-11-18 07:35:00 +00:00
Sam Lantinga
ae3824a9bf Trying to figure out why the OpenGL tests are failing... 2009-11-18 06:15:44 +00:00
Sam Lantinga
e306484919 Added missing return values 2009-11-17 06:50:29 +00:00
Sam Lantinga
cd1a4a74e5 Scott to slouken
Heres the wiz patch and additional files. (I think I got everything)
2009-11-17 04:53:15 +00:00
Sam Lantinga
e024bcf596 Thank you automated tests (and bobbens!), fixed alpha blending for accuracy 2009-11-16 09:47:34 +00:00
Sam Lantinga
0b1a37f8ba Fixed memory corruption in SW_RenderReadPixels() 2009-11-16 07:39:08 +00:00
Sam Lantinga
7a40c23469 You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
This code still doesn't quite work yet. :)
2009-11-16 07:13:07 +00:00
Sam Lantinga
c12a32c64b Added a utility function to convert blocks of pixels 2009-11-15 09:21:46 +00:00
Sam Lantinga
08efca1a63 Hmm, this isn't going to work, is it? 2009-11-15 08:01:34 +00:00
Sam Lantinga
06a7514a17 Work in progress on OpenGL ReadPixels/WritePixels interface 2009-11-15 04:58:03 +00:00
Sam Lantinga
b6a95db8fa Updated for the new pixel format structure 2009-11-11 06:34:33 +00:00
Sam Lantinga
cb3902eb6c Work in progress on implementation of SDL_RenderReadPixels() and SDL_RenderWritePixels(), code untested. 2009-11-09 05:20:11 +00:00
Sam Lantinga
30a9c47830 Fixed compile warning 2009-11-08 04:21:59 +00:00
Sam Lantinga
bc71d2180a Skip renderers that fail to initialize 2009-11-08 04:16:42 +00:00
Sam Lantinga
151ef99620 Fixed bug #847
Roger Willcocks      2009-10-25 08:45:37 PDT

appDidFinishLaunching is triggered before all the setup's complete. The easiest
fix is to arrange for another event to be sent when it's really ready, and run
SDL_main from there. Ref.
http://blog.rightsprite.com/2008/11/iphone-applicationdidfinishlaunching.html

SDL-1.3.0-4563/src/video/uikit/SDL_uikitappdelegate.m:



- (void)postFinishLaunch {

    /* run the user's application, passing argc and argv */
    int exit_status = SDL_main(forward_argc, forward_argv);

    /* free the memory we used to hold copies of argc and argv */
    int i;
    for (i=0; i<forward_argc; i++) {
        free(forward_argv[i]);
    }
    free(forward_argv);

    /* exit, passing the return status from the user's application */
    exit(exit_status);

}

- (void)applicationDidFinishLaunching:(UIApplication *)application {

    /* Set working directory to resource path */
    [[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle
mainBundle] resourcePath]];

    [self performSelector:@selector(postFinishLaunch) withObject:nil
afterDelay:0.0];
2009-11-02 07:55:42 +00:00
Sam Lantinga
481ee1bb45 cpuid doesn't actually change the flags register 2009-10-30 05:02:47 +00:00
Sam Lantinga
57ae4fced1 Fixed bug #734
Save and restore the PIC register %ebx/%rbx using push/pop instead of %edi/%rdi
2009-10-30 04:45:01 +00:00
Mike Gorchak
c39891d34a Cursor hotspot fixes. 2009-10-29 09:20:50 +00:00
Sam Lantinga
bce225654d Automatically initialize the video system and create a renderer to simplify use. 2009-10-28 06:04:07 +00:00
Sam Lantinga
6c68a855a6 Adam Strzelecki to SDL
I think something is wrong (look at the fix patch below):
(1) NSRect rect shouldn't be initialized with contentRectForFrameRect: at the top of the function, contentRectForFrameRect is called in non-fullscreen case anyway (1st @@)
(2) I think you've left two lines that should be removed completely (2nd @@)
2009-10-23 04:08:32 +00:00
Sam Lantinga
b9c67c1d25 Adam Strzelecki to SDL
When using deployment in Xcode we use 10.4 SDK for PPC & i386 and 10.6 SDK for x86_64 unfortunately MAC_OS_X_VERSION_10_6 is defined only in 10.6 SDK, in older SDKs it is undefined which makes >= comparison return always TRUTH, so the GCC complains about undefined <NSWindowDelegate>, even if the original intention was to omit <NSWindowDelegate> on older SDKs.

Solution, don't relay on MAC_OS_X_VERSION_10_6 but use OSX revision number 1060 directly as SDL does in many other places.
2009-10-23 03:58:23 +00:00
Mike Gorchak
a53104f750 Fixes in GLES configuration selection. 2009-10-22 06:09:03 +00:00
Mike Gorchak
abdd5571be Fixes in GLES configuration selection. Support for an old QNX 6.3.2. 2009-10-22 06:08:36 +00:00
Sam Lantinga
b5ca42e880 Adam Strzelecki to SDL
Sending a patch for fullscreen Mac OS X SDL 1.3 (SVN) Cocoa mouse position handling. In fullscreen mouse coordinates should be relative to SCREEN not to the window, which doesn't really occupy fullscreen.
Without this patch mouse position (especially Y) was totally incorrect (shifted) in fullscreen.
2009-10-22 04:46:11 +00:00
Sam Lantinga
8ea99c7b4e There's a bug with gcc 4.4.1 and -O2 where srcp doesn't get the correct value after the first scanline. Ugh. 2009-10-18 23:21:15 +00:00
Sam Lantinga
890a3b9f25 Merged improvements to SDL_SoftStretch() from SDL 1.2 2009-10-18 17:49:40 +00:00
Sam Lantinga
baf302ec39 Fixed bug #853
Ludwig Nussel      2009-10-18 05:34:18 PDT

src/joystick/linux/SDL_sysjoystick.c has some problems:

- test_bit() might break with strict aliasing
- test_bit() assumes array is Uint32 but its actually "unsigned long"
  on 64bit systems sizeof(long) != sizeof(Uint32).
- the keybit array is too small
- the arrays are unitialized so the number of
  detected buttons is quite random
2009-10-18 16:14:35 +00:00
Sam Lantinga
0874c3ae84 iPhone interruption patch / SDL 1.3
Eric Wing to Sam

I've been sitting on this too long. I need to push.
It's untested because of the unrelated crashing bug I've been experiencing.
Also have a fix for SIZEOF_VOIDP in the config for both iPhone and Mac.
2009-10-17 07:36:45 +00:00
Mike Gorchak
5d837d169e Working on fullscreen video modes support 2009-10-13 20:17:11 +00:00
Mike Gorchak
b098c35b96 All 2D operations in Photon driver have been finished. The driver is ready to use. There fullscreen modes and YUV textures are rest only. 2009-10-13 11:26:40 +00:00
Mike Gorchak
8d81134bc6 Fixed SDL_BLENDMODE_MASK for GL and GLES renderers, now blending works like in software renderer. 2009-10-13 06:51:20 +00:00
Mike Gorchak
04dc33353c Fixed OpenGL ES primitive alpha blending. 2009-10-13 06:28:31 +00:00
Mike Gorchak
8554a00051 Initial support for fullscreen application modes. 2009-10-12 19:47:01 +00:00
Mike Gorchak
6bf136c551 Photon SDL renderer almost finished, the double/tripple buffering is left only. 2009-10-12 11:45:01 +00:00
Sam Lantinga
46d753c1c0 Joystick patch from FreeBSD ports system 2009-10-12 09:42:50 +00:00
Mike Gorchak
efaf0e3ff1 Continue working on 2D support in Photon. 2009-10-12 08:21:43 +00:00
Mike Gorchak
db200ea8ad Continue working on 2D support in Photon 2009-10-11 18:45:39 +00:00
Mike Gorchak
45dab6140e Continue working on 2D support for Photon/QNX. 2009-10-10 20:15:20 +00:00
Sam Lantinga
44e7c1bd41 Debian patch: 218_joystick_memmove.diff 2009-10-10 10:02:17 +00:00
Sam Lantinga
f694f1de5e Whoops, FreeBSD 6.2 doesn't define __FreeBSD_kernel_version 2009-10-10 09:44:04 +00:00
Sam Lantinga
73b823bca8 Adapted from Debian patch: 215_kfreebsd_gnu.diff 2009-10-10 09:36:12 +00:00
Mike Gorchak
61a236b4a6 Support for the atomic operations for ARM, PPC, MIPS, SH, X86 platforms has been added. 2009-10-10 08:06:18 +00:00
Sam Lantinga
447cbc2563 Fixed bug #627
Increased accuracy of alpha blend calculation
2009-10-10 07:48:57 +00:00
Ryan C. Gordon
3842b74b75 Merged r4990:4991 from branches/SDL-1.2: ALSA 1.0 API and dlvsym() removal. 2009-10-10 07:34:15 +00:00
Sam Lantinga
f81eec596a typo 2009-10-10 06:51:42 +00:00
Sam Lantinga
a12027a028 Fixed bug #814
Daniele Forghieri      2009-09-30 15:40:53 PDT

To compile the source in libm the variable huge must be renamed, I choose
huge_val

The patch attached change it so it compiles
2009-10-04 09:51:04 +00:00
Sam Lantinga
c75e149ac8 Fixed a bug where when the audio starts paused all the DirectSound buffers
will end up getting locked and never unlocked and sound will never play.

Added a FIXME for Ryan to look at, too. :)
2009-10-04 09:18:48 +00:00
Sam Lantinga
f272e1dd85 Adam Strzelecki to SDL
Since current DirectFB implementation is incomplete for YUV surfaces (actually causes segmentation faults when trying Lock and use YUV planar textures) I decided to fix it a bit.
Here's a patch that should make DirectFB properly support YUV both packed and planar (3 planes).

(1) Removed SDL_BYTESPERPIXEL at all in favor of DFB_BYTES_PER_PIXEL(SDLToDFBPixelFormat(fmt)) which does return always proper BPP for YUVs too, coz SDL_BYTESPERPIXEL returns incorrect values for FOURCCs
(2) Fixed data->pixels allocation for planar YUVs in CreateTexture, it should allocate 150% more space
(3) Copy other planes for planar YUVs in UpdateTexture
(4) Moved checking if format is supported at all with DirectFB on CreateTexture at the beginning of the code

Waiting for comments,
--
Adam Strzelecki | nanoant.com
2009-10-04 04:03:37 +00:00
Sam Lantinga
63382d1cee [SDL] Bad math in SDL_RenderCopy
Mason Wheeler to sdl

When I tried to render an image using something other than NULL for srcrect, it got horribly distorted.  I traced it down to the fact that the math in the rectangle adjustments performed just before the call to renderer->RenderCopy is written inside out.  It should look like this:

       if (dstrect->w != real_dstrect.w) {
           int deltax = (dstrect->x - real_dstrect.x);
           int deltaw = (dstrect->w - real_dstrect.w);
           real_srcrect.x += (deltax * real_srcrect.w) / dstrect->w;
           real_srcrect.w += (deltaw * real_srcrect.w) / dstrect->w;
       }
       if (dstrect->h != real_dstrect.h) {
           int deltay = (dstrect->y - real_dstrect.y);
           int deltah = (dstrect->h - real_dstrect.h);
           real_srcrect.y += (deltay * real_srcrect.h) / dstrect->h;
           real_srcrect.h += (deltah * real_srcrect.h) / dstrect->h;
2009-10-03 16:23:16 +00:00
Sam Lantinga
676f56294f Temporary band-aid for bug #575
It looks like newer kernels do the logical device mapping in the driver,
so this code crashes.  I don't have one of these nor do I have remote
access to debug this, so I'm disabling the logical mapping for now.
2009-09-29 00:42:21 +00:00
Sam Lantinga
8532c67014 -0.5 is causing trouble according to comments in bug #783 2009-09-28 15:32:58 +00:00
Sam Lantinga
2415433b1c Fixed bug #716
Armin Burgmeier      2009-03-15 04:35:45 PDT

When I hold a mouse button down on another (non-SDL) window, then move the
mouse over an SDL window and releasing the mouse button there, then the
application does not receive an SDL_ACTIVEEVENT with state SDL_APPMOUSEFOCUS
and gain 1.

Furthermore, SDL_GetAppState() reports the application not having mouse focus
until moving the mouse out of the window and back in again.
2009-09-27 23:24:58 +00:00
Sam Lantinga
f8c7e7df22 Fixed 32-bit build 2009-09-26 21:39:56 +00:00
Sam Lantinga
9134eb02ab Fixed bug #797
Ryan C. Gordon      2009-09-19 08:25:21 PDT

This line in SDL_iconv_string (src/stdlib/SDL_iconv.c) ...

        if (!fromcode || !*fromcode) {
            tocode = "UTF-8";
        }

Is probably supposed to assign to "fromcode" and not "tocode".
2009-09-26 10:36:55 +00:00
Sam Lantinga
bd908a682f Fixed bug #777
Implemented SDL_GetPlatform()
2009-09-26 10:32:14 +00:00
Sam Lantinga
497088d257 Fixed bug #766
Mason Wheeler      2009-07-06 14:29:47 PDT

This adds some missing error reporting for SDL_SelectRenderer, and cleans up the logic a little bit.
2009-09-26 10:22:35 +00:00
Sam Lantinga
9b2bca8c06 Fixed bug #765
Added SDL_SetError case for SDL_UNSUPPORTED
2009-09-26 10:19:19 +00:00
Sam Lantinga
d9b39c9a69 Fixed bug #764
Added better error checking from Mason Wheeler
2009-09-26 10:17:49 +00:00
Sam Lantinga
38c3f80d5f Fixed bug #761
Mason Wheeler      2009-07-05 09:28:33 PDT

This patch fixes two issues with SDL_CreateTextureFromSurface.

1.  If no renderer is available, the function will return 0 without calling
SDL_SetError. (It does this in other places as well, but it appears that in
these cases, SDL_SetError was already called by a previous function call.)
2.  Removal of a dead code block that checks for an impossible return value.
2009-09-26 10:13:44 +00:00
Sam Lantinga
8c5ed7b905 Fixed bug #734
Nicholas Phillips      2009-04-26 21:34:05 PDT

I am using x64 Linux (using Intel Core 2 DUO), and I have noticed that there is
an error in SDL_cpuinfo.c, function CPU_getCPUIDFeaturesExt for my platform.
2009-09-26 10:04:38 +00:00
Sam Lantinga
453bd99553 Fixed crash with right side up BMP files 2009-09-26 06:21:36 +00:00
Bob Pendleton
f84f69d047 fixed a spelling error in the documentation. 2009-09-25 19:26:21 +00:00
Bob Pendleton
7a2031a379 This version actaully should work on Windows. 2009-09-25 19:17:16 +00:00
Sam Lantinga
1764e75bcc Possibly fixed bug #601, definitely fixed a potential issue with threads
stopping and starting in rapid succession.
2009-09-23 06:37:27 +00:00
Bob Pendleton
10e2dbb79d oops 2009-09-21 22:25:14 +00:00
Bob Pendleton
ccf0c93d64 Should now compile on 32 bit linux and 64 bit linux 2009-09-21 22:23:41 +00:00
Sam Lantinga
6215039632 Fixed bug #570
SDL_SemWaitTimeout in src/thread/generic/SDL_syssem.c line 179 (SVN trunk):

--sem->count;

should be

if (retval == 0) {
    --sem->count;
}

Without this, sem->count will underflow on timeout effectively breaking the
semaphore. It appears that the implementation has been wrong since the initial
revision.
2009-09-21 07:35:06 +00:00
Sam Lantinga
7b286700e7 Fixed build on Mac OS X 10.4 2009-09-21 05:24:54 +00:00
Sam Lantinga
2bf654253f Fixed compatibility with SDL 1.2 pixel format (24 bits per pixel of color data with 4 bytes per pixel == 32 bpp) 2009-09-20 22:47:28 +00:00
Sam Lantinga
2d97efbd4d Removed outdated Atari support 2009-09-20 04:15:19 +00:00
Sam Lantinga
95c8f7a517 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009 2009-09-19 13:29:40 +00:00
Sam Lantinga
ecd63ace78 I think this fixes the texture pixel alignment 2009-09-19 12:48:52 +00:00
Sam Lantinga
78130bd9c4 Removed outdated VGL support 2009-09-19 07:30:29 +00:00
Sam Lantinga
17fbad0010 Removed outdated wscons support 2009-09-19 07:28:59 +00:00
Sam Lantinga
cf54df8c3e Removed outdated Nano-X support 2009-09-19 07:26:51 +00:00
Sam Lantinga
fe586cb3f9 Removed outdated OS/2 support 2009-09-19 07:22:07 +00:00
Sam Lantinga
6bb854b1d4 Removed outdated Dreamcast support 2009-09-19 07:21:22 +00:00
Sam Lantinga
5bee043a89 Removed outdated OS/2 support 2009-09-19 06:43:45 +00:00
Sam Lantinga
e4cbb96720 Removed outdated iPodLinux support 2009-09-19 06:24:07 +00:00
Sam Lantinga
cd1e07e762 testsprite2 should be pixel correct on Direct3D now. 2009-09-19 05:47:54 +00:00
Sam Lantinga
1ef102a99f Fixed bug #783
Fixed coordinate positioning with OpenGL renderer, and added a test case
2009-09-19 05:12:26 +00:00
Sam Lantinga
24e92089ad Stefan Ullinger
Hi,

so here we go: GL_LINE_SMOOTH bad for business! ;)

I checked the code within SDL_renderer_gl.c / GL_CreateRenderer(..)
and have found the reason for blurred lines when using OpenGL.
I have attached 2 images here.
I don't know whether this has to be changed and I don't know if there
is an option to turn it off/on...just wanted to say that with GL_LINE_SMOOTH
enabled there is a difference when rendering with opengl compared to directx.
2009-09-19 04:43:41 +00:00
Bob Pendleton
9861510378 The new, cleaner, version of the atomic operations. The dummy code is what you should start working with to port atomic ops.
The linux code appears to be complete and *should* be the base of all Unix and GCC based versions. The macosx and win32 versions
are currently just copies of the dummy code. I will begin working on the windows version as soon as this check in is done. I
need someone to work on the Mac OS X version.

I'm afraid that this check in will break QNX (Sorry!)
2009-09-17 20:35:12 +00:00
Sam Lantinga
8bc4d1a94e Kenneth Bull to SDL
I noticed in trunk/SDL/src/video/win32/SDL_win32events.c, in this code here...

... if the device handle isn't found in mice[], which it won't be if
the mouse was plugged in after SDL_Init, then you end up with an
uninitialized value in index, which is then passed to various
SDL_SendMouse* functions.
2009-09-07 16:04:44 +00:00
Sam Lantinga
30ebf925f0 Merged Edgar's code changes from Google Summer of Code 2009 2009-09-07 05:06:34 +00:00
Sam Lantinga
36d2461292 Merged Martin's code changes from Google Summer of Code 2009 2009-09-07 04:51:29 +00:00
Sam Lantinga
eb0575b20a Fixed bug where minimized windows get zero width/height 2009-09-06 15:04:38 +00:00
Sam Lantinga
b6ec478790 Fixed compiling on 64-bit Windows 2009-09-06 04:40:54 +00:00
Sam Lantinga
b856e71f8d Fixed issues building 64-bit Windows binary 2009-09-05 23:37:35 +00:00
Sam Lantinga
76d691c292 Added 64-bit architectures to the fat build script 2009-09-05 10:39:18 +00:00
Sam Lantinga
ed3c5aa525 From: Jjgod Jiang <gzjjgod@gmail.com>
Date: Sat, 5 Sep 2009 17:32:28 +0800

Replace old Keyboard Layout APIs with new Text Input Sources APIs for 10.{5,6}
2009-09-05 09:55:25 +00:00
Sam Lantinga
154e3b6ca9 From: Jjgod Jiang <gzjjgod@gmail.com>
Date: Sat, 5 Sep 2009 17:27:07 +0800

Disable NSScreen setFrame: hack in 10.6 since it no longer work
2009-09-05 09:54:45 +00:00
Sam Lantinga
2a96e84434 CD-ROM support is so passé :) 2009-09-05 09:11:03 +00:00
Sam Lantinga
33472500be Bye bye SoundManager, you are officially obsolete... 2009-09-05 09:03:35 +00:00
Sam Lantinga
2105c37ec0 Fixed a few issues compiling with Mac OS X 10.6
Unfortunately the audio and cdrom systems do not build at all, and if you
disable those, SDL still fails to link with these errors:

Undefined symbols:
  "_OBJC_IVAR_$_NSScreen._frame", referenced from:
      -[NSScreen(NSScreenAccess) setFrame:] in SDL_cocoamodes.o
  "_KLGetKeyboardLayoutProperty", referenced from:
      _UpdateKeymap in SDL_cocoakeyboard.o
      _UpdateKeymap in SDL_cocoakeyboard.o
  "_KLGetCurrentKeyboardLayout", referenced from:
      _UpdateKeymap in SDL_cocoakeyboard.o
ld: symbol(s) not found
2009-09-05 07:33:54 +00:00
Sam Lantinga
2716046197 Fix suggested by Bob 2009-08-20 04:40:02 +00:00
Sam Lantinga
63ef94fcf3 David Carre to Sam
When i call the "SDL_Quit()" function, it call the func "SDL_QuitSubSystem(SDL_INIT_EVERYTHING)", which call the "SDL_VideoQuit()" function.

It's where i'm lost, this function "SDL_VideoQuit()" will recall the "SDL_Quit()" function (i don't find where it is called), which in turn recall the "SDL_QuitSubSystem(SDL_INIT_EVERYTHING)", which in turn recall "SDL_VideoQuit()", which cause a "double free" seg fault since it has been already called.

I have set the num_displays to 0 instead of 1, so it wont free it twice in the videoquit function loop.
2009-08-18 03:26:53 +00:00
Bob Pendleton
e80feea87f I forgot to copy the dummy version to macosx. 2009-08-11 21:15:18 +00:00
Sam Lantinga
91f3686c2e David Carre to Sam
Hello sam, me again.

I'v fixed another bug in the pandora code, it's on the no-X videodriver, i forgot to add some code to destroy the window so it was impossible to reload SDL inside the same application (eglTerminate).

You'll find the svn diff attached.

See you,
David.
2009-08-11 13:45:01 +00:00
Edgar Simo
2ca41a8224 Patch by Janosch Gräf <janosch.graef@gmx.net>
I just noticed that there are rarely error messages and added some.
2009-08-05 16:31:49 +00:00
Couriersud
df5d56827d Fixed compiling SDL_fsaudio.c against fusionsound 1.0.0 2009-08-03 18:07:31 +00:00
Sam Lantinga
fe959d8e24 Fixed type size for test_bit() 2009-08-02 20:45:11 +00:00
Sam Lantinga
b457fdca75 Removed arbitrary window size limitation 2009-08-02 14:27:48 +00:00
Sam Lantinga
8b87364708 Patch from David Carre:
I fixed a bug in the "SDL_DestroyRenderer()" function in the pandora x11 renderer (in fact the bug was in the "X11_GLES_MakeCurrent()" function) that was causing a crash when exiting SDL.

There was a problem while terminating the x11 egl window, that was preventing to quit/close SDL/SDL-window then reload SDL/SDL-window inside the same application.
2009-07-30 14:53:57 +00:00
Mike Gorchak
84f82b23eb Support for native and emulated atomic operations has been added. 2009-07-19 08:04:59 +00:00
Bob Pendleton
a71b57e1f0 volitile... duh, yeah the variable need to be labeled volitile 2009-07-09 21:31:27 +00:00
Bob Pendleton
1bf9cab1ff This is a cosmetic fix, I found a stupid typo 2009-07-02 21:47:02 +00:00
Ryan C. Gordon
1cb422c52f Moved hardcoding of "/proc/apm" elsewhere. 2009-06-30 06:27:08 +00:00
Ryan C. Gordon
1d704b5829 Linux /proc/apm: handle hex and decimal (and octal!) values. 2009-06-30 06:26:02 +00:00
Ryan C. Gordon
f9b58538d9 Linux /proc/acpi: check for ac_adapter states, other cleanup.
Still not tested, though!
2009-06-30 05:44:00 +00:00
Ryan C. Gordon
89521cccdb Removed stub for Linux /sys/power processing.
Apparently /sys/power doesn't expose battery information at this time.
2009-06-30 05:27:11 +00:00
Ryan C. Gordon
9a2c54efec Power: First shot at Linux /proc/acpi/battery support.
Untested, not even tried to compile yet.
2009-06-30 03:50:30 +00:00
Bob Pendleton
e53cd95852 I've made so many changes I don't dare continue until I check the current stuff in.
/test/testatomic.c performs absolutely basic tests to show that the function work as expected. Need a second test to do more detailed tests.

/include/SDL_atomic.h provides declarations for all included functions.

/src/atomic/linux/SDL_atomic.c provided all the functions. On a generic built the 64 bit functions work, but they are emulated. On a build for -march=pentium and above the 64 bit functions use native instructions
/src/atomic/dummy/SDL_atomic.c emulates all the operations using SDL_mutex.h.
/src/atomic/win32/SDL_atomic.c is a copy of dummy
/src/atomic/macosx/SDL_atomic.s is a copy of dummy

These versions of SDL_atomic.c provide a frame work for building the library with a mixture of native and emulated functions. This allows the whole library to be provided on all platforms. (I hope.)
I hope this fits with the SDL philosophy of either providing a common subset or emulating when the platform is missing a feature.

I have not added dummy, macosx, or win32 to the build. They are there as place holders for future work.

I have modified congifure.in to compile sources in /src/atomic/linux. (The SDL configure.in file is an amazing piece of work and I hope I didn't mess it up. :-)
2009-06-29 19:54:43 +00:00
Bob Pendleton
9302a68559 Disabling 64 bit atomics operations until I figure out why they do not link. 2009-06-24 22:24:23 +00:00
Bob Pendleton
c0646fda71 First draft of atomic operations code for GCC and linux. 2009-06-24 20:20:57 +00:00
Bob Pendleton
0b5bc4d23b This check in updates SDL_atomic.h to reflect the new set of atomic operations in 32 and 64 bit form.
It also update configure.in to compile the linux version of the library. The three versions are all dummies
implementations that do nothing. They are being checked in as place holders. Mostly, I just wanted to get
place holders and the configure.in checked in.
2009-06-24 20:04:08 +00:00
Sam Lantinga
d62da4b117 Alexei Tereschenko
Why not to use hardware vertex processing instead of software one if
it is available in D3D render driver? With hardware processing
testsprite2 runs three times faster on all videocards which I could
test.
2009-06-16 14:34:15 +00:00
Sam Lantinga
41c5df7eae Fixed some compile errors and warnings under Visual C++ 2009-06-12 08:41:48 +00:00
Bob Pendleton
eb924e9a2d Mouse events now report the correct window id and window enter/leave events are now reported. 2009-06-11 20:08:33 +00:00
Mike Gorchak
bfe3c0a653 Fixed problems with OpenGL ES window resizing. 2009-06-11 05:57:32 +00:00
Sam Lantinga
dd18a26edd Fixed bug #750
Since many different event structures include windowID it should be placed near
the beginning of the structure (preferably right after type) so it's position
is the same between different events.

This is to avoid code like this:
if (event.type == SDL_WINDOWEVENT)
    win = event.window.windowID;
else if ((SDL_EVENTMASK(event.type) & SDL_KEYEVENTMASK) != 0)
    win = event.key.windowID;
else if (event.type == SDL_TEXTINPUT)
    win = event.text.windowID;
else if (event.type == SDL_MOUSEMOTION)
    win = event.motion.windowID;
else if ((SDL_EVENTMASK(event.type) & (SDL_MOUBUTTONDOWNMASK |
SDL_MOUBUTTONUPMASK)) != 0)
    win = event.button.windowID;
else if (event.type == SDL_MOUSEWHEEL)
    win = event.wheel.windowID;
...

in favor of:
win = event.window.windowID;
2009-06-10 14:00:21 +00:00
Sam Lantinga
8d455c1b26 Added missing files for OpenGL ES support 2009-06-10 13:54:13 +00:00
Sam Lantinga
16a9ead7ce Whoops, didn't mean to commit unfinished patch 2009-06-10 13:46:54 +00:00
Sam Lantinga
aed8be2521 indent 2009-06-10 13:34:20 +00:00
Mike Gorchak
e51eed13d1 Continue working on QNX GF and Photon support. 2009-06-10 08:09:04 +00:00
Mike Gorchak
7c053e089d Support for 24 bpp pixel formats has been added. 2009-06-10 05:51:44 +00:00
Bob Pendleton
6170e003a1 zeroing out the rest of the unititialize fields in mouse motion events. 2009-06-09 15:45:33 +00:00
Mike Gorchak
181b01f4cb 1. SDL_CreateTextureFromSurface() now tries to find surface's pixel format.
2. SDL_CreateTextureFromSurface() now has best texture format search for non-alpha pixel formats.
3. Added comparision for pixels packed order to the video mode sorting callback to avoid mixing 1555/565/4444 pixel formats.
4. Added sorting call for current video mode list after each new video mode addition, because SDL_GetClosestDisplayMode() requires video modes to be sorted, and this is one place only where we can detect video modes addition.
2009-06-09 08:56:43 +00:00
Bob Pendleton
e6138ea9b7 make sure that mouse.z == 0 until it is used. 2009-06-09 03:27:48 +00:00
Mike Gorchak
3f23cab959 Fixed support for 4bpp video modes enumeration, otherwise mode with zero bpp appears in the list. 2009-06-08 21:00:52 +00:00
Bob Pendleton
09e48fa834 Fixed some typos and added a couple of includes. All were need to get SDL_power to compile on Linux.
Sam, you might want to check to see that the spellings I picked are the spellings you wanted.
2009-06-08 19:24:38 +00:00
Ryan C. Gordon
fdfe1d4f41 BeOS support for power subsystem. 2009-06-07 22:44:59 +00:00
Ryan C. Gordon
1a2c2eebd2 Initial work on power subsystem for SDL 1.3. 2009-06-07 06:06:35 +00:00
Sam Lantinga
218766a241 indent 2009-06-07 02:45:55 +00:00
Sam Lantinga
62c7087a99 Hi,
I have prepared a set of patches to readd WindowsCE support to SDL 1.3.
I've created a new GAPI/Rawframebuffer and a DirectDraw renderer.
Both renderers are work in progress and there are several unimplemented
cases. (Notably
RenderLine/RenderPoint/RenderFill/QueryTexturePixels/UpdateTexture and
texture blending )
Nevertheless I am successfully using these renderers together with the
SDL software renderer. (On most devices the SDL software renderer will
be much faster as there are only badly optimized vendor drivers available)

I send these patches now in this unpolished state because there seems to
be some interest in win ce and someone has to start supporting SDL 1.3

Now on to the patches:
wince_events_window_fixes.patch
fixes some wince incompatibilities and adds fullscreen support via
SHFullScreen. NOTE: This patch shouldn't have any side effects on
Windows, but I have NOT tested it on Windows, so please double-check.
This patch doesn't dependent on the following ones.

wince_renderers_system.patch
This patch does all necessary modifications to the SDL system.
- it adds the renderers to the configure system
- it adds the renderers to win32video

SDL_ceddrawrender.c
SDL_ceddrawrender.h
SDL_gapirender_c.h
SDL_gapirender.c
SDL_gapirender.h
these files add the new render drivers and should be placed in
src/video/win32

Some notes to people who want to test this:
- I have only compiled sdl with ming32ce, so the VisualC files are not
up to date
- As mingw32ce has no ddraw.h this file must be taken from the MS SDK
and modified to work with gcc
- I had to modify line 2611 in configure.in to
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer
-Wl,--image-base -Wl,0x10000"
otherwise GetCPinfo wouldn't link. If someone knows whats causing this
I'd be happy to hear about it.

It would be great if these patches could make their way into SVN as this
would make collaboration much much easier.

I'm out of office for the next week and therefore will be unavailable
via email.

Regards
Stefan
2009-06-07 02:44:46 +00:00
Mike Gorchak
d89513cb8e Best pixel formats with alpha search code has been added to function which converts surface to texture with enabled color keys. Now "testsprite2 --renderer opengl_es" works fine with all pixel formats with alpha. This affects other renderers too. 2009-06-05 07:35:06 +00:00
Mike Gorchak
bb4afb26ac QNX quirk has been added, QNX OpenGL ES implementation is broken regarding support of textures with packed pixel formats. 2009-06-05 07:30:51 +00:00
Mike Gorchak
bd93cb0220 Support for BGR565 pixel format has been added, mainly for OpenGL ES renderer. OpenGL ES renderer now have new texture formats. 2009-06-03 10:40:44 +00:00
Sam Lantinga
306f1dc431 Von: Thomas Zimmermann
Betreff: [SDL] [PATCH] Make static variables const
Datum: Tue, 19 May 2009 19:45:37 +0200

Hi,

this is a set of simple changes which make some of SDL's internal static
arrays constant. The purpose is to shrink the number of write-able
static bytes and thus increase the number of memory pages shared between
SDL applications.

The patch set is against trunk@4513. Each of the attached patch files is
specific to a sub-system. The set is completed by a second mail, because
of the list's 40 KiB limit.

The files readelf-r4513.txt and readelf-const-patch.txt where made by
calling 'readelf -S libSDL.so'. They show the difference in ELF sections
without and with the patch. Some numbers measured on my x86-64:

Before

 [13] .rodata           PROGBITS         00000000000eaaa0  000eaaa0
      0000000000008170  0000000000000000   A       0     0     32
 [19] .data.rel.ro      PROGBITS         00000000003045e0  001045e0
      00000000000023d0  0000000000000000  WA       0     0     32
 [23] .data             PROGBITS         00000000003076e0  001076e0
      0000000000004988  0000000000000000  WA       0     0     32

After

 [13] .rodata           PROGBITS         00000000000eaaa0  000eaaa0
      0000000000009a50  0000000000000000   A       0     0     32
 [19] .data.rel.ro      PROGBITS         0000000000306040  00106040
      0000000000002608  0000000000000000  WA       0     0     32
 [23] .data             PROGBITS         0000000000309360  00109360
      0000000000002e88  0000000000000000  WA       0     0     32

The size of the write-able data section decreased considerably. Some
entries became const-after-relocation, while most of its content went
straight into the read-only data section.

Best regards, Thomas
2009-06-03 04:37:27 +00:00
Sam Lantinga
a7a0cefe2a OpenPandora support added by David Carré 2009-05-31 11:53:12 +00:00
Sam Lantinga
8a25c7d1e0 error message typo fix 2009-05-28 09:39:14 +00:00
Sam Lantinga
83d7309416 indent 2009-05-23 22:41:08 +00:00
Mike Gorchak
1491423d60 Few new video modes have been added. 2009-05-15 15:47:37 +00:00
Mike Gorchak
5166d1ba84 More checks for current GF state were added. 2009-05-14 11:51:42 +00:00