#ifdef USE_CART1
static void OnOpenCartSub(AG_Event *event)
{
- char *path = AG_STRING(1);
- int drv = AG_INT(2);
+ char *path = AG_STRING(2);
+ AG_FileType *filetype = (AG_FileType *)AG_PTR(3);
+ int drv = AG_INT(1);
AG_FileDlg *my = (AG_FileDlg *)AG_SELF();
if(path) {
if(strlen(path) <= 0) return;
void open_cart_dialog(AG_Widget *hWnd, int drv)
{
AG_FileDlg *dlg;
+ AG_Window *win;
#if defined(_GAMEGEAR)
const char *ext = "*.rom,*.bin,*.gg,*.col";
char *desc = _N("Game Cartridge");
const char *ext = "*.rom,*.bin";
char *desc = _N("Game Cartridge");
#endif
- dlg = AG_FileDlgNew(hWnd, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
+ win = AG_WindowNew(0);
+ dlg = AG_FileDlgNew(win, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
if(dlg == NULL) return;
if(config.initial_cart_dir != NULL) {
AG_FileDlgSetDirectory(dlg, "%s", get_parent_dir(app));
}
AG_FileDlgAddType(dlg, desc, ext, OnOpenCartSub, "%i", drv);
+ AG_WindowShow(win);
return;
}
#endif
void OnOpenFDSub(AG_Event *event)
{
- char *path = AG_STRING(1);
- int drv = AG_INT(2);
+ char *path = AG_STRING(2);
+ AG_FileType *filetype = (AG_FileType *)AG_PTR(3);
+ int drv = AG_INT(1);
AG_FileDlg *my = (AG_FileDlg *)AG_SELF();
if(path) {
if(strlen(path) <= 0) return;
const char *ext = "*.d88,*.d77,*.td0,*.imd,*.dsk,*.fdi,*.hdm,*.tfd,*.xdf,*.2d,*.sf7";
char *desc = _N("Floppy Disk");
AG_FileDlg *dlg;
+ AG_Window *win;
- dlg = AG_FileDlgNew(hWnd, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
+ win = AG_WindowNew(0);
+ dlg = AG_FileDlgNew(win, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
if(dlg == NULL) return;
if(config.initial_disk_dir != NULL) {
AG_FileDlgSetDirectory(dlg, "%s", get_parent_dir(app));
}
AG_FileDlgAddType(dlg, desc, ext, OnOpenFDSub, "%i", drv);
+ AG_WindowShow(win);
return;
}
#ifdef USE_QD1
void OnOpenQDSub(AG_Event *event)
{
- char *path = AG_STRING(1);
- int drv = AG_INT(2);
+ AG_FileType *filetype = (AG_FileType *)AG_PTR(3);
+ char *path = AG_STRING(2);
+ int drv = AG_INT(1);
AG_FileDlg *my = (AG_FileDlg *)AG_SELF();
if(path) {
if(strlen(path) <= 0) return;
{
const char *ext = "*.mzt,*.q20,*qdf";
char *desc = _N("Quick Disk");
- dlg = AG_FileDlgNew(hWnd, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
+ AG_Window *win;
+
+ win = AG_WindowNew(0);
+
+ dlg = AG_FileDlgNew(win, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
if(dlg == NULL) return;
if(config.initial_quickdisk_dir != NULL) {
AG_FileDlgSetDirectory(dlg, "%s", get_parent_dir(app));
}
AG_FileDlgAddType(dlg, desc, ext, OnOpenQDSub, "%i", drv);
+ AG_WindowShow(win);
return;
}
#endif
#ifdef USE_TAPE
void OnOpenTapeSub(AG_Event *event)
{
- char *path = AG_STRING(1);
- int play = AG_INT(2);
+ AG_FileType *filetype = (AG_FileType *)AG_PTR(3);
+ char *path = AG_STRING(2);
+ int play = AG_INT(1);
AG_FileDlg *my = (AG_FileDlg *)AG_SELF();
if(path) {
if(strlen(path) <= 0) return;
AG_FileDlg *dlg;
const char *ext;
char *desc;
+ AG_Window *win;
+
+ win = AG_WindowNew(0);
#if defined(_PC6001) || defined(_PC6001MK2) || defined(_PC6001MK2SR) || defined(_PC6601) || defined(_PC6601SR)
ext = "*.wav,*.p6,*.cas";
#elif defined(_PC8001SR) || defined(_PC8801MA) || defined(_PC98DO)
#endif
desc = play ? _N("Data Recorder Tape [Play]") : _N("Data Recorder Tape [Rec]");
- dlg = AG_FileDlgNew(hWnd, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
+ dlg = AG_FileDlgNew(win, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
if(dlg == NULL) return;
if(config.initial_tape_dir != NULL) {
AG_FileDlgSetDirectory(dlg, "%s", get_parent_dir(app));
}
AG_FileDlgAddType(dlg, desc, ext, OnOpenTapeSub, "%i", playf);
+ AG_WindowShow(win);
return;
}
#endif
#ifdef USE_LASER_DISC
void OnOpenLaserDiscSub(AG_Event *event)
{
+ AG_FileType *filetype = (AG_FileType *)AG_PTR(2);
char *path = AG_STRING(1);
AG_FileDlg *my = (AG_FileDlg *)AG_SELF();
if(path) {
{
const char *ext = "*.avi,*.mpg,*.mpeg,*.wmv,*.ogv";
char *desc = _N("Laser Disc");
- AG_FileDlg *dlg = AG_FileDlgNew(hWnd, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
+ AG_Window *win;
+
+ win = AG_WindowNew(0);
+
+ AG_FileDlg *dlg = AG_FileDlgNew(win, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
if(dlg == NULL) return;
if(config.initial_laser_disc_dir != NULL) {
AG_FileDlgSetDirectory(dlg, "%s", get_parent_dir(app));
}
AG_FileDlgAddType(dlg, desc, ext, OnOpenLaserDiscSub, "%p", NULL);
+ AG_WindowShow(win);
return;
}
#endif
void OnOpenBinarySub(AG_Event *event)
{
- char *path = AG_STRING(1);
- int drv = AG_INT(2);
- int load = AG_INT(3);
+ AG_FileType *filetype = (AG_FileType *)AG_PTR(4);
+ char *path = AG_STRING(3);
+ int drv = AG_INT(1);
+ int load = AG_INT(2);
AG_FileDlg *my = (AG_FileDlg *)AG_SELF();
if(path) {
UPDATE_HISTORY(path, config.recent_binary_path[drv]);
void open_binary_dialog(AG_Widget *hWnd, int drv, bool load)
{
const char ext = "*.ram,*.bin";
+ AG_Window *win;
+
int loadf = load ? 1 : 0;
#if defined(_PASOPIA) || defined(_PASOPIA7)
char *desc = _N("RAM Pack Cartridge");
#else
char *desc = _N("Memory Dump");
#endif
- AG_FileDlg *dlg = AG_FileDlgNew(hWnd, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
+ win = AG_WIndowNew(0);
+ AG_FileDlg *dlg = AG_FileDlgNew(win, AG_FILEDLG_MASK_EXT | AG_FILEDLG_ASYNC | AG_FILEDLG_CLOSEWIN);
if(dlg == NULL) return;
if(config.initial_binary_dir != NULL) {
AG_FileDlgSetDirectory(dlg, "%s", get_parent_dir(app));
}
AG_FileDlgAddType(dlg, desc, ext, OnOpenBinarySub, "%i,%i", drv, loadf);
+ AG_WindowShow(win);
return;
}