Making the API simpler, removed support for palettized video modes and textures.
This commit is contained in:
parent
b4fff42fc6
commit
09a8558897
23 changed files with 19 additions and 783 deletions
|
@ -94,13 +94,6 @@ static int D3D_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture);
|
|||
static int D3D_QueryTexturePixels(SDL_Renderer * renderer,
|
||||
SDL_Texture * texture, void **pixels,
|
||||
int *pitch);
|
||||
static int D3D_SetTexturePalette(SDL_Renderer * renderer,
|
||||
SDL_Texture * texture,
|
||||
const SDL_Color * colors, int firstcolor,
|
||||
int ncolors);
|
||||
static int D3D_GetTexturePalette(SDL_Renderer * renderer,
|
||||
SDL_Texture * texture, SDL_Color * colors,
|
||||
int firstcolor, int ncolors);
|
||||
static int D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
|
||||
const SDL_Rect * rect, const void *pixels,
|
||||
int pitch);
|
||||
|
@ -362,7 +355,6 @@ D3D_AddRenderDriver(_THIS)
|
|||
if (data->d3d) {
|
||||
int i, j;
|
||||
int formats[] = {
|
||||
SDL_PIXELFORMAT_INDEX8,
|
||||
SDL_PIXELFORMAT_RGB332,
|
||||
SDL_PIXELFORMAT_RGB444,
|
||||
SDL_PIXELFORMAT_RGB555,
|
||||
|
@ -436,8 +428,6 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
renderer->DisplayModeChanged = D3D_DisplayModeChanged;
|
||||
renderer->CreateTexture = D3D_CreateTexture;
|
||||
renderer->QueryTexturePixels = D3D_QueryTexturePixels;
|
||||
renderer->SetTexturePalette = D3D_SetTexturePalette;
|
||||
renderer->GetTexturePalette = D3D_GetTexturePalette;
|
||||
renderer->UpdateTexture = D3D_UpdateTexture;
|
||||
renderer->LockTexture = D3D_LockTexture;
|
||||
renderer->UnlockTexture = D3D_UnlockTexture;
|
||||
|
@ -663,25 +653,6 @@ D3D_QueryTexturePixels(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
D3D_SetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture,
|
||||
const SDL_Color * colors, int firstcolor, int ncolors)
|
||||
{
|
||||
D3D_RenderData *renderdata = (D3D_RenderData *) renderer->driverdata;
|
||||
D3D_TextureData *data = (D3D_TextureData *) texture->driverdata;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
D3D_GetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture,
|
||||
SDL_Color * colors, int firstcolor, int ncolors)
|
||||
{
|
||||
D3D_TextureData *data = (D3D_TextureData *) texture->driverdata;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
|
||||
const SDL_Rect * rect, const void *pixels, int pitch)
|
||||
|
|
|
@ -501,25 +501,6 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
break;
|
||||
|
||||
/* We are about to get palette focus! */
|
||||
case WM_QUERYNEWPALETTE:
|
||||
{
|
||||
/*
|
||||
WIN_RealizePalette(current_video);
|
||||
returnCode = TRUE;
|
||||
*/
|
||||
}
|
||||
break;
|
||||
|
||||
/* Another application changed the palette */
|
||||
case WM_PALETTECHANGED:
|
||||
{
|
||||
/*
|
||||
WIN_PaletteChanged(current_video, (HWND) wParam);
|
||||
*/
|
||||
}
|
||||
break;
|
||||
|
||||
/* We were occluded, refresh our display */
|
||||
case WM_PAINT:
|
||||
{
|
||||
|
|
|
@ -131,6 +131,10 @@ WIN_GetDisplayMode(LPCTSTR deviceName, DWORD index, SDL_DisplayMode * mode)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (SDL_ISPIXELFORMAT_INDEXED(mode->format)) {
|
||||
/* We don't support palettized modes now */
|
||||
return SDL_FALSE;
|
||||
}
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue