Code: Select all
--- src/main/psp/SDL_psp_main.c 2007-11-15 23:57:58.000000000 -0500
+++ src/main/psp/SDL_psp_main.c 2007-11-15 13:12:27.000000000 -0500
@@ -47,7 +47,11 @@
static void cleanup_output(void);
+#ifdef PSPKMODE
PSP_MODULE_INFO("SDL App", 0x1000, 1, 1);
+#else
+PSP_MODULE_INFO("SDL App", 0, 1, 1);
+#endif
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
int sdl_psp_exit_callback(int arg1, int arg2, void *common)
@@ -76,6 +80,7 @@
return thid;
}
+#ifdef PSPKMODE
void sdl_psp_exception_handler(PspDebugRegBlock *regs)
{
pspDebugScreenInit();
@@ -91,11 +96,13 @@
"\tpsp-addr2line -e target.elf -f -C 0x%x 0x%x 0x%x\n",
regs->epc, regs->badvaddr, regs->r[31]);
}
+#endif
/* If this flag is set to 1, the _init() function was called and all
global/static constructors have been called. */
static int init_was_called = 0;
+#ifdef PSPKMODE
__attribute__ ((constructor))
void loaderInit()
{
@@ -109,6 +116,7 @@
init_was_called = 1;
}
+#endif
/* Remove the output files if there was no output written */
static void cleanup_output(void)
@@ -148,6 +156,7 @@
int main(int argc, char *argv[])
{
+ #ifdef PSPKMODE
/* Fanjita's EBOOT loader can be configured to skip the call to _init().
Since we need _init() for C++, we check to see if _init() has been
called. If it hasn't we call it manually, after determining whether or
@@ -155,6 +164,7 @@
if (!init_was_called) {
_init();
}
+ #endif
pspDebugScreenInit();
sdl_psp_setup_callbacks();
Code: Select all
--- configure.in 2007-11-18 21:32:07.000000000 -0500
+++ configure.in 2007-11-18 21:29:35.000000000 -0500
@@ -1914,6 +1914,13 @@
CFLAGS="$CFLAGS -DPSPIRKEYB"
SYSTEM_LIBS="$SYSTEM_LIBS -lpspirkeyb -lpsppower"
fi
+
+ AC_ARG_ENABLE(pspkmode,
+ [ --enable-pspkmode enable PSP kernel mode functions [default=yes]],
+ , enable_pspkmode=yes)
+ if test x$enable_pspkmode = xyes ; then
+ CFLAGS="$CFLAGS -DPSPKMODE"
+ fi
}
case "$target" in