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 

oslInitGfx crashes my program

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



Joined: 20 Oct 2008
Posts: 355

PostPosted: Mon Nov 17, 2008 7:01 am    Post subject: oslInitGfx crashes my program Reply with quote

no matter what i do it crashes my program even if i set true to 1 and comment out load_modules it will crash but if i comment oslInitGfx out it is ok but i cant uses oslib gfx so what am i to do the problem has been identified as oslInitGfx regardless of pixel format too anyone got any suggestions using MOD 1.0.1

Code:
#include <oslib/oslib.h>
#include "init.h"
#include "callbacks.h"

int startup()
{
   SetupCallbacks();
   oslInit(OSL_IF_USEOWNCALLBACKS);
   oslInitAudio();
   oslIntraFontInit(INTRAFONT_CACHE_MED);
   oslInitGfx(OSL_PF_8888,true);
   load_modules();
   oslPrintf("loading modules");
   oslPrintf("oslstarted");
   return 0;
}
Back to top
View user's profile Send private message MSN Messenger
pspjoke



Joined: 23 Jun 2008
Posts: 14

PostPosted: Tue Nov 18, 2008 12:24 am    Post subject: Reply with quote

Code:
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);

_________________
The people here make me feel like shit :/
Way to advanced... (hate being a programming noob.)
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Nov 18, 2008 8:59 am    Post subject: Reply with quote

If the program is a prx, you'll also need to set the heap size. If you use more than 256 KB of stack, you'll also need to set the stack size.
Back to top
View user's profile Send private message AIM Address
coolkehon



Joined: 20 Oct 2008
Posts: 355

PostPosted: Wed Nov 19, 2008 7:38 am    Post subject: Reply with quote

i figured it out it was the heap size but now the screen just goes black and i cant do anything with it so how do i fix that and pspdebugscreenprintf stops working after that too
Back to top
View user's profile Send private message MSN Messenger
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Nov 19, 2008 10:27 am    Post subject: Reply with quote

coolkehon wrote:
i figured it out it was the heap size but now the screen just goes black and i cant do anything with it so how do i fix that and pspdebugscreenprintf stops working after that too


Use the debug prints to figure out where the program goes out to lunch, then post the code around that point. Also remember that debug prints generally won't show if you start using the GU yourself.
Back to top
View user's profile Send private message AIM Address
Kreationz



Joined: 18 May 2008
Posts: 53

PostPosted: Wed Nov 19, 2008 11:29 am    Post subject: Reply with quote

Unless you use PSPlink then you can see the debug messages on the PC you are using with it.
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 -> 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