Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
113 user(s) are online (61 user(s) are browsing Forums)

Members: 0
Guests: 113

more...

Headlines

 
  Register To Post  

« 1 ... 5 6 7 (8) 9 10 11 ... 18 »
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
Something wrong with beret from github when built as SWSURFACE one. To reproduce:

1). replace HWSURFACE on SWSURFACE in 2 places in beret from github, recompile, run game
2). press alt+tab to going to the window mode
3). press alt+tab to going to fullscreenmode again

As result everything slow downs like hell :) 3-4 fps. And if i quit, it even didn't quit.

My old main.c rebuilded with new SDL give no that problem, so probably some code changes in beret about flags and co cause that.


Edited by kas1e on 2018/3/17 19:35:25
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

Remove SDL_DOUBLEBUF when using SDL_SWSURFACE. SWSURFACEs are implicitly double-buffered.

Maybe possibility should be removed from the backend because it should not be even valid: https://www.libsdl.org/release/SDL-1.2 ... html/sdlsetvideomode.html

Can't test the issue myself right now, maybe next week.

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
Btw, for dbl-buffering, i see that minigl in os4sdl is playing dirty games with surfaces and dbl-buffering. At least i only checked on word "OPENGL" in video/amigaos4 directory and there few places which looks strange (with strange comments about using surfaces and dbl-buffering).

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

There is one check which removes SDL_DOUBLEBUF flag in OpenGL path, to avoid resource allocation. Do you mean that one? Double buffering seems to be handled separately and it's forced in OpenGL case.

I would like to do some changes, for example it would be nice to have bitdepth user-configurable (now it's 16-bit hard coded).

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
Quote:

Do you mean that one?

That one yes, but also there is that part in the SDL_os4video.c:

#if SDL_VIDEO_OPENGL
    
if (flags SDL_OPENGL)
    {
        
dprintf("Checking for OpenGL\n");

        if (
os4video_GL_Init(_this) != 0)
        {
            
dprintf("Failed OpenGL init\n");
            
os4video_DeleteCurrentDisplay(_thiscurrent, !newOffScreenSurface);
            return 
FALSE;
        }
        else
        {
            
dprintf("OpenGL init successfull\n");
            
current->flags |= SDL_OPENGL;

            
/* Hack. We assert HWSURFACE above to simplify
             * initialization of GL surfaces, but we cannot pass these flags
             * back to SDL.
             * Need to re-work surface set-up code so that this nonsense isn't
             * necessary
             */
            
current->flags &= ~SDL_HWSURFACE;
        }
    }
#endif


Dunno how right comment about hack and needs to re-work surface setup code is at current state, through.

I also found that in video/SDL_glfuncs.h, we have that part:

#ifdef __amigaos4__
// MiniGL doesn't implement 1D texturing
SDL_PROC_UNUSED(void,glCopyTexImage1D,(GLenum targetGLint levelGLenum internalFormatGLint xGLint yGLsizei widthGLint border))
#else
SDL_PROC(void,glCopyTexImage1D,(GLenum targetGLint levelGLenum internalFormatGLint xGLint yGLsizei widthGLint border))
#endif


Dunno if minigl still didn't have 1d texturing, but even if not, there we probably need somehow to make common ifdef, which we can later use for minigl, but didn't use for ogles and gl4es

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

There is cgl_GLCopyTexImage1D in MiniGL sources.

// Faking 1D textures using 2D textures     
// WARNING: This assumes that Warp3D doesn't support texture borders. If this changes, then so must this     
// function      
cgl_GLCopyTexImage2D(SelfGL_TEXTURE_2DlevelinternalFormatxywidth1border);      
// The vertical direction should always be repeated
cgl_GLTexParameteri(SelfgltargetGL_TEXTURE_WRAP_TGL_REPEAT);

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
Strange that comment say about 1d, but function name ends on 2d still

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

That was only the function body. Check texture.c.

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
Right, i do check changelog of MiniGl, and it was added long time ago, in the 2.2 version. And that ifdef in SDL probably keeps there much longer, and we can then remove it at all.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
Btw, did you know for what that video/SDL_glfuncs.h is need it at all ? I mean, didn't we use those gl fucntions we need , just taken includes and whatever from opengl itself, and use them in any SDL app ?

Or that file have some special meaning ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

I didn't check all sources but they seem to be used for OpenGL-blitting. Something we can ignore. At least I don't have interest to study the topic in SDL1. Easier to use graphics.library for 2D and OpenGL for 3D.

Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

Spent quite much time to debug Beret issue. After all, the issue was that SDL creates a "shadow surface" (SW) under certain conditions and accelerated blits are canceled. In practise it could happen when asked for SDL_HWSURFACE|SDL_DOUBLEBUF but without SDL_FULLSCREEN.

Whole surface creation is so complicated business due to all combinations. Now, if the backend would use the same flipping code for both window and fullscreen, this problem might be solved but at the moment my advice is to pass SDL_DOUBLEBUF only with FULLSCREEN|HWSURFACE combo.

So, for accelerated blitting, either use:

SDL_FULLSCREEN|SDL_HWSURFACE|SDL_DOUBLEBUF or
SDL_HWSURFACE (window).

Or if your application needs to poke surfaces like many emulators do, maybe use just SWSURFACEs.

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
Porting some SDL1 stuff, and find out this part of code:

static Uint8 cursorMask[16] = { };
static 
Uint8 cursorData[16] = { };
static 
SDL_Cursorcursor;
cursor SDL_CreateCursor(cursorDatacursorMask161600);
SDL_SetCursor (cursor);


Which probabaly mean "let's hide the cursor". But , by some reassons when i use that code, i have in the cursor place some trailing black dots keeps.

So or code wrong (or wrong at all, or wrong for aos4), or that another sdl1 issue

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

Doesn't SDL_ShowCursor(int toggle) on os4 port exists?

www.libsdl.org/release/SDL-1.2 ... s/html/sdlshowcursor.html

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@jabirulo
It all can be workarounded of course, point is exactly that code should't work ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

Example code seems to have bug. Cursor is defined to be 16*16. However, data and mask have only input for 8*16 cursor.

Double the data and mask array sizes to 2*16, or use width of 8 when creating cursor.

I didn't test it yet myself.

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
Thanks !

Found today some other issue (which can be again issues with game's code, but maybe not): i build some game via SDL1 / MiniGL which, when switch to/from fullscreen, or resize the gl window when in window mode, give a black window. Game logic works, but just black window.

If i start originally game in lets say fullscreen mode : it works.
If i start originalluy game in window mode: it works.

But once i trying to swith to/from window/fullscreen, then black window. Same for resizing when in window mode.

The functions in question are this ones:

/***********************************************************************
 *      Initialize SDL and make a SDL-Window / Fullscreen              *
 ***********************************************************************/

void sys_create_display(int width,int height)
{
  
/* Information about the current video settings. */
  
const SDL_VideoInfoinfo NULL;
  
int vidmode_flags=0samplingerror 0;

  
/* First, initialize SDL's video subsystem. */
  
if( SDL_InitSDL_INIT_VIDEO SDL_INIT_TIMER SDL_INIT_AUDIO) < ) {
    
fprintfstderr"Video or Audio initialization failed: %s\n",
    
SDL_GetError( ) );
    
sys_exit(1);
  }

  
sdl_on 

  
/* Let's get some video information. */
  
info SDL_GetVideoInfo( );
  
  if( !
info ) {
    
/* This should probably never happen. */
    
fprintfstderr"Video query failed: %s\n",
    
SDL_GetError( ) );
    
sys_exit(1);
  }
  
  
vidmode_bpp info->vfmt->BitsPerPixel;

  
/*
   * Now, we want to setup our requested
   * window attributes for our OpenGL window.
   * We want *at least* 5 bits of red, green
   * and blue. We also want at least a 16-bit
   * depth buffer.
   *
   * The last thing we do is request a VMfloat
   * buffered window. '1' turns on VMfloat
   * buffering, '0' turns it off.
   *
   * Note that we do not use SDL_DOUBLEBUF in
   * the flags to SDL_SetVideoMode. That does
   * not affect the GL attribute state, only
   * the standard 2D blitting setup.
   */

  
SDL_GL_SetAttributeSDL_GL_RED_SIZE);
  
SDL_GL_SetAttributeSDL_GL_GREEN_SIZE);
  
SDL_GL_SetAttributeSDL_GL_BLUE_SIZE);
  
SDL_GL_SetAttributeSDL_GL_DEPTH_SIZE16 );
  if (
SDL_GL_SetAttributeSDL_GL_DOUBLEBUFFER) <0) {
       
fprintf(stderr"SDL_GL_DOUBLEBUFFER error: %s\n"SDL_GetError());
       
options_vsync 0;
  } else {
//compile without errors, if SDL is < Version 1.2.10 at compile time
#if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION == 2 && SDL_PATCHLEVEL > 9
// The next works only with fsaa options off!!!!
  
if(!options_fsaa_value) {
       if(
SDL_GL_SetAttributeSDL_GL_ACCELERATED_VISUAL) < ) {
                  
fprintfstderr"Unable to guarantee accelerated visual with libSDL < 1.2.10\n");
       }
  }
  if(
vsync_supported()) {
       if(
options_vsync) {
      if (
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL1) < 0) { // since SDL v1.2.10
        
fprintf(stderr"SDL_GL_SWAP_CONTROL error: %s\n"SDL_GetError());
        
options_vsync 0;
      }
       }
  } else {
    
fprintf(stderr,"SDL-System without control of vsync. Scrolling may stutter\n");
  }
#endif
  
}


  if(
options_fsaa_value) {
    
samplingerror SDL_GL_SetAttributeSDL_GL_MULTISAMPLEBUFFERS1);
    if(!
samplingerror) {
      
samplingerror SDL_GL_SetAttributeSDL_GL_MULTISAMPLESAMPLES,options_fsaa_value);
    }
  }
  if (
samplingerror == -1) {

    
options_fsaa_value 0;

  }

  
SDL_EnableKeyRepeatSDL_DEFAULT_REPEAT_DELAYSDL_DEFAULT_REPEAT_INTERVAL );
  
/* key repeat caused problem when toggling fullscreen !!! */

  
vidmode_flags SDL_OPENGL;

  if ( 
info->hw_available ) {
    
vidmode_flags |= SDL_HWSURFACE;
    
vidmode_flags |= SDL_HWPALETTE/* Store the palette in hardware */
  
} else {
    
vidmode_flags |= SDL_SWSURFACE;
  }

  if ( 
info->blit_hw ) { /* checks if hardware blits can be done */
    
vidmode_flags |= SDL_HWACCEL;
  }
    if (
fullscreen) {
      
vidmode_flags |= SDL_FULLSCREEN;
    }else{
      
vidmode_flags |= SDL_RESIZABLE;
  }

  
//Set the window icon
  
SDL_WM_SetIcon(SDL_LoadBMP("icon.bmp"),NULL);

  if(
options_fsaa_value options_maxfsaa) {
      
options_fsaa_value options_maxfsaa;
  }
  while (
vid_surface == NULL) {

   if((
vid_surface=SDL_SetVideoModewidthheightvidmode_bppvidmode_flags )) == NULL) {
    if(!
options_fsaa_value) {
     
fprintfstderr"Video mode set failed: %s\n"SDL_GetError());
     
sys_exit(1);
    }

    
fprintfstderr"Video mode set failed: %s\nSwitch to other mode\n"SDL_GetError());
    if(
options_fsaa_value) {
      
options_fsaa_value >>= 1;
      
fprintf(stderr,"FSAA %i\n",options_fsaa_value);
      
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLESoptions_fsaa_value);
    } else {
      
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,0);
    }

   }

  }
  
// Check new settings for better output the next line is a must for multisample
  
if(!samplingerror && options_fsaa_value){
     
glEnable(GL_MULTISAMPLE);
     
//glHint(GL_MULTISAMPLE_FILTER_HINT_NV,GL_NICEST); //be careful (Nvidia-specific), set over an option ?
  
}

  
SDL_WM_SetCaption("game","game");

  
glPolygonMode(GL_FRONT,GL_FILL);  // fill the front of the polygons
  
glPolygonMode(GL_BACK,GL_LINE);   // only lines for back (better seeing on zooming)
  
glCullFace(GL_BACK);              // Standards for rendering only front of textures
  
glEnable(GL_CULL_FACE);
}

/***********************************************************************
 *                          Fullscreen active ?                        *
 ***********************************************************************/

int sys_get_fullscreen(void)
{
    return 
fullscreen;
}

/**************************************************************************
 *            Set a fullscreen(1) or window(0) window                     *
 * SDL_WM_ToggleFullScreen(screen) works only on X11 and there not stable *
 **************************************************************************/

void sys_fullscreenint fullscr )
{

    
SDL_Surface screen;
    
Uint32 flags;

    
screen SDL_GetVideoSurface();
    
flags screen->flags/* Save the current flags in case toggling fails */
    
SDL_EnableKeyRepeat0);
    if ( 
fullscr!=&& (screen->flags SDL_FULLSCREEN)==){
           
screen SDL_SetVideoMode000screen->flags SDL_FULLSCREEN );
    } else if( 
fullscr==&& (screen->flags SDL_FULLSCREEN)!=){
           
screen SDL_SetVideoMode000screen->flags & ~SDL_FULLSCREEN);
    }
    if(
screen == NULL) {
           
screen SDL_SetVideoMode(000flags); /* If toggle FullScreen failed, then switch back */
    
} else {
           
fullscreen fullscr;
    }
    
SDL_EnableKeyRepeatSDL_DEFAULT_REPEAT_DELAYSDL_DEFAULT_REPEAT_INTERVAL );
    if(
screen == NULL) {
           
fprintf(stderr,"Video-Error on set full-screen/windowed mode. Terminating\n");
           
sys_exit(1); /* If you can't switch back for some reason, then epic fail */
    
}
}

/***********************************************************************
 *          Toggle between Fullscreen and windowed mode                *
 ***********************************************************************/

void sys_toggle_fullscreenvoid )
{
    if (
fullscreen){
        
sys_fullscreen);
    } else {
        
sys_fullscreen);
    }
}



/***********************************************************************
 *                Resize the SDL Surface handle                        *
 ***********************************************************************/

void sys_resizeint widthint heightint callfrom )
{

    
SDL_Surface screen;
    
Uint32 flags;

    if(
width 958width 958;      // don't resize below this
    
if(height 750height 750;
    
ignore callfrom;
    
screen SDL_GetVideoSurface();
    
flags screen->flags/* Save the current flags in case toggling fails */
    
SDL_EnableKeyRepeat0);
    
screen SDL_SetVideoModewidthheightscreen->format->BitsPerPixelscreen->flags);
    
SDL_Delay(300);
    
//fprintf(stderr,"Called x: %i y: %i\n",width,height);
    
SDL_EnableKeyRepeatSDL_DEFAULT_REPEAT_DELAYSDL_DEFAULT_REPEAT_INTERVAL );
    if(
screen == NULL) {
           
screen SDL_SetVideoMode(000flags); /* If failed, then switch back */
    
}
    
SDL_EnableKeyRepeatSDL_DEFAULT_REPEAT_DELAYSDL_DEFAULT_REPEAT_INTERVAL );
    if(
screen == NULL) {
           
fprintf(stderr,"Video-Error on window resize. Terminating\n");
           
sys_exit(1); /* If you can't switch back for some reason, then epic fail */
    
}
    
ResizeWindow(width,height);
}



/***********************************************************************
 *           get all resolution modes for SDL/OpenGL                   *
 ***********************************************************************/

sysResolution *sys_list_modesvoid ) {
    
sysResolution sysmodes;
    
SDL_Rect ** modes;
    
int imodenr;

    
modes SDL_ListModes(NULLSDL_FULLSCREEN|SDL_HWSURFACE);
    for(
i=0;modes[i];i++);
    
modenr=i;
    
sysmodes = (sysResolution *) malloc((modenr+1)*sizeof(sysResolution));
    for(
i=0;modes[i];i++){
        
sysmodes[i].modes[i]->w;
        
sysmodes[i].modes[i]->h;
    }
    
sysmodes[i].w=0;  /* terminator */
    
sysmodes[i].h=0;  /* terminator */

    
return( sysmodes );
}


(scroll till end for all of them).

Maybe its something with SDL_GetVideoSurface() ? Is looks like something with sys_resize() done wrong for us (or didn't done what we need to do). Maybe something with HWSURFACE there ?

On win32 same code works of course.

I use latest sld1 sources from repo.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

SDL destroys existing OpenGL context in most cases when SetVideoMode is called. It might explain the issue if application assumes that old context exists after display change.

On the other hand, that fullscreen toggling workaround may not be needed. SDL_WM_ToggleFullScreen works, I tried testgl with ALT+ENTER combo.

Serial logs might give more information.

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
I think i found what issues is (at least in that test code).

There is original part of code:

void sys_resizeint widthint heightint callfrom )
{

    
SDL_Surface screen;
    
Uint32 flags;

    if(
width 958width 958;      // don't resize below this
    
if(height 750height 750;
    
ignore callfrom;
    
screen SDL_GetVideoSurface();
    
flags screen->flags/* Save the current flags in case toggling fails */
    
SDL_EnableKeyRepeat0);

    
screen SDL_SetVideoModewidthheightscreen->format->BitsPerPixelscreen->flags);

    
SDL_Delay(300);
    
//fprintf(stderr,"Called x: %i y: %i\n",width,height);
    
SDL_EnableKeyRepeatSDL_DEFAULT_REPEAT_DELAYSDL_DEFAULT_REPEAT_INTERVAL );
    if(
screen == NULL) {
           
screen SDL_SetVideoMode(000flags); /* If failed, then switch back */
    
}
    
SDL_EnableKeyRepeatSDL_DEFAULT_REPEAT_DELAYSDL_DEFAULT_REPEAT_INTERVAL );
    if(
screen == NULL) {
           
fprintf(stderr,"Video-Error on window resize. Terminating\n");
           
sys_exit(1); /* If you can't switch back for some reason, then epic fail */
    
}
    
ResizeWindow(width,height);

}



And that didn't works. Window resizes , but black screen. Same to switch to fullscreen (its from another funciton, but i t also call that one in end).

But once i just change that line:

screen = SDL_SetVideoMode( width, height, screen->format->BitsPerPixel, screen->flags);

on that one:

screen = SDL_SetVideoMode( width, height, screen->format->BitsPerPixel, SDL_OPENGL | SDL_RESIZABLE);

Everything start works as expected. I.e. just change screen->flags on SDL_OPENGL | SDL_RESIZABLE.

What is more interesting, that in the debug output, flags in both cases are same OPENGL RESIZABLE. But in first case , when screen->flags is used, i have that kind of output when trying to resize window:

[os4video_SetVideoModeRequesting new video mode 958x750x32
[os4video_SetVideoModeRequested flagsOPENGL RESIZEABLE
[os4video_SetVideoModeCurrent mode 1202x750x32
[os4video_SetVideoModeCurrent mode flags OPENGL RESIZEABLE
[os4video_SetVideoModeCurrent hwdata 0x596B4794
[os4video_SetVideoModeCreating new display
[os4video_SetVideoModeDeleting old display
[os4video_GL_TermHere
[os4video_DeleteCurrentDisplayClosing window 0x62996018
[os4video_SetVideoModeOpening new display
[os4video_CreateDisplayCreating a 958x750x32 windowed display
[os4video_CreateDisplayScreen depth32 pixel format6
[os4video_GetBestWindowPositionVisible screen: (0,0)/(1920x1080)
[
os4video_OpenWindowTrying to open window at (476,149of size (958x750)
[
os4video_GL_InitInitializing MiniGL (window 0x62996018)...
[
os4video_AllocateBitMapAllocating bitmap 958*750*16
[os4video_AllocateBitMapAllocating bitmap 958*750*16
[os4video_SetVideoMode] New display created
[os4video_SetVideoModeObtained flagsOPENGL RESIZEABLE
[os4video_ShowWMCursorSetting cursor 0x639F6010
[os4video_ResetCursorCursor image set


And that one, when all works, when i only change screen->flags on SDL_OPENGL | SDL_RESIZABLE:

[os4video_SetVideoModeRequesting new video mode 1154x750x32
[os4video_SetVideoModeRequested flagsOPENGL RESIZEABLE
[os4video_SetVideoModeCurrent mode 958x750x32
[os4video_SetVideoModeCurrent mode flags OPENGL RESIZEABLE
[os4video_SetVideoModeCurrent hwdata 0x596B4794
[os4video_SetVideoModeResizing window1154x750
[os4video_PIXF2BitsUnknown pixelformat 0
[os4video_InitOffScreenBufferAllocating a 1156x752x0 off-screen buffer with pixel format 0SWSURFACE
[os4video_InitOffScreenBufferPixels 0x62E6E000pitch 1168
[os4video_AllocateBitMapAllocating bitmap 1154*750*16
[os4video_AllocateBitMapAllocating bitmap 1154*750*16
[os4video_ShowWMCursorSetting cursor 0x639FB010


See, it tries to resize then.

Question is : wtf ! Maybe that code produce something weird:

SDL_Surface screen;
screen SDL_GetVideoSurface();


So, while in serial output we have same OPENGL RESIZABLE words, it still have something else in screen->flags, which make calling of os4video_SetVideoMode's Resizing window() skips ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@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 = %d\n"flags);
     
printf("flags in hex = %x\n"flags);

     
printf("flags_from_screen in dec = %d\n"screen->flags);
     
printf("flags_from_screen in hex = %x\n"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 ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post
« 1 ... 5 6 7 (8) 9 10 11 ... 18 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project