Mercurial > sdl-ios-xcode
annotate docs/man3/SDL_SetGamma.3 @ 4106:12bb6311fd5d SDL-1.2
Hans de Goede fixed bug #495
When running boswars: http://www.boswars.org/ on a machine with intel
integrathed graphics it crashes when it tries to play the initial theora
splashscreen video:
X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 140 (XVideo)
Minor opcode of failed request: 19 ()
Serial number of failed request: 25
Current serial number in output stream: 26
boswars: xcb_xlib.c:41: xcb_xlib_lock: Assertion `!c->xlib.lock' failed.
Aborted
I recognized this problem from a few years back, when I encountered it while
working on the Xv blitter for xmame. The problem is that for some reason
creation the Xvport and XvImage succeeds, and failure (lack of resources / hw
capability?) is only indicated during the first XvPut[Shm]Image. I've written a
patch for SDL using the work around for this I developed for xmame (and which
is still used successfully in xmame after many years of usage).
I'll admit it isn't very pretty, but after investigating several possibilities
this was the best option, any other fixes would need changes to the SDL api and
abi.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 29 Dec 2007 02:23:48 +0000 |
parents | e5bc29de3f0a |
children | 546f7c1eb755 |
rev | line source |
---|---|
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
1 .TH "SDL_SetGamma" "3" "Tue 11 Sep 2001, 23:01" "SDL" "SDL API Reference" |
0 | 2 .SH "NAME" |
3 SDL_SetGamma\- Sets the color gamma function for the display | |
4 .SH "SYNOPSIS" | |
5 .PP | |
6 \fB#include "SDL\&.h" | |
7 .sp | |
8 \fBint \fBSDL_SetGamma\fP\fR(\fBfloat redgamma, float greengamma, float bluegamma\fR); | |
9 .SH "DESCRIPTION" | |
10 .PP | |
11 Sets the "gamma function" for the display of each color component\&. Gamma controls the brightness/contrast of colors displayed on the screen\&. A gamma value of 1\&.0 is identity (i\&.e\&., no adjustment is made)\&. | |
12 .PP | |
13 This function adjusts the gamma based on the "gamma function" parameter, you can directly specify lookup tables for gamma adjustment with \fISDL_SetGammaRamp\fR\&. | |
14 .PP | |
15 Not all display hardware is able to change gamma\&. | |
16 .SH "RETURN VALUE" | |
17 .PP | |
18 Returns -1 on error (or if gamma adjustment is not supported)\&. | |
19 .SH "SEE ALSO" | |
20 .PP | |
21 \fISDL_GetGammaRamp\fR \fISDL_SetGammaRamp\fR | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
22 ...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 23:01 |