From 695d2b7bf91598c96dbcb9d51dce05c5011765c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Israelson?= <57065102+israpps@users.noreply.github.com> Date: Wed, 6 Sep 2023 15:03:58 -0300 Subject: [PATCH 1/4] Update dvdplayer.c --- src/dvdplayer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dvdplayer.c b/src/dvdplayer.c index 4e2638e..4e153d6 100644 --- a/src/dvdplayer.c +++ b/src/dvdplayer.c @@ -54,9 +54,8 @@ static int readMCFile(int fd, void *buffer, int len) static int ReadFileFromMC(int port, int slot, const char *file, void *buffer, int len) { int fd, bytesRead; - int result; - if ((result = getStatMC(port, slot, NULL, NULL, NULL)) >= -2) { + if (getStatMC(port, slot, NULL, NULL, NULL) >= -2) { if ((fd = openMCFile(port, slot, file, 1)) >= 0) { if ((bytesRead = readMCFile(fd, buffer, len)) < 0) return -1; From 456c804b7e6fb191743c370654f4ab3581ff2b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Israelson?= <57065102+israpps@users.noreply.github.com> Date: Wed, 6 Sep 2023 15:06:12 -0300 Subject: [PATCH 2/4] Update dvdplayer.c --- src/dvdplayer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dvdplayer.c b/src/dvdplayer.c index 4e153d6..2118773 100644 --- a/src/dvdplayer.c +++ b/src/dvdplayer.c @@ -207,9 +207,7 @@ static int DVDPlayerUpdateCheck(int *pPort, int *pSlot, char *pVersion) static int DVDPlayerGetUpdateVersion(const char *file, int *pPort, int *pSlot) { - int result; - - if ((result = DVDPlayerUpdateCheck(pPort, pSlot, NULL)) == 0) { // DVD Player update of the right region exists and is newer. + if (DVDPlayerUpdateCheck(pPort, pSlot, NULL) == 0) { // DVD Player update of the right region exists and is newer. return (CheckFileFromMC(*pPort, *pSlot, file) == 0 ? 0 : -1); } From 8af6ecb37cc5d9fc62d2d6380cae29d5092f1fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Israelson?= <57065102+israpps@users.noreply.github.com> Date: Wed, 6 Sep 2023 15:58:20 -0300 Subject: [PATCH 3/4] Update modelname.c --- src/modelname.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modelname.c b/src/modelname.c index 2e40834..a70cb89 100644 --- a/src/modelname.c +++ b/src/modelname.c @@ -17,7 +17,6 @@ extern char ConsoleROMVER[]; static int ReadModelName(char *name) { - int result; u32 stat; /* This function is a hybrid between the late ROM browser program and the HDD Browser. @@ -51,7 +50,7 @@ static int ReadModelName(char *name) return 0; // Original returned -1 } else { - if ((result = sceCdRM(name, &stat)) == 1) { // Command issued successfully. + if (sceCdRM(name, &stat) == 1) { // Command issued successfully. if (stat & 0x80) return -2; if ((stat & 0x40) || name[0] == '\0') From 3dba08df9f419b4d52b3daf868fd960833d688cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Israelson?= <57065102+israpps@users.noreply.github.com> Date: Wed, 6 Sep 2023 16:01:36 -0300 Subject: [PATCH 4/4] Update libcdvd_add.c --- src/libcdvd_add.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libcdvd_add.c b/src/libcdvd_add.c index 9e38f02..a8e4327 100644 --- a/src/libcdvd_add.c +++ b/src/libcdvd_add.c @@ -11,14 +11,14 @@ static unsigned char MECHACON_CMD_S36_supported = 0, MECHACON_CMD_S27_supported // Initialize add-on functions. Currently only retrieves the MECHACON's version to determine what sceCdAltGetRegionParams() should do. int cdInitAdd(void) { - int result, i; + int i; u32 status; u8 MECHA_version_data[3]; unsigned int MECHA_version; // Like how CDVDMAN checks sceCdMV(), do not continuously attempt to get the MECHACON version because some consoles (e.g. DTL-H301xx) can't return one. for (i = 0; i <= 100; i++) { - if ((result = sceCdMV(MECHA_version_data, &status)) != 0 && ((status & 0x80) == 0)) { + if ((sceCdMV(MECHA_version_data, &status) != 0) && ((status & 0x80) == 0)) { MECHA_version = MECHA_version_data[2] | ((unsigned int)MECHA_version_data[1] << 8) | ((unsigned int)MECHA_version_data[0] << 16); MECHACON_CMD_S36_supported = (0x5FFFF < MECHA_version); // v6.0 and later MECHACON_CMD_S27_supported = (0x501FF < MECHA_version); // v5.2 and later @@ -26,9 +26,6 @@ int cdInitAdd(void) return 0; } } - - // printf("Failed to get MECHACON version: %d 0x%x\n", result, status); - return -1; }