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 

[PS2] cannot build sdl on current svn

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> Patch Submissions
View previous topic :: View next topic  
Author Message
yoshi314



Joined: 26 Jul 2008
Posts: 36

PostPosted: Sun Jan 31, 2010 8:47 pm    Post subject: [PS2] cannot build sdl on current svn Reply with quote

sdl build fails because of incorrect number of parameters to gsKit_init_global. so i've digged around gsKit and found the problem.

this fix makes it build, but i would appreciate if somebody would review it and come up with proper fix. it's just a build fix so i don't know how it behaves when running - i accidentally found it when i was trying to experiment with writing my first simple sdl-based ps2 app.

Code:
diff --git a/ps2sdk-ports/sdl/src/video/ps2sdk/SDL_ps2video.c b/ps2sdk-ports/sdl/src/video/ps2sdk/SDL_ps2video.c
index ab6da81..cd50d4c 100644
--- a/ps2sdk-ports/sdl/src/video/ps2sdk/SDL_ps2video.c
+++ b/ps2sdk-ports/sdl/src/video/ps2sdk/SDL_ps2video.c
@@ -168,8 +168,10 @@ static int PS2_VideoInit(SDL_VideoDevice *device, SDL_PixelFormat *vformat)
                pal = (force_signal == 0);
        }
 
-       printf("SDL: initializing gsKit in %s mode\n", pal ? "PAL" : "NTSC");
-       gsGlobal = gsKit_init_global(pal ? GS_MODE_PAL : GS_MODE_NTSC);
+//     printf("SDL: initializing gsKit in %s mode\n", pal ? "PAL" : "NTSC");
+//     gsGlobal = gsKit_init_global(pal ? GS_MODE_PAL : GS_MODE_NTSC);
+       printf("SDL: initializing gsKit");
+       gsGlobal = gsKit_init_global();
 
        if (gsGlobal == NULL)
        {
Back to top
View user's profile Send private message
kkretro143



Joined: 31 Jan 2010
Posts: 1

PostPosted: Sun Jan 31, 2010 10:34 pm    Post subject: Reply with quote

Wow, this is cool.
Thanks a lot for the codes. =)
_________________
KidKraft Retro Play Kitchen
Back to top
View user's profile Send private message
ragnarok2040



Joined: 09 Aug 2006
Posts: 230

PostPosted: Mon Feb 01, 2010 3:29 am    Post subject: Reply with quote

That's the proper fix, :D.

I made a post detailing how to fix SDL over a year ago, for both older versions and the most recent version of gsKit. I also added information for the ability to support more display modes than NTSC or PAL.

http://forums.ps2dev.org/viewtopic.php?p=78727#78727

It doesn't look like I was that clear there but supporting different display modes are kind of unwieldy because of the way gsKit does the init all at once. For large resolution display modes, dividing the resolution's width and height by 2 or 3 will give you small framebuffer dimensions, but will be scaled to fullscreen by the output circuit. This gives the ability to display in HD modes with spare vram for texture data, even though you're not rendering HD quality graphics.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> Patch Submissions 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