mirror of
https://github.com/Oibaf66/uae-wii.git
synced 2024-11-14 23:05:08 +01:00
Fixed bug in mount menu, improvement in bug menu, doubled mouse speed in 320X240 res
This commit is contained in:
parent
6b5a06be1c
commit
c6d863fa46
@ -764,6 +764,7 @@ static void unmount_device()
|
||||
int dev_to_unmount=menu_select_devices();
|
||||
if (dev_to_unmount==-1) return;
|
||||
|
||||
write_log("Unmounting device: %d\n",dev_to_unmount );
|
||||
if (kill_filesys_unit (currprefs.mountinfo, dev_to_unmount) == -1)
|
||||
msgInfo("Volume does not exist", 3000, NULL);
|
||||
#endif
|
||||
@ -811,7 +812,7 @@ void make_hardfile(void)
|
||||
msgInfo("Creating file",1,NULL);
|
||||
|
||||
if (!make_hdf(size, hdf_path, sector, surfaces, blocksize))
|
||||
msgInfo("Hardfile created",4000,NULL);
|
||||
msgInfo("Hardfile created",2000,NULL);
|
||||
else
|
||||
msgInfo("Failed to create hardfile",4000,NULL);
|
||||
#endif
|
||||
@ -1226,6 +1227,7 @@ static void set_gfx_resolution (int res)
|
||||
changed_prefs.gfx_height_win = 480;
|
||||
changed_prefs.gfx_lores = 0;
|
||||
changed_prefs.gfx_linedbl = 1;
|
||||
currprefs.input_mouse_speed = 100;
|
||||
}
|
||||
else //320X240
|
||||
{
|
||||
@ -1233,6 +1235,7 @@ static void set_gfx_resolution (int res)
|
||||
changed_prefs.gfx_height_win = 240;
|
||||
changed_prefs.gfx_lores = 1;
|
||||
changed_prefs.gfx_linedbl = 0;
|
||||
currprefs.input_mouse_speed = 200;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -367,7 +367,7 @@ const char **get_file_list_devices()
|
||||
device_list_menu[0]=malloc(80);
|
||||
|
||||
sprintf(device_list_menu[0], "#1NR %-6s %-6s %s %s %s %s %s %s %s",
|
||||
"Device", "Volume","Acc","Sec", "Sur","Res","Blk","Prio", "Path");
|
||||
"Device", "Volume","Acc","Sec", "Sur","Res","Blks","Prio", "Path");
|
||||
|
||||
for (i = 0; i < nr; i++) {
|
||||
int secspertrack, surfaces, reserved, blocksize, bootpri;
|
||||
@ -388,18 +388,20 @@ const char **get_file_list_devices()
|
||||
&filesysdir, &flags);
|
||||
|
||||
if (is_hardfile (currprefs.mountinfo, i)) {
|
||||
if (secspertrack == 0)
|
||||
if (secspertrack == 0) //RDB
|
||||
strcpy (texts[HDLIST_DEVICE], "N/A" );
|
||||
else //Partitionable hard disk or partition
|
||||
strncpy (texts[HDLIST_DEVICE], devname, 6);
|
||||
texts[HDLIST_DEVICE][6]='\0';
|
||||
{
|
||||
strncpy (texts[HDLIST_DEVICE], devname, 6);
|
||||
texts[HDLIST_DEVICE][6]='\0';
|
||||
}
|
||||
sprintf (texts[HDLIST_VOLUME], "N/A" );
|
||||
sprintf (texts[HDLIST_HEADS], "%.3d", surfaces);
|
||||
//sprintf (texts[HDLIST_CYLS], "%.3d", cylinders);
|
||||
sprintf (texts[HDLIST_SECS], "%.3d", secspertrack);
|
||||
sprintf (texts[HDLIST_RSRVD], "%.3d", reserved);
|
||||
//sprintf (texts[HDLIST_SIZE], "%.3d", size);
|
||||
sprintf (texts[HDLIST_BLKSIZE], "%.3d", blocksize);
|
||||
sprintf (texts[HDLIST_BLKSIZE], "%.4d", blocksize);
|
||||
} else { //Virtual filesystem
|
||||
strncpy (texts[HDLIST_DEVICE], devname, 6);
|
||||
texts[HDLIST_DEVICE][6]='\0';
|
||||
@ -410,7 +412,7 @@ const char **get_file_list_devices()
|
||||
strcpy (texts[HDLIST_SECS], "N/A");
|
||||
strcpy (texts[HDLIST_RSRVD], "N/A");
|
||||
//strcpy (texts[HDLIST_SIZE], "N/A");
|
||||
strcpy (texts[HDLIST_BLKSIZE], "N/A");
|
||||
strcpy (texts[HDLIST_BLKSIZE], "N/A ");
|
||||
}
|
||||
strncpy (texts[HDLIST_PATH], rootdir ,24);
|
||||
texts[HDLIST_PATH][24]='\0';
|
||||
@ -1012,7 +1014,8 @@ static const char *menu_select_file_internal(const char *dir_path,
|
||||
if (file_list == NULL)
|
||||
return NULL;
|
||||
|
||||
if (selected_file)
|
||||
if (!strcmp(dir_path,"devices")) opt = menu_select_sized("Select device to unmount", file_list, NULL, 0, x, y, x2, y2, NULL, NULL ,16);
|
||||
else if (selected_file)
|
||||
{
|
||||
ptr_selected_file= strrchr(selected_file,'/');
|
||||
if (ptr_selected_file) ptr_selected_file++;
|
||||
@ -1033,6 +1036,8 @@ static const char *menu_select_file_internal(const char *dir_path,
|
||||
|
||||
if (!sel)
|
||||
return NULL;
|
||||
|
||||
if (!strcmp(dir_path,"devices")) return sel;
|
||||
|
||||
if (!strcmp(sel,"[..]")) //selected "[..]"
|
||||
{
|
||||
@ -1085,10 +1090,14 @@ const char *menu_select_file(const char *dir_path,const char *selected_file, int
|
||||
|
||||
int menu_select_devices()
|
||||
{
|
||||
const char *selected_device;
|
||||
selected_device= menu_select_file_internal("devices",
|
||||
char *selected_device;
|
||||
int nr_sel;
|
||||
selected_device= (char *) menu_select_file_internal("devices",
|
||||
0, 20/RATIO, FULL_DISPLAY_X, FULL_DISPLAY_Y - 20/RATIO, NULL, 0);
|
||||
if (!selected_device) return -1; else return (atoi(selected_device));
|
||||
if (!selected_device) nr_sel = -1;
|
||||
else {selected_device[2]=0; nr_sel = atoi(selected_device);}
|
||||
free ((void*)selected_device);
|
||||
return nr_sel;
|
||||
}
|
||||
|
||||
static TTF_Font *read_font(const char *path, int font_size)
|
||||
|
Loading…
Reference in New Issue
Block a user