Remember me

Lost Password?

Register now!


Who's Online
137 user(s) are online (107 user(s) are browsing Forums)

Members: 1
Guests: 136

clint, more...

Support us!

Recent OS4 Files

Report message:*

Re: SDL1 open issues

Subject: Re: SDL1 open issues
by kas1e on 2019/1/28 7:33:13


Created simple test case which show issue. There is code:

#include <stdio.h>
#include <SDL/SDL.h>

int main()
SDL_VideoInfoinfo NULL;
int vidmode_bpp=0;
SDL_Surface screen;

info SDL_GetVideoInfo( );
vidmode_bpp info->vfmt->BitsPerPixel;
SDL_SetVideoMode640480vidmode_bppflags );

screen SDL_GetVideoSurface();

printf("flags in dec = %dn"flags);
printf("flags in hex = %xn"flags);

printf("flags_from_screen in dec = %dn"screen->flags);
printf("flags_from_screen in hex = %xn"screen->flags);


When compile and run this code over win32 , that what i have in output:

$ ./sdltest.exe
flags in dec = 18
flags in hex = 12
flags_from_screen in dec = 18
flags_from_screen in hex = 12

If i compile that for amigaos4 and run, then output are:

$ ./sdltest

flags in dec = 18
flags in hex = 12
flags_from_screen in dec = 16777234
flags_from_screen in hex = 1000012

So, in case with amigaos4, we have other value returned when do SDL_GetVideoSurface(). Seems it return something else in flags field (its not just 12 , but 1000012 , so another 1 at begining of byte).

Is it bug or feature ? At least, in case with SDL everything should works the same on all platforms, so i assume bug ?

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project