Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
150 user(s) are online (110 user(s) are browsing Forums)

Members: 1
Guests: 149

TheMagicSN, more...

Support us!

Headlines

 
  Register To Post  

Adding an Amiga menu to an SDL1 window?
Amigans Defender
Amigans Defender


See User information
Is there a way to add a menu to an SDL1 window? I can see that the 68K port of SDL provides functions to access the underlying Intuition window pointer, allowing you to add an Amiga menu to the window, namely:

SDL_AmigaLockWindow()
SDL_AmigaWindowAddr()
SDL_AmigaUnlockWindow()


but I don't see these functions implemented in the OS4 version of SDL 1.2.

I need to use SDL1 rather than SDL2 because that's what the port I'm working on uses.

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: Adding an Amiga menu to an SDL1 window?
Home away from home
Home away from home


See User information
@trixie

SDL.
Simple DirectMedia Layer is a cross-platform development library..

Now if you started adding Amiga, MacOS, Windows, C64, Unix and Linux, api's to it, it wont be cross platform anymore.

Should menu be a standard API sdl perhaps, but mostly aimed at games.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Adding an Amiga menu to an SDL1 window?
Just can't stay away
Just can't stay away


See User information

Go to top
Re: Adding an Amiga menu to an SDL1 window?
Amigans Defender
Amigans Defender


See User information
@Capehill

Thank you, I'll give it a try!

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: Adding an Amiga menu to an SDL1 window?
Just can't stay away
Just can't stay away


See User information
@trixie

I have something like this to get SDL1 window struct:
#include "SDL/SDL_syswm.h"
struct Window *AmigaOS_GetSDLWindowPtr(void)
{
  
SDL_SysWMinfo wmInfo;

  
SDL_GetWMInfo(&wmInfo);
  return( (
struct Window*)wmInfo.window );
}

Go to top
Re: Adding an Amiga menu to an SDL1 window?
Home away from home
Home away from home


See User information
@jabirulo

Mmm do you think we can use something for the project we are working on hint hint

Go to top
Re: Adding an Amiga menu to an SDL1 window?
Just can't stay away
Just can't stay away


See User information
@jabirulo

Your example is ignoring the return value of SDL_GetWMInfo function and it has a superfluous cast to struct Window *.

Go to top
Re: Adding an Amiga menu to an SDL1 window?
Just can't stay away
Just can't stay away


See User information
@Capehill

thx fixed to:
..
  if(
SDL_GetWMInfo(&wmInfo) == 1) { return(wmInfo.window); }

  return(
NULL);
}


@Samir
it exists since "aaages" in our update/port, but didn't try to add menus to SDL/GL windows yet.

Go to top

  Register To Post

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project