forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SDL on Slim?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Leo28C



Joined: 18 Jan 2007
Posts: 19

PostPosted: Fri Mar 21, 2008 1:30 pm    Post subject: SDL on Slim? Reply with quote

Greetings,

How do you run an SDL game on the Slim? It ran fine on my Fat... I found this:

http://forums.ps2dev.org/viewtopic.php?t=9593&view=previous&sid=1e055c9c0dca23001f7dc3d3ad90e549

but it says to disable SDL_main, does that mean I can't use SDL? If not, how do I do that?

Thanks in advance,
Back to top
View user's profile Send private message MSN Messenger
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Fri Mar 21, 2008 1:51 pm    Post subject: Re: SDL on Slim? Reply with quote

Leo28C wrote:
Greetings,

How do you run an SDL game on the Slim? It ran fine on my Fat... I found this:

http://forums.ps2dev.org/viewtopic.php?t=9593&view=previous&sid=1e055c9c0dca23001f7dc3d3ad90e549

but it says to disable SDL_main, does that mean I can't use SDL? If not, how do I do that?

Thanks in advance,


YOu have to unlink sdlmain from your cflags, i found it easier to edit sdl-config and make two new lines for libs / cflags and remove the SDL_Main bit and replace it with --nomain
Back to top
View user's profile Send private message AIM Address
Archaemic



Joined: 18 Mar 2007
Posts: 38

PostPosted: Fri Mar 21, 2008 2:09 pm    Post subject: Reply with quote

Code:
SDL_FLAGS = $(shell $(PSPBIN)/sdl-config --cflags)
CFLAGS += $(shell echo $(SDL_FLAGS) | sed -re s/-Dmain=\\S+//) #Remove main redefinition
SDL_LIBS = $(shell $(PSPBIN)/sdl-config --libs)
LIBS += $(shell echo $(SDL_LIBS) | sed -e s/-lSDLmain//) #Remove SDLmain from libs


Have that in your makefile instead of
Code:
CFLAGS += $(shell $(PSPBIN)/sdl-config --libs --cflags)


(This won't work if you're not using a Unix-like environment for compilation, e.g. a native Windows toolchain without GnuWin32 installed)

You'll also need your own version of some of the stuff that SDLmain provides, e.g. PSP_MODULE_INFO and setting up the home callback.
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Fri Mar 21, 2008 3:35 pm    Post subject: Reply with quote

Ignore me...
Back to top
View user's profile Send private message
Leo28C



Joined: 18 Jan 2007
Posts: 19

PostPosted: Sat Mar 22, 2008 1:24 am    Post subject: Reply with quote

Wee, thanks! That did the trick. =)
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group