oslInitGfx crashes my program

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

oslInitGfx crashes my program

Post by coolkehon »

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: Select all

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

int startup&#40;&#41;
&#123;
	SetupCallbacks&#40;&#41;;
	oslInit&#40;OSL_IF_USEOWNCALLBACKS&#41;;
	oslInitAudio&#40;&#41;;
	oslIntraFontInit&#40;INTRAFONT_CACHE_MED&#41;;
	oslInitGfx&#40;OSL_PF_8888,true&#41;;
	load_modules&#40;&#41;;
	oslPrintf&#40;"loading modules"&#41;;
	oslPrintf&#40;"oslstarted"&#41;;
	return 0;
&#125;
pspjoke
Posts: 14
Joined: Mon Jun 23, 2008 10:10 am

Post by pspjoke »

Code: Select all

PSP_MAIN_THREAD_ATTR&#40;THREAD_ATTR_USER | THREAD_ATTR_VFPU&#41;;
The people here make me feel like shit :/
Way to advanced... (hate being a programming noob.)
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

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
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
Kreationz
Posts: 52
Joined: Sun May 18, 2008 11:01 am

Post by Kreationz »

Unless you use PSPlink then you can see the debug messages on the PC you are using with it.
Post Reply