| View previous topic :: View next topic |
| Author |
Message |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Mon Nov 17, 2008 7:01 am Post subject: oslInitGfx crashes my program |
|
|
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 |
|
 |
pspjoke
Joined: 23 Jun 2008 Posts: 14
|
Posted: Tue Nov 18, 2008 12:24 am Post subject: |
|
|
| 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 |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Tue Nov 18, 2008 8:59 am Post subject: |
|
|
| 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 |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Wed Nov 19, 2008 7:38 am Post subject: |
|
|
| 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 |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Nov 19, 2008 10:27 am Post subject: |
|
|
| 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 |
|
 |
Kreationz
Joined: 18 May 2008 Posts: 53
|
Posted: Wed Nov 19, 2008 11:29 am Post subject: |
|
|
| Unless you use PSPlink then you can see the debug messages on the PC you are using with it. |
|
| Back to top |
|
 |
|