--- xmil/win9x/xmil.cpp 2004/08/12 18:54:26 1.18 +++ xmil/win9x/xmil.cpp 2004/08/19 09:50:23 1.23 @@ -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" @@ -38,7 +37,7 @@ static const OEMCHAR szClassName[] = OEM XMILOSCFG xmiloscfg = { CW_USEDEFAULT, CW_USEDEFAULT, - 1, 0, 0, 0, 1, + 1, 0, 0, 0, 0, 0, 0, 0, #if defined(SUPPORT_RESUME) 0, @@ -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); @@ -119,6 +118,7 @@ static void dispbmp(HINSTANCE hinst, HDC #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"); @@ -249,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; @@ -259,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); @@ -292,14 +314,6 @@ static void xmilcmd(HWND hWnd, UINT cmd) scrnmng_changescreen(scrnmode | SCRNMODE_FULLSCREEN); break; - case IDM_WIDTH80: - crtc_forcesetwidth(80); - break; - - case IDM_WIDTH40: - crtc_forcesetwidth(40); - break; - case IDM_DISPSYNC: menu_setdispmode(xmilcfg.DISPSYNC ^ 1); update = SYS_UPDATECFG; @@ -307,6 +321,12 @@ static void xmilcmd(HWND hWnd, UINT cmd) case IDM_RASTER: menu_setraster(xmilcfg.RASTER ^ 1); + if (xmilcfg.RASTER) { + scrnmng_changescreen(scrnmode | SCRNMODE_SYSHIGHCOLOR); + } + else { + scrnmng_changescreen(scrnmode & (~SCRNMODE_SYSHIGHCOLOR)); + } update = SYS_UPDATECFG; break; @@ -373,9 +393,21 @@ static void xmilcmd(HWND hWnd, UINT cmd) update = SYS_UPDATECFG; break; + case IDM_WIDTH40: + crtc_forcesetwidth(40); + break; + + case IDM_WIDTH80: + crtc_forcesetwidth(80); + break; + + case IDM_Z80SAVE: + debugsub_status(); + break; + case IDM_BMPSAVE: winuienter(); - bmpsave(); + dialog_writebmp(hWnd); winuileave(); break; @@ -405,10 +437,6 @@ static void xmilcmd(HWND hWnd, UINT cmd) update = SYS_UPDATECFG; break; - case IDM_Z80SAVE: - debugsub_status(); - break; - case IDM_ABOUT: winuienter(); DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUT), @@ -836,6 +864,9 @@ int WINAPI WinMain(HINSTANCE hInstance, scrndraw_initialize(); scrnmode = 0; + if (xmilcfg.RASTER) { + scrnmode |= SCRNMODE_SYSHIGHCOLOR; + } if (scrnmng_create(scrnmode) != SUCCESS) { scrnmode ^= SCRNMODE_FULLSCREEN; if (scrnmng_create(scrnmode) != SUCCESS) {