--- xmil/win9x/xmil.cpp 2004/08/01 05:31:31 1.1 +++ xmil/win9x/xmil.cpp 2004/08/03 12:50:54 1.4 @@ -26,7 +26,6 @@ #include "x1_crtc.h" #include "timing.h" #include "draw.h" -#include "x1_fdc.h" #include "fdd_ini.h" #include "juliet.h" #include "diskdrv.h" @@ -46,6 +45,7 @@ static const OEMCHAR szClassName[] = OEM HWND hWndMain; HINSTANCE hInst; HINSTANCE hPreI; + OEMCHAR modulefile[MAX_PATH]; OEMCHAR fddfolder[MAX_PATH]; OEMCHAR bmpfilefolder[MAX_PATH]; @@ -99,7 +99,7 @@ static void dispbmp(HINSTANCE hinst, HDC HDC hmdc; hbmp = LoadBitmap(hinst, res); - GetObject(hbmp, sizeof(BITMAP), &bmp); + GetObject(hbmp, sizeof(bmp), &bmp); hmdc = CreateCompatibleDC(hdc); SelectObject(hmdc, hbmp); BitBlt(hdc, x, y, bmp.bmWidth, bmp.bmHeight, hmdc, 0, 0, SRCCOPY); @@ -236,7 +236,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT break; case IDM_BOOT2HD: - xmenu_setbootmedia(DIP_BOOTMEDIA); + xmenu_setbootmedia(DIPSW_BOOTMEDIA); updateflag = SYS_UPDATECFG; break; @@ -246,7 +246,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT break; case IDM_LOWRES: - xmenu_setresolute(DIP_RESOLUTE); + xmenu_setresolute(DIPSW_RESOLUTE); updateflag = SYS_UPDATECFG; break; @@ -435,15 +435,15 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT PatBlt(hdc, 0, 0, width, height, PATCOPY); SelectObject(hdc, hbrush); - dispbmp(hinst, hdc, "XMILBMP", + dispbmp(hinst, hdc, OEMTEXT("XMILBMP"), (width - 201) / 2, (height - 31) / 2); - dispbmp(hinst, hdc, "ZILOG", + dispbmp(hinst, hdc, OEMTEXT("ZILOG"), width - (101 + 8 + 41 + 8 + 68 + 1), height - 38); - dispbmp(hinst, hdc, "TURBOZ", + dispbmp(hinst, hdc, OEMTEXT("TURBOZ"), width - (101 + 8 + 68 + 1), height - 18); - dispbmp(hinst, hdc, "OPMSOUND", + dispbmp(hinst, hdc, OEMTEXT("OPMSOUND"), width - (68 + 1), height - (25 + 1)); } else { @@ -644,7 +644,8 @@ int WINAPI WinMain(HINSTANCE hInstance, return(FALSE); } - file_setcd(__argv[0]); + GetModuleFileName(NULL, modulefile, sizeof(modulefile)); + file_setcd(modulefile); initload(); hInst = hInstance; @@ -715,7 +716,7 @@ int WINAPI WinMain(HINSTANCE hInstance, if (scrnmng_create(scrnmode) != SUCCESS) { scrnmode ^= SCRNMODE_FULLSCREEN; if (scrnmng_create(scrnmode) != SUCCESS) { - MessageBox(hWnd, "Couldn't create DirectDraw Object", + MessageBox(hWnd, OEMTEXT("Couldn't create DirectDraw Object"), szProgName, MB_OK); return(FALSE); } @@ -727,8 +728,8 @@ int WINAPI WinMain(HINSTANCE hInstance, juliet2_reset(); if (soundmng_initialize() == SUCCESS) { - soundmng_pcmload(SOUND_PCMSEEK, "fddseek.wav", 0); - soundmng_pcmload(SOUND_PCMSEEK1, "fddseek1.wav", 0); + soundmng_pcmload(SOUND_PCMSEEK, OEMTEXT("fddseek.wav"), 0); + soundmng_pcmload(SOUND_PCMSEEK1, OEMTEXT("fddseek1.wav"), 0); soundmng_pcmvolume(SOUND_PCMSEEK, xmilcfg.MOTORVOL); soundmng_pcmvolume(SOUND_PCMSEEK1, xmilcfg.MOTORVOL); } @@ -736,6 +737,7 @@ int WINAPI WinMain(HINSTANCE hInstance, pccore_initialize(); pccore_reset(); +#if !defined(UNICODE) if (__argc > 1) { for (int i=1; i<__argc; i++) { if (is_d8ufile(__argv[i])) { @@ -745,6 +747,7 @@ int WINAPI WinMain(HINSTANCE hInstance, } } } +#endif scrndraw_redraw();