Skip to content

Commit fd10c8b

Browse files
committed
Minor adjustments
- Increase default file buffer size for FTP - Remove unused include statments from main.c - Allow screenshots to be taken in FTP mode.
1 parent bed86a6 commit fd10c8b

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

app/source/ftppsp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#define UNUSED(x) (void)(x)
2121

2222
#define FTP_PORT 1337
23-
#define DEFAULT_FILE_BUF_SIZE (1 * 1024)
23+
#define DEFAULT_FILE_BUF_SIZE (1 * 1024 * 1024)
2424

2525
#define FTP_DEFAULT_PATH "/"
2626

app/source/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
#include <pspctrl.h>
33
#include <pspkernel.h>
44
#include <psppower.h>
5-
#include <pspsdk.h>
65
#include <sys/unistd.h>
76

87
#include "common.h"
98
#include "config.h"
10-
#include "fs.h"
119
#include "menus/menu_main.h"
1210
#include "kubridge.h"
1311
#include "systemctrl.h"

app/source/menus/menu_ftp.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "dirbrowse.h"
1515
#include "ftppsp.h"
1616
#include "glib2d_helper.h"
17+
#include "screenshot.h"
1718
#include "status_bar.h"
1819
#include "textures.h"
1920
#include "utils.h"
@@ -44,7 +45,6 @@ int FTP_DisplayNetDialog(void) {
4445

4546
while(running) {
4647
g2dClear(BLACK_BG);
47-
StatusBar_DisplayTime();
4848
g2dFlip(G2D_VSYNC);
4949

5050
switch(sceUtilityNetconfGetStatus()) {
@@ -113,13 +113,18 @@ void Menu_DisplayFTP(void) {
113113

114114
FTP_DisplayNetDialog();
115115

116-
if (running == 0) {
117-
FTP_NetTerm();
118-
return;
119-
}
120-
121116
ret = ftppsp_init(psp_ip, &psp_port);
122-
ftppsp_add_device("ms0:/");
117+
118+
if (is_psp_go) {
119+
if (is_ms_inserted) {
120+
ftppsp_add_device("ms0:");
121+
ftppsp_add_device("ef0:");
122+
}
123+
else
124+
ftppsp_add_device("ef0:");
125+
}
126+
else
127+
ftppsp_add_device("ms0:");
123128

124129
char *msg = malloc(64);
125130

@@ -161,6 +166,9 @@ void Menu_DisplayFTP(void) {
161166

162167
Utils_ReadControls();
163168

169+
if (((Utils_IsButtonHeld(PSP_CTRL_LTRIGGER)) && (Utils_IsButtonPressed(PSP_CTRL_RTRIGGER))) || ((Utils_IsButtonHeld(PSP_CTRL_RTRIGGER)) && (Utils_IsButtonPressed(PSP_CTRL_LTRIGGER))))
170+
Screenshot_Capture();
171+
164172
if ((Utils_IsButtonPressed(PSP_CTRL_ENTER)) || (Utils_IsButtonPressed(PSP_CTRL_CANCEL))) {
165173
sceKernelDelayThread(100 * 1000);
166174
break;

0 commit comments

Comments
 (0)