Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
51 user(s) are online (43 user(s) are browsing Forums)

Members: 1
Guests: 50

Thematic, more...
Support us!
Recent OS4 Files
OS4Depot.net
Report message:*
 

Re: SDL1 open issues

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

@Capehill

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

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

int main()
{
     const 
SDL_VideoInfoinfo NULL;
     
int flags SDL_OPENGL SDL_RESIZABLE;
     static 
int vidmode_bpp=0;
     
SDL_Surface screen;

     
     
SDL_InitSDL_INIT_VIDEO SDL_INIT_TIMER SDL_INIT_AUDIO);
     
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);

     
SDL_Quit();
}


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