Commit 1fda3574 authored by Patrice Mandin's avatar Patrice Mandin

Enumerates custom modes

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403824
parent 76e37043
...@@ -57,6 +57,28 @@ static const Uint8 mode_bpp[4]={ ...@@ -57,6 +57,28 @@ static const Uint8 mode_bpp[4]={
8, 15, 16, 32 8, 15, 16, 32
}; };
/*--- Variables ---*/
static int enum_actually_add;
static SDL_VideoDevice *enum_this;
/*--- Functions ---*/
static unsigned long /*cdecl*/ enumfunc(SCREENINFO *inf, unsigned long flag)
{
xbiosmode_t modeinfo;
modeinfo.number = inf->devID;
modeinfo.width = inf->scrWidth;
modeinfo.height = inf->scrHeight;
modeinfo.depth = inf->scrPlanes;
modeinfo.doubleline = SDL_FALSE;
SDL_XBIOS_AddMode(enum_this, enum_actually_add, &modeinfo);
return ENUMMODE_CONT;
}
void SDL_XBIOS_ListMilanModes(_THIS, int actually_add) void SDL_XBIOS_ListMilanModes(_THIS, int actually_add)
{ {
int i; int i;
...@@ -84,4 +106,7 @@ void SDL_XBIOS_ListMilanModes(_THIS, int actually_add) ...@@ -84,4 +106,7 @@ void SDL_XBIOS_ListMilanModes(_THIS, int actually_add)
} }
/* Read custom created modes */ /* Read custom created modes */
enum_this = this;
enum_actually_add = actually_add;
VsetScreen(-1, &enumfunc, MI_MAGIC, CMD_ENUMMODES);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment