Fixed building under Linux
Linux GUI brought up to date
This commit is contained in:
parent
47ce7bda99
commit
fb3d3d594b
7 changed files with 267 additions and 108 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "allegro-gui.h"
|
||||
#include "disc.h"
|
||||
#include "ide.h"
|
||||
#include "cdrom-iso.h"
|
||||
|
||||
static int file_return(void)
|
||||
{
|
||||
|
|
@ -107,10 +108,18 @@ static void cdrom_update()
|
|||
|
||||
if (!cdrom_enabled)
|
||||
cdrom_menu[0].flags = D_SELECTED;
|
||||
else
|
||||
else switch (cdrom_drive)
|
||||
{
|
||||
case -1:
|
||||
cdrom_menu[1].flags = D_SELECTED;
|
||||
|
||||
return D_O_K;
|
||||
break;
|
||||
case CDROM_ISO:
|
||||
cdrom_menu[3].flags = D_SELECTED;
|
||||
break;
|
||||
default:
|
||||
cdrom_menu[2].flags = D_SELECTED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int cdrom_disabled()
|
||||
|
|
@ -172,11 +181,45 @@ static int cdrom_dev()
|
|||
}
|
||||
}
|
||||
|
||||
static int cdrom_iso()
|
||||
{
|
||||
char fn[260];
|
||||
int ret;
|
||||
int xsize = SCREEN_W - 32, ysize = SCREEN_H - 64;
|
||||
|
||||
strcpy(fn, iso_path);
|
||||
ret = file_select_ex("Please choose an ISO image", fn, "ISO", 260, xsize, ysize);
|
||||
if (ret)
|
||||
{
|
||||
if (!cdrom_enabled)
|
||||
{
|
||||
if (alert("This will reset PCem!", "Okay to continue?", NULL, "OK", "Cancel", 0, 0) != 1)
|
||||
return D_O_K;
|
||||
}
|
||||
else
|
||||
{
|
||||
atapi->exit();
|
||||
}
|
||||
|
||||
cdrom_drive = CDROM_ISO;
|
||||
iso_open(fn);
|
||||
if (!cdrom_enabled)
|
||||
{
|
||||
cdrom_enabled = 1;
|
||||
resetpchard();
|
||||
}
|
||||
cdrom_update();
|
||||
saveconfig();
|
||||
}
|
||||
return D_O_K;
|
||||
}
|
||||
|
||||
static MENU cdrom_menu[] =
|
||||
{
|
||||
{"&Disabled", cdrom_disabled, NULL, 0, NULL},
|
||||
{"&Empty", cdrom_empty, NULL, 0, NULL},
|
||||
{"/dev/cdrom", cdrom_dev, NULL, 0, NULL},
|
||||
{"&ISO image...", cdrom_iso, NULL, 0, NULL},
|
||||
{NULL,NULL,NULL,0,NULL}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue