Skip to content

Commit

Permalink
Put in a basic game check
Browse files Browse the repository at this point in the history
  • Loading branch information
Zero1UP committed Feb 12, 2020
1 parent 2485dca commit 3d67be9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
26 changes: 19 additions & 7 deletions fragmentPatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <sbv_patches.h>
#include "menu.h"


#define _RESIDENT_ __attribute__((section(".resident")))
#define DEBUG
#define ERROR_HAX0R -4
Expand Down Expand Up @@ -69,6 +68,7 @@ void initalise(void)
int ret;

SifInitRpc(0);

// init debug screen
init_scr();
// load all modules
Expand Down Expand Up @@ -533,7 +533,7 @@ int getVTblAddr(void)
}
void startGame()
{
scr_printf(" Loading... ");


//wait for CD to spin up
int cdWait = 6;
Expand All @@ -548,11 +548,23 @@ void startGame()

if(cdWait == 2)
{
// Shutdown
padPortClose(0, 0);

SifExitRpc();
LoadExecPS2("cdrom0:\\SLPS_255.27;1", 0, NULL);
FILE* fp = fopen("cdrom0:\\SLPS_255.27", "r");


if (fp == NULL)
{
scr_printf("\n Please insert the fragment game disk and restart the ps2 / emulator.");
}
else
{
scr_printf(" \n Loading Fragment");
// Shutdown
padPortClose(0, 0);
SifExitRpc();
LoadExecPS2("cdrom0:\\SLPS_255.27;1", 0, NULL);

}

}

}
2 changes: 1 addition & 1 deletion menu.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "menu.h"
void menu_DisplayMain(void)
{
char *currentVersion = "Patch Version: 1.0.5\n";
char *currentVersion = "Patch Version: 1.0.6\n";

scr_printf(".hack//Fragment Patcher by 1UP\n");
scr_printf(currentVersion);
Expand Down

0 comments on commit 3d67be9

Please sign in to comment.