Indeed, on Windows XP, Windows 7, Windows Vista and Ubuntu it works fine for me, too.
I use
SDL_SETVIDEOMODE(1024, 768, 24, SDL_HWSURFACE + FullscreenFlag)
This works all the time and the game now runs nearly perfectly on MacOS -- except with that particular image file.
One thing, though: I've got an option to switch between windowed mode and full screen. This option works fine under Windows and Linux, but leads to another Invalid Floating Point error:
Code:
UseFullscreen := BoolToggle(UseFullscreen); // reverts a boolean value
SaveConfig; // saves game config
SDL_FREESURFACE(screen); // first free existing video surface, to prevent memory leaks when using screen again
if UseFullScreen = True then
FullscreenFlag := SDL_Fullscreen
else
FullscreenFlag := 0;
SDL_QUIT;
delay(50);
SDL_INIT(SDL_INIT_VIDEO);
SDL_ENABLEUNICODE(1);
SDL_ENABLEKEYREPEAT(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
SDL_WM_SETCAPTION('LambdaRogue ' + strVersion, 'LambdaRogue ' + strVersion);
if UseHiRes = False then
screen := SDL_SETVIDEOMODE(800, 600, 24, SDL_HWSURFACE + FullscreenFlag)
else
screen := SDL_SETVIDEOMODE(1024, 768, 24, SDL_HWSURFACE + FullscreenFlag);
It crashes directly before SDL_SETVIDEOMODE.
What's wrong here?
Bookmarks