winedos: Move VGA_SetGraphicMode() up a bit and make it static. VGA_GetModeInfoList() is unused so remove it.
This commit is contained in:
parent
37c0780e14
commit
c772cdfca5
|
@ -884,41 +884,7 @@ const VGA_MODE *VGA_GetModeInfo(WORD mode)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const VGA_MODE *VGA_GetModeInfoList(void)
|
||||
{
|
||||
return VGA_modelist;
|
||||
}
|
||||
|
||||
int VGA_SetMode(WORD mode)
|
||||
{
|
||||
const VGA_MODE *ModeInfo;
|
||||
/* get info on VGA mode & set appropriately */
|
||||
VGA_CurrentMode = mode;
|
||||
ModeInfo = VGA_GetModeInfo(VGA_CurrentMode);
|
||||
|
||||
/* check if mode is supported */
|
||||
if (ModeInfo->Supported)
|
||||
{
|
||||
FIXME("Setting VGA mode %i - Supported mode - Improve reporting of missing capabilities for modes & modetypes.\n", mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
FIXME("Setting VGA mode %i - Unsupported mode - Will doubtfully work at all, but we'll try anyways.\n", mode);
|
||||
}
|
||||
|
||||
/* set up graphic or text display */
|
||||
if (ModeInfo->ModeType == TEXT)
|
||||
{
|
||||
VGA_SetAlphaMode(ModeInfo->TextCols, ModeInfo->TextRows);
|
||||
}
|
||||
else
|
||||
{
|
||||
return VGA_SetGraphicMode(mode);
|
||||
}
|
||||
return 0; /* assume all good & return zero */
|
||||
}
|
||||
|
||||
int VGA_SetGraphicMode(WORD mode)
|
||||
static int VGA_SetGraphicMode(WORD mode)
|
||||
{
|
||||
ModeSet par;
|
||||
int newSize;
|
||||
|
@ -1000,6 +966,35 @@ int VGA_SetGraphicMode(WORD mode)
|
|||
return par.ret;
|
||||
}
|
||||
|
||||
int VGA_SetMode(WORD mode)
|
||||
{
|
||||
const VGA_MODE *ModeInfo;
|
||||
/* get info on VGA mode & set appropriately */
|
||||
VGA_CurrentMode = mode;
|
||||
ModeInfo = VGA_GetModeInfo(VGA_CurrentMode);
|
||||
|
||||
/* check if mode is supported */
|
||||
if (ModeInfo->Supported)
|
||||
{
|
||||
FIXME("Setting VGA mode %i - Supported mode - Improve reporting of missing capabilities for modes & modetypes.\n", mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
FIXME("Setting VGA mode %i - Unsupported mode - Will doubtfully work at all, but we'll try anyways.\n", mode);
|
||||
}
|
||||
|
||||
/* set up graphic or text display */
|
||||
if (ModeInfo->ModeType == TEXT)
|
||||
{
|
||||
VGA_SetAlphaMode(ModeInfo->TextCols, ModeInfo->TextRows);
|
||||
}
|
||||
else
|
||||
{
|
||||
return VGA_SetGraphicMode(mode);
|
||||
}
|
||||
return 0; /* assume all good & return zero */
|
||||
}
|
||||
|
||||
int VGA_GetMode(unsigned*Height,unsigned*Width,unsigned*Depth)
|
||||
{
|
||||
if (!lpddraw) return 1;
|
||||
|
|
|
@ -55,7 +55,6 @@ const VGA_MODE *VGA_GetModeInfo(WORD mode);
|
|||
int VGA_SetMode(WORD mode);
|
||||
|
||||
/* graphics mode */
|
||||
int VGA_SetGraphicMode(WORD mode);
|
||||
int VGA_GetMode(unsigned*Height,unsigned*Width,unsigned*Depth);
|
||||
void VGA_SetPalette(PALETTEENTRY*pal,int start,int len);
|
||||
void VGA_SetColor16(int reg,int color);
|
||||
|
|
Loading…
Reference in New Issue