punker69
Posts : 3 Points : 5 Join date : 2011-04-15
| Subject: KaZ help me in vlf Please. Fri Apr 15, 2011 7:57 am | |
| in your Recovery Menu 0.2
if i press "CPU Speed" there will be another Menu apear
because i wanna make example.
char= items
6.XX OFW 5.XX OFW 4.XX OFW 3.XX OFW
so if i press 6.XX OFW
there will be a new menu appeared.
6.39 6.38 6.37 6.36 6.35 | |
|
KaZ Admin
Posts : 131 Points : 204 Join date : 2010-09-20 Location : In The Sky
| Subject: Re: KaZ help me in vlf Please. Thu Apr 21, 2011 4:30 am | |
| Well Post your FULL CODE, i will HELP you fix it, i will not fix it but help you to fix it. | |
|
punker69
Posts : 3 Points : 5 Join date : 2011-04-15
| Subject: Re: KaZ help me in vlf Please. Thu Apr 21, 2011 7:42 pm | |
| Dont laugh at me Ok. I know its easy to change version.txt .I wanna Make more Cool main.C - Code:
-
#include <pspsdk.h> #include <pspkernel.h> #include <pspdebug.h> #include <pspctrl.h> #include <psprtc.h> #include <pspgu.h> #include <pspgum.h> #include <stdlib.h> #include <stdio.h> #include <vlf.h>
PSP_MODULE_INFO("Installer", 0x800, 1, 2); PSP_MAIN_THREAD_ATTR(0);
int MainMenu();
int Exit() { sceKernelExitGame(); return VLF_EV_RET_NOTHING; }
int copyFile(char * src, char * dst) { SceUID srcID = sceIoOpen(src, PSP_O_RDONLY, 0777); SceUID dstID = sceIoOpen(dst, PSP_O_CREAT | PSP_O_WRONLY, 0777);
char buffer[128 * 1024]; int read_bytes = 0;
if (srcID && dstID) { while ((read_bytes = sceIoRead(srcID, buffer, sizeof(buffer)))) { sceIoWrite(dstID, buffer, read_bytes); } sceIoClose(srcID); sceIoClose(dstID); return 0; } else { return -1; } return 0; }
void Reassign() { // Assign flashs sceIoUnassign("flash0:"); sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0); } int OnMainMenuSelect(int sel) { switch (sel) { case 0: { vlfGuiCancelCentralMenu(); vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait..."); // Print sceKernelDelayThread(500); copyFile("639/version.txt", "ms0:/seplugins/version.txt"); sceKernelDelayThread(5000); vlfGuiAddText( 100, 160 ,"Finished ! Exit with O"); vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit); return VLF_EV_RET_NOTHING; } break; case 1: { vlfGuiCancelCentralMenu(); vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait..."); // Print sceKernelDelayThread(500); copyFile("638/version.txt", "ms0:/seplugins/version.txt"); sceKernelDelayThread(5000); vlfGuiAddText( 100, 160 ,"Finished ! Exit with O"); vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit); return VLF_EV_RET_NOTHING; } break;
case 2: { vlfGuiCancelCentralMenu(); vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait..."); // Print sceKernelDelayThread(500); copyFile("637/version.txt", "ms0:/seplugins/version.txt"); vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit); while (1) { vlfGuiDrawFrame(); } return VLF_EV_RET_NOTHING; } break; case 3: { vlfGuiCancelCentralMenu(); vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait..."); // Print sceKernelDelayThread(500); copyFile("636/version.txt", "ms0:/seplugins/version.txt"); vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit); return VLF_EV_RET_NOTHING; } break; case 4: { vlfGuiCancelCentralMenu(); vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait..."); // Print sceKernelDelayThread(500); copyFile("635/version.txt", "ms0:/seplugins/version.txt"); vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit); return VLF_EV_RET_NOTHING; } break; case 5: { vlfGuiCancelCentralMenu(); vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait..."); // Print sceKernelDelayThread(500); copyFile("620/version.txt", "ms0:/seplugins/version.txt"); vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit); return VLF_EV_RET_NOTHING; } break; case 6: { vlfGuiCancelCentralMenu(); vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait..."); // Print sceKernelDelayThread(500); copyFile("610/version.txt", "ms0:/seplugins/version.txt"); vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit); return VLF_EV_RET_NOTHING; } break;
} return VLF_EV_RET_REMOVE_OBJECTS | VLF_EV_RET_REMOVE_HANDLERS; } int MainMenu(int sel) { char *items[] = { "6.39 Version.txt", "6.38 Version.txt", "6.37 Version.txt", "6.36 Version.txt", "6.35 Version.txt", "6.20 Version.txt", "6.10 Version.txt", "5.XX Version.txt", }; vlfGuiCentralMenu(7, items, sel, OnMainMenuSelect, 0, 0); vlfGuiSetPageControlEnable(1); vlfGuiSetRectangleVisibility( 0, 230, 480, 5, 0); return VLF_EV_RET_NOTHING;
}
int Title() { vlfGuiSetModelSystem(); vlfGuiSetBackgroundSystem(1); vlfGuiSetTitleBar(vlfGuiAddText( 0, 0 ,"Punker69 Easy Version.txt Changer"), NULL, 1, 1); vlfGuiAddBatteryIconSystem(10*1000*1000); vlfGuiAddClock(); vlfGuiSetPageControlEnable(0); MainMenu(0); while (1) { vlfGuiDrawFrame(); } return VLF_EV_RET_NOTHING; }
IF You can see There a 5.XX but i dont know how to add another Menu. | |
|
KaZ Admin
Posts : 131 Points : 204 Join date : 2010-09-20 Location : In The Sky
| Subject: Re: KaZ help me in vlf Please. Fri Apr 22, 2011 9:11 am | |
| Your submenu and Menu are not connected. Please Correct it Also Post the Makefile | |
|
punker69
Posts : 3 Points : 5 Join date : 2011-04-15
| Subject: Re: KaZ help me in vlf Please. Sat Apr 23, 2011 9:27 pm | |
| Makefile - Code:
-
TARGET = sample OBJS = crt0.o main.o
INCDIR = ../../include CFLAGS = -O2 -G0 -Wall -fshort-wchar -fno-pic -mno-check-zero-division CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) -c
LIBDIR = ../../lib LDFLAGS = -mno-crt0 -nostdlib -nodefaultlibs LIBS = -lvlfgui -lvlfgu -lvlfutils -lvlflibc
PSP_FW_VERSION = 271
EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = Easy Version.txt Changer
BUILD_PRX = 1 PSP_LARGE_MEMORY = 1
PSPSDK=$(shell psp-config --pspsdk-path) include ./build.mak
So if i click 5.XX version.txt there will be another menu it should be " 5.50" 5.03" "5.00" etc.... | |
|
Sponsored content
| Subject: Re: KaZ help me in vlf Please. | |
| |
|