Psp Utility Diagram over sdl

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Psp Utility Diagram over sdl

Post by coolkehon »

i searched and found one thread using psputility but it was using SDL_gl but i'm wanting to use just plain old SDL at the moment how can i use sdl and still be able to use dialogs like web browser, keyboard, net, etc...
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

You'll probably need to stop rendering first. Does it have a separate draw/render loop? If it does then set a flag outside and pause the loop then it *shouldn't* conflict with utility dialogs.
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

i didnt see any separate render loop when i try to update the utility where its supposed to draw it it doesnt it only draws what it draws and i looked at the source code of sdl and saw no way to update the gu therefore i cant update the utility
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

besides what i posted is there now way to get this to work
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

SDL has to have a loop or you wouldn't be rendering. It usually ends with something like SDL_UpdateRects and/or SDL_Flip. As long as you interrupt the main loop, you can always do your own rendering, then go back to the loop.
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

yeah thats the problem i couldnt find the way to interupt the main loop it just blits all at once i'm a newbie at sdl got any ideas cause i'm lost i even looked at source and saw no way it looks like it draw the entire buffer to screen and flips but how can i intercept that
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Just put a call to your code after the flip. Do the GU init, do the utility thingy, then finally do the same init that's in SDL to leave it in a state SDL can use, then return back to the SDL loop.
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

yeah well i'm busy working on numerous other things besides college right now so i will have to get back to this but thanks for your help and i'll try it some time
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

ya know what i'm still trying to get this working and i cant get it working at all i've tried everything i could really use some help on this because i dont know what to do i'm new to hooking and the dialogs and SDL but want to use a library thats portable and switch from oslib but want the dialogs for savestate,htmlviewer,etc like keyboard can someone help me figure this out its probably something simple i got the thing to come up it just flashes though and i dont even know where to begin with htmlviewer because it has to have a pointer to display list i think

here is my code
http://www.sendspace.com/file/bdyl80

edit: looked at source more and found that there is a SDL_VideoDevice struct that i dont even have access to how can i fix this although i though i could just update the gu after SDL_flip but was wrong because it flickers and i would like to have this not filcker (cool website though) anyone help would be greatly appreciated all these views and not post man comeone give me some help[/code]
Post Reply