Maku
Joined: 16 Jun 2009 Posts: 2
|
Posted: Mon Sep 14, 2009 5:06 am Post subject: Can't load PRX after unloading. |
|
|
I'm working on small prx which will be started from XMB (by overriding a update_plugin.prx). Problem is that after I start it once (plugin prints menu over vsh)I can start it again even that I try to unload the module every time. To get menu showing again it I have to reboot the console, or start and close any game.
Source code:
| Code: | #include <pspkernel.h>
#include <pspctrl.h>
#include <stdio.h>
#include <stdlib.h>
#include <pspkerror.h>
PSP_MODULE_INFO("Shutdown", 0x800, 1, 0);
int main (int argc, char **argv) //(int argc, char* argv[])
{
pspDebugScreenInit();
while(0x80020143 == sceKernelSelfStopUnloadModule(1, 0, NULL))
{
pspDebugScreenSetXY(1,1);
pspDebugScreenPrintf("%s", "busy!");
sceKernelDelayThread(10000);
}
return 0;
} |
Makefile:
| Code: | TARGET = update_plugin
OBJS = main.o
BUILD_PRX=1
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak |
|
|