Skip to content

Commit

Permalink
fix minor menu inconsistencies, clean up legacy files and code
Browse files Browse the repository at this point in the history
  • Loading branch information
rsn8887 committed Nov 13, 2018
1 parent a100fce commit 812342c
Show file tree
Hide file tree
Showing 225 changed files with 148 additions and 253 deletions.
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ if(BUILD_PSP2)
-DSHM_SUPPORT_LINKS=0 -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS -DOS_WITHOUT_MEMORY_MANAGEMENT
-DROM_PATH_PREFIX=\"ux0:/data/uae4all/roms/\" -DDATA_PREFIX=\"app0:/data/\" -DSAVE_PREFIX=\"ux0:/data/uae4all/saves/\"
-DUSE_UAE4ALL_VKBD
-DVKBD_ALWAYS
-DLARGEKEYBOARD
-DUSE_ARMV7
-DUSE_ARMNEON
-marm -mfpu=neon -mcpu=cortex-a9 -march=armv7-a -mfloat-abi=hard -ffast-math
Expand Down Expand Up @@ -179,7 +177,7 @@ if(BUILD_PSP2)
COMMAND ${VITASDK}/bin/vita-mksfoex -s TITLE_ID=${TITLEID} "${PROJECT_NAME}" vpk/sce_sys/param.sfo
COMMAND cp ${PROJECT_NAME}.self vpk/eboot.bin
COMMAND cp -r ${CMAKE_SOURCE_DIR}/psp2data/* vpk
COMMAND cd vpk && zip -r ../uae4all-${BUILD_DATE}.vpk . && cd ..
COMMAND cd vpk && zip -r ../uae4all_${VERSION_MAJOR}.${VERSION_MINOR}.vpk . && cd ..
)
endif(BUILD_PSP2)

Expand Down Expand Up @@ -218,8 +216,6 @@ if(BUILD_NX)
-DDATA_PREFIX=\"./data/\"
-DSAVE_PREFIX=\"./saves/\"
-DUSE_UAE4ALL_VKBD
-DVKBD_ALWAYS
-DLARGEKEYBOARD
)

set(FLAGS
Expand Down
16 changes: 12 additions & 4 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
Changes in this Version
======
1.75 (WIP)
1.75

- fix crash when booting a floppy with floppy speed >1x
- fixed crash when booting a floppy with floppy speed >1x
- fixed inconsistencies in menu navigation
- enabled long filename display in file browser (hold Triangle or X to show it)
- fixed an issue where HD Dir could not be selected unless Boot HD was set to OFF
- removed legacy code and data files that were not needed

Description
=====
Expand Down Expand Up @@ -199,9 +203,13 @@ Mouse + keyboard tested working with the "Jelly Comb Mini Bluetooth Keyboard Wit

CHANGELOG
=====
1.75 (WIP)
1.75

- fix crash when booting a floppy with floppy speed >1x
- fixed crash when booting a floppy with floppy speed >1x
- fixed inconsistencies in menu navigation
- enabled long filename display in file browser (hold Triangle or X to show it)
- fixed an issue where HD Dir could not be selected unless Boot HD was set to OFF
- removed legacy code and data files that were not needed

1.74 (Switch only)

Expand Down
Binary file removed psp2data/data/click.wav
Binary file not shown.
Binary file removed psp2data/data/gp2xsplash.bmp
Binary file not shown.
Binary file removed psp2data/data/joystick.bmp
Binary file not shown.
Binary file removed psp2data/data/key0.bmp
Binary file not shown.
Binary file removed psp2data/data/key1.bmp
Binary file not shown.
Binary file removed psp2data/data/key10.bmp
Binary file not shown.
Binary file removed psp2data/data/key11.bmp
Binary file not shown.
Binary file removed psp2data/data/key12.bmp
Binary file not shown.
Binary file removed psp2data/data/key13.bmp
Binary file not shown.
Binary file removed psp2data/data/key14.bmp
Binary file not shown.
Binary file removed psp2data/data/key15.bmp
Binary file not shown.
Binary file removed psp2data/data/key16.bmp
Binary file not shown.
Binary file removed psp2data/data/key17.bmp
Binary file not shown.
Binary file removed psp2data/data/key18.bmp
Binary file not shown.
Binary file removed psp2data/data/key19.bmp
Binary file not shown.
Binary file removed psp2data/data/key2.bmp
Binary file not shown.
Binary file removed psp2data/data/key20.bmp
Binary file not shown.
Binary file removed psp2data/data/key21.bmp
Binary file not shown.
Binary file removed psp2data/data/key22.bmp
Binary file not shown.
Binary file removed psp2data/data/key23.bmp
Binary file not shown.
Binary file removed psp2data/data/key24.bmp
Binary file not shown.
Binary file removed psp2data/data/key25.bmp
Binary file not shown.
Binary file removed psp2data/data/key26.bmp
Binary file not shown.
Binary file removed psp2data/data/key27.bmp
Binary file not shown.
Binary file removed psp2data/data/key28.bmp
Binary file not shown.
Binary file removed psp2data/data/key29.bmp
Binary file not shown.
Binary file removed psp2data/data/key3.bmp
Binary file not shown.
Binary file removed psp2data/data/key30.bmp
Binary file not shown.
Binary file removed psp2data/data/key31.bmp
Binary file not shown.
Binary file removed psp2data/data/key32.bmp
Binary file not shown.
Binary file removed psp2data/data/key33.bmp
Binary file not shown.
Binary file removed psp2data/data/key34.bmp
Binary file not shown.
Binary file removed psp2data/data/key35.bmp
Binary file not shown.
Binary file removed psp2data/data/key36.bmp
Binary file not shown.
Binary file removed psp2data/data/key37.bmp
Binary file not shown.
Binary file removed psp2data/data/key38.bmp
Binary file not shown.
Binary file removed psp2data/data/key39.bmp
Binary file not shown.
Binary file removed psp2data/data/key4.bmp
Binary file not shown.
Binary file removed psp2data/data/key40.bmp
Binary file not shown.
Binary file removed psp2data/data/key41.bmp
Binary file not shown.
Binary file removed psp2data/data/key42.bmp
Binary file not shown.
Binary file removed psp2data/data/key43.bmp
Binary file not shown.
Binary file removed psp2data/data/key44.bmp
Binary file not shown.
Binary file removed psp2data/data/key45.bmp
Binary file not shown.
Binary file removed psp2data/data/key46.bmp
Binary file not shown.
Binary file removed psp2data/data/key47.bmp
Binary file not shown.
Binary file removed psp2data/data/key48.bmp
Binary file not shown.
Binary file removed psp2data/data/key49.bmp
Binary file not shown.
Binary file removed psp2data/data/key5.bmp
Binary file not shown.
Binary file removed psp2data/data/key50.bmp
Binary file not shown.
Binary file removed psp2data/data/key51.bmp
Binary file not shown.
Binary file removed psp2data/data/key52.bmp
Binary file not shown.
Binary file removed psp2data/data/key53.bmp
Binary file not shown.
Binary file removed psp2data/data/key54.bmp
Binary file not shown.
Binary file removed psp2data/data/key55.bmp
Binary file not shown.
Binary file removed psp2data/data/key56.bmp
Binary file not shown.
Binary file removed psp2data/data/key57.bmp
Binary file not shown.
Binary file removed psp2data/data/key58.bmp
Binary file not shown.
Binary file removed psp2data/data/key59.bmp
Binary file not shown.
Binary file removed psp2data/data/key6.bmp
Binary file not shown.
Binary file removed psp2data/data/key60.bmp
Binary file not shown.
Binary file removed psp2data/data/key61.bmp
Binary file not shown.
Binary file removed psp2data/data/key62.bmp
Binary file not shown.
Binary file removed psp2data/data/key63.bmp
Binary file not shown.
Binary file removed psp2data/data/key64.bmp
Binary file not shown.
Binary file removed psp2data/data/key65.bmp
Binary file not shown.
Binary file removed psp2data/data/key66.bmp
Binary file not shown.
Binary file removed psp2data/data/key67.bmp
Binary file not shown.
Binary file removed psp2data/data/key68.bmp
Binary file not shown.
Binary file removed psp2data/data/key69.bmp
Binary file not shown.
Binary file removed psp2data/data/key7.bmp
Binary file not shown.
Binary file removed psp2data/data/key70.bmp
Binary file not shown.
Binary file removed psp2data/data/key71.bmp
Binary file not shown.
Binary file removed psp2data/data/key72.bmp
Binary file not shown.
Binary file removed psp2data/data/key73.bmp
Binary file not shown.
Binary file removed psp2data/data/key74.bmp
Binary file not shown.
Binary file removed psp2data/data/key75.bmp
Binary file not shown.
Binary file removed psp2data/data/key76.bmp
Binary file not shown.
Binary file removed psp2data/data/key77.bmp
Binary file not shown.
Binary file removed psp2data/data/key78.bmp
Binary file not shown.
Binary file removed psp2data/data/key79.bmp
Binary file not shown.
Binary file removed psp2data/data/key8.bmp
Binary file not shown.
Binary file removed psp2data/data/key80.bmp
Binary file not shown.
Binary file removed psp2data/data/key81.bmp
Binary file not shown.
Binary file removed psp2data/data/key82.bmp
Binary file not shown.
Binary file removed psp2data/data/key83.bmp
Binary file not shown.
Binary file removed psp2data/data/key84.bmp
Binary file not shown.
Binary file removed psp2data/data/key85.bmp
Binary file not shown.
Binary file removed psp2data/data/key86.bmp
Binary file not shown.
Binary file removed psp2data/data/key87.bmp
Binary file not shown.
Binary file removed psp2data/data/key88.bmp
Binary file not shown.
Binary file removed psp2data/data/key89.bmp
Binary file not shown.
Binary file removed psp2data/data/key9.bmp
Binary file not shown.
Binary file removed psp2data/data/key90.bmp
Binary file not shown.
Binary file removed psp2data/data/key91.bmp
Binary file not shown.
Binary file removed psp2data/data/key92.bmp
Binary file not shown.
Binary file removed psp2data/data/key93.bmp
Binary file not shown.
Binary file removed psp2data/data/key98.bmp
Binary file not shown.
Binary file removed psp2data/data/keyboard.bmp
Binary file not shown.
Binary file removed psp2data/data/logo dev.xcf
Binary file not shown.
Binary file removed psp2data/data/mouse.bmp
Binary file not shown.
Binary file removed psp2data/data/music.mod
Binary file not shown.
Binary file removed psp2data/data/remapping.bmp
Binary file not shown.
Binary file removed psp2data/data/splash.bmp
Binary file not shown.
Binary file removed psp2data/data/vkbd.bmp
Binary file not shown.
Binary file removed psp2data/data/vkbdHires.bmp
Binary file not shown.
3 changes: 2 additions & 1 deletion src/gp2x/inputmode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern int gp2xMouseEmuOn, gp2xButtonRemappingOn, show_inputmode;

void inputmode_init(void)
{
#if !defined(__PSP2__) && !defined(__SWITCH__)
int i;
char tmpchar[256];
SDL_Surface* tmp;
Expand Down Expand Up @@ -52,7 +53,7 @@ void inputmode_init(void)
inputMode[2] = SDL_DisplayFormat(tmp);
SDL_FreeSurface(tmp);
}

#endif
show_inputmode = 0;
}

Expand Down
2 changes: 2 additions & 0 deletions src/gp2x/menu/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,9 @@ void init_text(int splash)
int i,j;

obten_colores();
#if !defined(__SWITCH__) && !defined(__PSP2__)
if (skipintro)
#endif
goto skipintro;
tmp=SDL_LoadBMP(MENU_FILE_SPLASH);
if (tmp==NULL)
Expand Down
18 changes: 14 additions & 4 deletions src/gp2x/menu/menu_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,11 @@ int saveconfig(int general)

void loadconfig(int general)
{
// general == 0 (default): loading disk specific config after inserting floppy #1
// general == 1: first time, loading general config
// general == 2: loading hdf-file-specific config after inserting hdf file #1
// general == 3: loading config from guichan (unused)
// general == 4: loading hd-dir-specific config after selecting hd dir
#if defined(__PSP2__) || defined(__SWITCH__)
if (general == 1)
{
Expand Down Expand Up @@ -1418,15 +1423,20 @@ void loadconfig(int general)
snprintf(path, 300, config_filename, launchDir);
else if(general == 0)
create_configfilename(path, uae4all_image_file0, 0);
else {
else if (general == 2) {
path[0] = '\0';
if(mainMenu_bootHD == 1 && uae4all_hard_dir[0] != '\0')
create_configfilename(path, uae4all_hard_dir, 1);
if(mainMenu_bootHD == 2 && uae4all_hard_file0[0] != '\0')
if(uae4all_hard_file0[0] != '\0')
create_configfilename(path, uae4all_hard_file0, 0);
if(path[0] == '\0')
return;
}
else if (general == 4) {
path[0] = '\0';
if(uae4all_hard_dir[0] != '\0')
create_configfilename(path, uae4all_hard_dir, 1);
if(path[0] == '\0')
return;
}

FILE *f=fopen(path,"rt");
if (!f) {
Expand Down
18 changes: 13 additions & 5 deletions src/gp2x/menu/menu_controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,15 +688,18 @@ static int key_controlsMenu(int *c)
case SDLK_LEFT: left=1; break;
case SDLK_UP: up=1; break;
case SDLK_DOWN: down=1; break;
case SDLK_PAGEDOWN: hit0=1; break;
case SDLK_HOME: hit0=1; break;
case SDLK_LALT: hit1=1; break;
case SDLK_END: hit0=1; break;
case SDLK_PAGEUP: del=1; break; //Note: PAGEUP is Triangle on Vita
case SDLK_LCTRL: hit2=1; break; //allow user to quit menu completely at any time
//note SDLK_CTRL corresponds to ButtonSelect on Vita
#if defined(__PSP2__) || defined(__SWITCH__)
case SDLK_RSHIFT: hit3=1; break; //SDLK_RSHIFT is triggerL on Vita
case SDLK_PAGEDOWN: hit0=1; break; //SDLK_PAGEDOWN is the ok button on Vita
case SDLK_END: hit1=1; break; // SDLK_END is the cancel button on Vita
#else
case SDLK_HOME: hit0=1; break;
case SDLK_PAGEDOWN: hit0=1; break;
case SDLK_LALT: hit1=1; break;
case SDLK_END: hit0=1; break;
#endif
}
}
Expand All @@ -718,10 +721,12 @@ static int key_controlsMenu(int *c)
init_joystick();
}
#endif
#if !defined(__PSP2__) && !defined(__SWITCH__)
else if (hit0)
{
end = -1;
}
#endif
else if (hit1)
{
end = -1;
Expand Down Expand Up @@ -761,7 +766,10 @@ static int key_controlsMenu(int *c)
mainMenu_onScreen = !mainMenu_onScreen;
break;
#endif

case MENUCONTROLS_RETURNMAIN:
if (hit0)
end = -1;
break;
case MENUCONTROLS_CUSTOM_ON_OFF:
if ((left)||(right))
{
Expand Down
16 changes: 13 additions & 3 deletions src/gp2x/menu/menu_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ enum {
MENUDISPLAY_SHADER,
#endif
MENUDISPLAY_STATUSLINE,
#if defined(USE_UAE4ALL_VKBD) && defined(LARGEKEYBOARD)
#if defined(USE_UAE4ALL_VKBD)
MENUDISPLAY_VKBDLANGUAGE,
#endif
MENUDISPLAY_BACKGROUND,
Expand Down Expand Up @@ -328,7 +328,7 @@ static void draw_displayMenu(int c)
else
write_text(tabstop3, menuLine,"On");

#if defined(USE_UAE4ALL_VKBD) && defined(LARGEKEYBOARD)
#if defined(USE_UAE4ALL_VKBD)
// MENUDISPLAY_VKBDLANGUAGE
menuLine+=2;
write_text(leftMargin,menuLine,"Keyboard");
Expand Down Expand Up @@ -466,10 +466,14 @@ static int key_displayMenu(int *c)
case SDLK_UP: up=1; break;
case SDLK_DOWN: down=1; break;
case SDLK_PAGEDOWN: hit0=1; break;
#if defined(__PSP2__) || defined(__SWITCH__)
case SDLK_END: hit1=1; break;
#else
case SDLK_HOME: hit0=1; break;
case SDLK_LALT: hit1=1; break;
case SDLK_END: hit0=1; break;
case SDLK_PAGEUP: hit0=1;
#endif
case SDLK_LCTRL: hit2=1; break; //allow user to quit menu completely at any time
//note SDLK_CTRL corresponds to ButtonSelect on Vita
}
Expand All @@ -482,10 +486,12 @@ static int key_displayMenu(int *c)
quit_pressed_in_submenu = 1; //Tell the mainMenu to cancel, too
}
}
#if !defined(__PSP2__) && !defined(__SWITCH__)
else if (hit0)
{
end = -1;
}
#endif
else if (hit1)
{
end = -1;
Expand All @@ -502,6 +508,10 @@ static int key_displayMenu(int *c)
}
switch (menuDisplay)
{
case MENUDISPLAY_RETURNMAIN:
if (hit0)
end = -1;
break;
case MENUDISPLAY_PRESETWIDTH:
if (left)
{
Expand Down Expand Up @@ -666,7 +676,7 @@ static int key_displayMenu(int *c)
mainMenu_showStatus=!mainMenu_showStatus;
break;

#if defined(USE_UAE4ALL_VKBD) && defined(LARGEKEYBOARD)
#if defined(USE_UAE4ALL_VKBD)
case MENUDISPLAY_VKBDLANGUAGE:
if (left)
{
Expand Down
51 changes: 45 additions & 6 deletions src/gp2x/menu/menu_load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,47 @@ static void draw_dirlist(char *curdir, struct dirent **namelist, int n, int sel)
extern SDL_Surface *text_screen;
r.x=80-64; r.y=0; r.w=150-24+64+64; r.h=240;
text_draw_background();

if (menu_load_type == MENU_LOAD_HD_DIR)
#if defined(__PSP2__) || defined(__SWITCH__)
text_draw_window(2,2,41,25," Press SELECT to load HD-dir ");
#ifdef __PSP2__
text_draw_window(2,2,41,25," Press SELECT to load HD-dir (Tri.=Info) ");
#else
#ifdef __SWITCH__
text_draw_window(2,2,41,25," Press MINUS to load HD-dir (X = Info) ");
#else
text_draw_window(2,2,41,25," Press L-key to load HD-dir ");
#endif
#endif
else if (menu_load_type == MENU_LOAD_HDF)
#ifdef __PSP2__
text_draw_window(2,2,41,25," Select .HDF-file (Triangle = Info) ");
#else
#ifdef __SWITCH__
text_draw_window(2,2,41,25," Select .HDF-file (X = Info) ");
#else
text_draw_window(2,2,41,25," Select .HDF-file ");
#endif
#endif
#ifdef __PSP2__
else if (current_drive==0)
text_draw_window(2,2,41,25," Insert .ADF into DF0 (Triangle = Info) ");
else if (current_drive==1)
text_draw_window(2,2,41,25," Insert .ADF into DF1 (Triangle = Info)");
else if (current_drive==2)
text_draw_window(2,2,41,25," Insert .ADF into DF2 (Triangle = Info)");
else if (current_drive==3)
text_draw_window(2,2,41,25," Insert .ADF into DF3 (Triangle = Info)");
#else
#ifdef __SWITCH__
else if (current_drive==0)
text_draw_window(2,2,41,25," Insert .ADF into DF0 (X = Info)");
else if (current_drive==1)
text_draw_window(2,2,41,25," Insert .ADF into DF1 (X = Info)");
else if (current_drive==2)
text_draw_window(2,2,41,25," Insert .ADF into DF2 (X = Info)");
else if (current_drive==3)
text_draw_window(2,2,41,25," Insert .ADF into DF3 (X = Info)");
#else
else if (current_drive==0)
text_draw_window(2,2,41,25," Insert .ADF or .ADZ into DF0 ");
else if (current_drive==1)
Expand All @@ -136,6 +169,8 @@ static void draw_dirlist(char *curdir, struct dirent **namelist, int n, int sel)
text_draw_window(2,2,41,25," Insert .ADF or .ADZ into DF2 ");
else if (current_drive==3)
text_draw_window(2,2,41,25," Insert .ADF or .ADZ into DF3 ");
#endif
#endif
else
text_draw_window(2,2,41,25,text_str_load_title);

Expand Down Expand Up @@ -352,18 +387,22 @@ static int menuLoadLoop(char *curr_path)
case SDLK_UP: up=1; break;
case SDLK_DOWN: down=1; break;
case SDLK_PAGEDOWN: hit0=1; break;
case SDLK_HOME: hit0=1; break;
case SDLK_LALT: hit1=1; break;
#if !defined(__PSP2__) && !defined(__SWITCH__)
case SDLK_LCTRL: hit2=1; break;
case SDLK_HOME: hit0=1; break;
case SDLK_END: hit0=1; break;
case SDLK_PAGEUP: hit0=1; break;
#endif
case SDLK_RSHIFT: hit3=1; break;
case SDLK_RCTRL: hit4=1; break;
case SDLK_END: hit0=1; break;
#if defined(__PSP2__) || defined(__SWITCH__)
// SELECT to select HD dir
case SDLK_LCTRL: hitL=1; break;
#else
case SDLK_PAGEUP: hit0=1; break;
// TRIANGLE for fileinfo
case SDLK_PAGEUP: hit2=1; break;
// CIRCLE for cancel
case SDLK_END: hit1=1; break;
#endif
case SDLK_l: hitL=1;
}
Expand Down
14 changes: 9 additions & 5 deletions src/gp2x/menu/menu_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,18 @@ extern char filename0[256];
extern char filename1[256];
extern char filename2[256];
extern char filename3[256];
#if defined(__PSP2__) || defined(__SWITCH__)
#ifdef __PSP2__
static const char *text_str_title= "----- UAE4All Vita -----";
#else
#ifdef __SWITCH__
static const char *text_str_title= "----- UAE4All Switch -----";
#else
#ifdef PANDORA
static const char *text_str_title= "----- UAE4All Pandora -----";
#else
static const char *text_str_title= "----- UAE4All Android -----";
#endif
#endif
#endif // __PSP2__
static const char *text_str_df0= "DF0:";
static const char *text_str_df1= "DF1:";
Expand Down Expand Up @@ -500,17 +504,17 @@ SDL_ANDROID_SetScreenKeyboardShown(1);
case SDLK_UP: up=1; break;
case SDLK_DOWN: down=1; break;
case SDLK_PAGEDOWN: hit0=1; break;
case SDLK_HOME: hit0=1; break;
case SDLK_LALT: hit1=1; break;
case SDLK_LCTRL: hit2=1; break;
#if defined(__PSP2__) || defined(__SWITCH__) //RSHIFT is PAD_L on Vita
case SDLK_RSHIFT: hitQ=1; break;
#else
case SDLK_RSHIFT: hit3=1; break;
#endif
case SDLK_RCTRL: hit4=1; break;
case SDLK_END: hit5=1; break;
case SDLK_PAGEUP: hit6=1; break;
case SDLK_HOME: hit0=1; break;
#endif
case SDLK_RCTRL: hit4=1; break;
case SDLK_i: info=1; break;
case SDLK_h: hitH=1; break;
case SDLK_s: hitS=1; break;
Expand Down Expand Up @@ -1072,7 +1076,7 @@ int run_mainMenu()
if (sound_rate != old_sound_rate || mainMenu_soundStereo != old_stereo)
init_sound();

#if defined(USE_UAE4ALL_VKBD) && defined(LARGEKEYBOARD)
#if defined(USE_UAE4ALL_VKBD)
if (mainMenu_vkbdLanguage != old_vkbdLanguage)
{
vkbd_quit();
Expand Down

0 comments on commit 812342c

Please sign in to comment.