Mercurial > sdl-ios-xcode
view INSTALL @ 1120:8e1fde455471
Patch by me to fix crash described below.
--ryan.
To: sdl@libsdl.org
From: Rainer Deyke <rainerd@eldwood.com>
Date: Tue, 16 Aug 2005 01:08:18 -0600
Subject: [SDL] Bug report: SDL_CreateRGBSurface with SDL_HWSURFACE crashes
If SDL is in full-screen mode with a hardware video surface on OS X,
SDL_CreateRGBSurface with SDL_HWSURFACE crashes. The crash occurs on
line 109 of SDL_Surface.c. This was tested on OS X 10.3.9 with both SDL
1.2.8 and the latest CVS. Here is a small C++ program that demonstrates
the problem:
#include "SDL.h"
#include <stdio.h>
namespace {
void wait_for_key()
{
SDL_Event e;
printf("%d\n", SDL_GetAppState());
while (SDL_WaitEvent(&e)) {
if (e.type == SDL_KEYDOWN || e.type == SDL_QUIT) return;
}
}
}
int main(int, char *[])
{
SDL_Init(SDL_INIT_VIDEO);
SDL_Surface *screen
= SDL_SetVideoMode(640, 480, 32, SDL_FULLSCREEN | SDL_HWSURFACE);
SDL_Surface *s = SDL_CreateRGBSurface(SDL_HWSURFACE, 640, 480, 32,
screen->format->Rmask, screen->format->Gmask,
screen->format->Bmask, screen->format->Amask);
wait_for_key();
if (s) SDL_FreeSurface(s);
SDL_Quit();
printf("Success!\n");
return 0;
}
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Thu, 18 Aug 2005 06:46:32 +0000 |
parents | 0a45995a7fc3 |
children | 00e7c6b7eb03 |
line wrap: on
line source
To compile and install SDL: 1. Run './configure; make; make install' If you are compiling for Windows using gcc, read the FAQ at: http://www.libsdl.org/faq.php?action=listentries&category=4#42 If you are compiling using Visual C++ on Win32, you should read the file VisualC.html 2. Look at the example programs in ./test, and check out the HTML documentation in ./docs to see how to use the SDL library. 3. Join the SDL developer mailing list by sending E-mail to sdl-request@libsdl.org and put "subscribe" in the subject of the message. Or alternatively you can use the web interface: http://www.libsdl.org/mailing-list.php That's it! Sam Lantinga <slouken@libsdl.org>