Changeset - r443:d725253d3289
[Not reviewed]
master
0 1 0
tron - 20 years ago 2004-11-17 07:57:28
tron@openttd.org
(svn r652) Factorise special case for MorphOS regarding signal() handling
1 file changed with 5 insertions and 5 deletions:
sdl.c
5
5
0 comments (0 inline, 0 general)
sdl.c
Show inline comments
 
@@ -2,24 +2,28 @@
 

	
 
#if defined(WITH_SDL)
 
#include "ttd.h"
 
#include "gfx.h"
 
#include "sound.h"
 
#include "window.h"
 
#include <SDL.h>
 
#include "player.h"
 
#include "hal.h"
 

	
 
#ifdef UNIX
 
#include <signal.h>
 

	
 
#ifdef __MORPHOS__
 
	#define SIG_DFL (void (*)(int))0
 
#endif
 
#endif
 

	
 
#define DYNAMICALLY_LOADED_SDL
 

	
 
static SDL_Surface *_sdl_screen;
 
static int _sdl_usage;
 
static bool _all_modes;
 

	
 
#define MAX_DIRTY_RECTS 100
 
static SDL_Rect _dirty_rects[MAX_DIRTY_RECTS];
 
static int _num_dirty_rects;
 

	
 
@@ -140,29 +144,25 @@ static char *SdlOpen(uint32 x)
 
#endif
 

	
 
	return NULL;
 
}
 

	
 
static void SdlClose(uint32 x)
 
{
 
	if (x != 0)
 
		SDL_CALL SDL_QuitSubSystem(x);
 
	if (--_sdl_usage == 0) {
 
		SDL_CALL SDL_Quit();
 
		#ifdef UNIX
 
			#ifndef __MORPHOS__
 
				signal(SIGABRT, SIG_DFL);
 
			#else
 
				signal(SIGABRT, (void (*)(int))0);
 
			#endif
 
		signal(SIGABRT, SIG_DFL);
 
		#endif
 
	}
 
}
 

	
 
static void SdlVideoMakeDirty(int left, int top, int width, int height)
 
{
 
//	printf("(%d,%d)-(%d,%d)\n", left, top, width, height);
 
//	_pixels_redrawn += width*height;
 
	if (_num_dirty_rects < MAX_DIRTY_RECTS) {
 
		_dirty_rects[_num_dirty_rects].x = left;
 
		_dirty_rects[_num_dirty_rects].y = top;
 
		_dirty_rects[_num_dirty_rects].w = width;
0 comments (0 inline, 0 general)