Create a single thread for each patch to be added to the repository. Please try to stay on topic.
- Posts: 36
- Joined: Sat Jul 26, 2008 11:19 pm
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: Select all
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
@@ -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)
- Posts: 1
- Joined: Sun Jan 31, 2010 10:19 pm
Wow, this is cool.
Thanks a lot for the codes. =)
- Posts: 202
- Joined: Wed Aug 09, 2006 1:00 am
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.
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.
- Posts: 47
- Joined: Mon Jan 03, 2022 10:15 am
- Location: http://product-of-china.cf/
Is 537 built yet so I can test it?? There was a problem that images couldnt be generated from the video file. I wanted to see if this was working.