view docs.html @ 3487:24d13328c44a

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
author Sam Lantinga <slouken@libsdl.org>
date Tue, 24 Nov 2009 08:12:32 +0000
parents 6dc250ebdd80
children
line wrap: on
line source

<HTML>
<HEAD><TITLE>SDL Stable Release</TITLE></HEAD>
<BODY BGCOLOR="#FFEBCD" TEXT="#000000">

<IMG SRC="docs/images/rainbow.gif" ALT="[separator]" WIDTH="100%">
<P>
This source is stable, and is fully tested on all supported platforms.<br>
Please send bug reports or questions to the SDL mailing list:<br>
<a href="http://www.libsdl.org/mailing-list.php"
        >http://www.libsdl.org/mailing-list.php</a><br>
The latest stable release may be found on the
	<a href="http://www.libsdl.org/">SDL website</A>.
</P>

<H2> <A HREF="http://wiki.libsdl.org/">Online Documentation</A> </H2>

<H2> SDL 1.2.10 Release Notes </H2>
<P>
SDL 1.2.10 is a major release, featuring a revamp of the build system and many API improvements and bug fixes.
</P>
<H3> API enhancements </H3>
<UL>
<LI>
	If SDL_OpenAudio() is passed zero for the desired format
	fields, the following environment variables will be used
	to fill them in:
<pre><code>
		SDL_AUDIO_FREQUENCY
		SDL_AUDIO_FORMAT
		SDL_AUDIO_CHANNELS
		SDL_AUDIO_SAMPLES
</code></pre>
	If an environment variable is not specified, it will be set
	to a reasonable default value.
<LI>
	SDL_SetVideoMode() now accepts 0 for width or height and will use
	the current video mode (or the desktop mode if no mode has been set.)
<LI>
	Added current_w and current_h to the SDL_VideoInfo structure,
	which is set to the desktop resolution during video intialization,
	and then set to the current resolution when a video mode is set.
<LI>
	SDL_GL_LoadLibrary() will load the system default OpenGL library
	if it is passed NULL as a parameter.
<LI>
	Added SDL_GL_SWAP_CONTROL to wait for vsync in OpenGL applications.
<LI>
	Added SDL_GL_ACCELERATED_VISUAL to guarantee hardware acceleration.
<LI>
	SDL_WM_SetCaption() now officially takes UTF-8 title and icon strings, and displays international characters on supported platforms.
<LI>
	Added SDL_GetKeyRepeat() to query the key repeat settings.
<LI>
	Added the "dummy" audio driver, which can be used to emulate audio
	output without a sound card.
<LI>
	Added SDL_config.h, with defaults for various build environments.
</UL>

<H3> General Notes </H3>

<BLOCKQUOTE>
<P>
	The SDL website now has an <A HREF="http://www.libsdl.org/rss/rss.xml">RSS feed</A>!
<P>
	The SDL development source code is now managed with <A HREF="http://www.libsdl.org/svn.php">Subversion</A>.
<P>
	SDL now uses the Bugzilla <A HREF="http://bugzilla.libsdl.org/">bug tracking system</A>, hosted by icculus.org.
<P>
	SDL is licensed under version 2.1 of the GNU Lesser General Public License.
<P>
	The entire build system has been revamped to make it much more portable, including versions of C library functions to make it possible to run SDL on a minimal embedded environment.  See README.Porting in the SDL source distribution for information on how to port SDL to a new platform.
<P>
	SDL_opengl.h has been updated with the latest glext.h from <A HREF="http://oss.sgi.com/projects/ogl-sample/registry/">http://oss.sgi.com/projects/ogl-sample/registry/</A>
<P>
	Alex Volkov contributed highly optimized RGB <-> RGBA blitters.
</BLOCKQUOTE>

<H3> Unix Notes </H3>

<BLOCKQUOTE>
<P>
	The X11 libraries are dynamically loaded at runtime by default.  This allows the distributed version of SDL to run on systems without X11 libraries installed.
<P>
	The XiG XME extension code is now included in the X11 video driver by default.
<P>
	XRandR support for video mode switching has been added to the X11 driver, but is disabled because of undesired interactions with window managers.  You can enable this by setting the environment variable SDL_VIDEO_X11_XRANDR to 1.
<P>
	Xinerama multi-head displays are properly handled now, and the SDL_VIDEO_FULLSCREEN_HEAD environment variable can be used to select the screen used for fullscreen video modes.  Note that changing the video modes only works on screen 0.
<P>
	XVidMode video modes are now sorted so they maintain the refresh rates specified in the X11 configuration file.
<P>
	SDL windows are no longer transparent in X11 compositing systems like XGL.
<P>
	The mouse is properly released by the X11 video driver if the fullscreen window loses focus.
<P>
	The X11 input driver now uses XIM to handle international input.
<P>
	The screensaver and DPMS monitor blanking are disabled while SDL games are running under the X11 and DGA video drivers.  This behavior will be formalized and selectable in SDL 1.3.
<P>
	Fixed a bug preventing stereo OpenGL contexts from being selected on the X11 driver.
<P>
	The DGA video driver now waits for pending blits involving surfaces before they are freed.  This prevents display oddities when using SDL_DisplayFormat() to convert many images.
<P>
	The framebuffer console video driver now has a parser for /etc/fb.modes for improved video mode handling.
<P>
	The framebuffer console video driver now allows asynchronous VT switching, and restores the full contents of the screen when switched back.
<P>
	The framebuffer console now uses CTRL-ALT-FN to switch virtual terminals, to avoid collisions with application key bindings.
<P>
	The framebuffer console input driver correctly sets IMPS/2 mode for wheel mice.  It also properly detects when gpm is in IMPS/2 protocol mode, or passing raw protocol from an IMPS/2 mouse.
<P>
	The SVGAlib video driver now has support for banked (non-linear) video modes.
<P>
	A video driver for OpenBSD on the Sharp Zaurus has been contributed by Staffan Ulfberg.  See the file README.wscons in the SDL source distribution for details.
<P>
	Many patches have been incorporated from *BSD ports.
</BLOCKQUOTE>

<H3> Windows Notes </H3>

<BLOCKQUOTE>
<P>
	The "windib" video driver is the default now, to prevent problems with certain laptops, 64-bit Windows, and Windows Vista.  The DirectX driver is still available, and can be selected by setting the environment variable SDL_VIDEODRIVER to "directx".
<P>
	SDL has been ported to 64-bit Windows.
<P>
	Dmitry Yakimov contributed a GAPI video driver for Windows CE.
<P>
	The default fullscreen refresh rate has been increased to match the desktop refresh rate, when using equivalent resolutions.  A full API for querying and selecting refresh rates is planned for SDL 1.3.
<P>
	Dialog boxes are now shown when SDL is in windowed OpenGL mode.
<P>
	The SDL window is recreated when necessary to maintain OpenGL context attributes, when switching between windowed and fullscreen modes.
<P>
	An SDL_VIDEORESIZE event is properly sent when the SDL window is maximized and restored.
<P>
	Window positions are retained when switching between fullscreen and windowed modes.
<P>
	ToUnicode() is used, when available, for improved handling of international keyboard input.
<P>
	The PrtScrn is now treated normally with both key down and key up events.
<P>
	Pressing ALT-F4 now delivers an SDL_QUIT event to SDL applications.
<P>
	Joystick names are now correct for joysticks which have been unplugged and then plugged back in since booting.
<P>
	An MCI error when playing the last track on a CD-ROM has been fixed.
<P>
	OpenWatcom projects for building SDL have been provided by Marc Peter.
</BLOCKQUOTE>

<H3> Mac OS X Notes </H3>

<BLOCKQUOTE>
<P>
	SDL now supports building Universal binaries, both through Xcode projects and when using configure/make.  See README.MacOSX in the SDL source archive for details.
<P>
	The X11 video driver with GLX support can be built on Mac OS X, if the X11 development SDK is installed.
<P>
	Transitions between fullscreen resolutions and windowed mode now use a much faster asynchronous fade to hide desktop flicker.
<P>
	Icons set with SDL_WM_SetIcon() now have the proper colors on Intel Macs.
</BLOCKQUOTE>

<IMG SRC="docs/images/rainbow.gif" ALT="[separator]" WIDTH="100%">

</BODY>
</HTML>