src/video/xbios/SDL_xbios_centscreen.c
author Patrice Mandin <patmandin@gmail.com>
Wed, 18 May 2005 17:02:17 +0000
changeset 1061 5023cde12cbd
child 1064 fba6b67b4d60
permissions -rw-r--r--
Add Falcon Centscreen extension support
patmandin@1061
     1
/*
patmandin@1061
     2
    SDL - Simple DirectMedia Layer
patmandin@1061
     3
    Copyright (C) 1997-2004 Sam Lantinga
patmandin@1061
     4
patmandin@1061
     5
    This library is free software; you can redistribute it and/or
patmandin@1061
     6
    modify it under the terms of the GNU Library General Public
patmandin@1061
     7
    License as published by the Free Software Foundation; either
patmandin@1061
     8
    version 2 of the License, or (at your option) any later version.
patmandin@1061
     9
patmandin@1061
    10
    This library is distributed in the hope that it will be useful,
patmandin@1061
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
patmandin@1061
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
patmandin@1061
    13
    Library General Public License for more details.
patmandin@1061
    14
patmandin@1061
    15
    You should have received a copy of the GNU Library General Public
patmandin@1061
    16
    License along with this library; if not, write to the Free
patmandin@1061
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
patmandin@1061
    18
patmandin@1061
    19
    Sam Lantinga
patmandin@1061
    20
    slouken@libsdl.org
patmandin@1061
    21
*/
patmandin@1061
    22
patmandin@1061
    23
/*
patmandin@1061
    24
	Centscreen extension definitions
patmandin@1061
    25
patmandin@1061
    26
	Patrice Mandin
patmandin@1061
    27
*/
patmandin@1061
    28
patmandin@1061
    29
#include <stdlib.h>
patmandin@1061
    30
patmandin@1061
    31
#include <mint/falcon.h>
patmandin@1061
    32
patmandin@1061
    33
#include "SDL_xbios.h"
patmandin@1061
    34
#include "SDL_xbios_centscreen.h"
patmandin@1061
    35
patmandin@1061
    36
void SDL_XBIOS_CentscreenInit(_THIS)
patmandin@1061
    37
{
patmandin@1061
    38
	centscreen_mode_t	curmode;
patmandin@1061
    39
patmandin@1061
    40
	/* Reset current mode list */
patmandin@1061
    41
	if (XBIOS_modelist) {
patmandin@1061
    42
		free(XBIOS_modelist);
patmandin@1061
    43
		XBIOS_nummodes = 0;
patmandin@1061
    44
		XBIOS_modelist = NULL;
patmandin@1061
    45
	}
patmandin@1061
    46
patmandin@1061
    47
	/* Add current active mode */
patmandin@1061
    48
	Vread(&curmode);
patmandin@1061
    49
patmandin@1061
    50
	SDL_XBIOS_AddMode(this, -1, curmode.physx, curmode.physy, curmode.plan,
patmandin@1061
    51
		SDL_FALSE
patmandin@1061
    52
	);
patmandin@1061
    53
}