--- xmil/win9x/xmil.cpp 2004/08/12 18:22:54 1.17 +++ xmil/win9x/xmil.cpp 2004/08/17 12:30:41 1.20 @@ -10,7 +10,6 @@ #include "scrnmng.h" #include "soundmng.h" #include "sysmng.h" -#include "ddrawbmp.h" #include "winloc.h" #include "dclock.h" #include "winkbd.h" @@ -101,9 +100,9 @@ static void winuileave(void) { static void dispbmp(HINSTANCE hinst, HDC hdc, const OEMCHAR *res, int x, int y) { - HBITMAP hbmp; - BITMAP bmp; - HDC hmdc; + HBITMAP hbmp; + BITMAP bmp; + HDC hmdc; hbmp = LoadBitmap(hinst, res); GetObject(hbmp, sizeof(bmp), &bmp); @@ -117,8 +116,9 @@ static void dispbmp(HINSTANCE hinst, HDC // ---- -#if defined(SUPPORT_RESUME) || defined(SUPPORT_STATSAVE) +#if defined(SUPPORT_RESUME) static const OEMCHAR xmilresumeext[] = OEMTEXT(".sav"); +static const OEMCHAR str_resume[] = OEMTEXT("Resume"); #endif #if defined(SUPPORT_STATSAVE) static const OEMCHAR xmilflagext[] = OEMTEXT(".sv%u"); @@ -126,7 +126,6 @@ static const OEMCHAR str_statload[] = OE #endif #if defined(SUPPORT_RESUME) || defined(SUPPORT_STATSAVE) - static const OEMCHAR str_loaderr[] = OEMTEXT("Couldn't restart"); static const OEMCHAR str_conflict[] = OEMTEXT("Conflict!\n\n%s\nContinue?"); @@ -160,7 +159,7 @@ static void flagdelete(const OEMCHAR *ex file_delete(path); } -static int flagload(const OEMCHAR *ext, const OEMCHAR *title, BOOL force) { +static int flagload(const OEMCHAR *ext, const OEMCHAR *title, BRESULT force) { int ret; int id; @@ -199,7 +198,9 @@ static int flagload(const OEMCHAR *ext, static void xmilcmd(HWND hWnd, UINT cmd) { UINT update; +#if defined(SUPPORT_STATSAVE) OEMCHAR ext[16]; +#endif update = 0; switch(cmd) { @@ -248,8 +249,28 @@ static void xmilcmd(HWND hWnd, UINT cmd) diskdrv_setfdd(1, NULL, 0); break; - case IDM_TURBOZ: - menu_setiplrom(3); + case IDM_FDD2OPEN: + winuienter(); + dialog_changefdd(hWnd, 2); + winuileave(); + break; + + case IDM_FDD2EJECT: + diskdrv_setfdd(2, NULL, 0); + break; + + case IDM_FDD3OPEN: + winuienter(); + dialog_changefdd(hWnd, 3); + winuileave(); + break; + + case IDM_FDD3EJECT: + diskdrv_setfdd(3, NULL, 0); + break; + + case IDM_X1ROM: + menu_setiplrom(1); update = SYS_UPDATECFG; break; @@ -258,10 +279,12 @@ static void xmilcmd(HWND hWnd, UINT cmd) update = SYS_UPDATECFG; break; - case IDM_X1ROM: - menu_setiplrom(1); +#if defined(SUPPORT_TURBOZ) + case IDM_TURBOZ: + menu_setiplrom(3); update = SYS_UPDATECFG; break; +#endif case IDM_BOOT2D: menu_setbootmedia(0); @@ -374,7 +397,7 @@ static void xmilcmd(HWND hWnd, UINT cmd) case IDM_BMPSAVE: winuienter(); - bmpsave(); + dialog_writebmp(hWnd); winuileave(); break;