Try something like this (pulled straight from JumpStart so it should work)
Code:
var
videoFlags : UInt32;
videoInfo : PSDL_VideoInfo;
procedure InitRenderInfo;
begin
if SDL_Init( SDL_INIT_VIDEO ) <> 0 then
halt;
InitSoundEngine;
CreateScriptEngine;
videoInfo := SDL_GetVideoInfo;
if videoInfo = nil then
halt;
videoFlags := videoFlags or SDL_DOUBLEBUF; // Enable double buffering
videoFlags := videoFlags or SDL_HWPALETTE; // Store the palette in hardware
// This checks to see if surfaces can be stored in memory
if (videoInfo^.hw_available <> 0) then
videoFlags := videoFlags or SDL_HWSURFACE
else
videoFlags := videoFlags or SDL_SWSURFACE;
// This checks if hardware blits can be done * /
if (videoInfo^.blit_hw <> 0) then
videoFlags := videoFlags or SDL_HWACCEL;
end;
procedure SetVideoMode(Width, Height, BPP : Integer; FullScreen : Boolean);
begin
if FullScreen then
videoFlags := videoFlags or SDL_FULLSCREEN
else
videoFlags := videoFlags and (not SDL_FULLSCREEN);
if Screen <> nil then
SDL_FreeSurface( Screen );
Screen := SDL_SetVideoMode( Width, Height, BPP, videoFlags );
end;
Bookmarks