|
|
| version 1.60, 2005/03/19 20:46:07 | version 1.65, 2006/12/17 02:30:11 |
|---|---|
| Line 51 | Line 51 |
| #define OPENING_WAIT 1500 | #define OPENING_WAIT 1500 |
| #endif | #endif |
| static OEMCHAR szClassName[] = OEMTEXT("NP2-MainWindow"); | static TCHAR szClassName[] = _T("NP2-MainWindow"); |
| HWND hWndMain; | HWND hWndMain; |
| HINSTANCE hInst; | HINSTANCE hInst; |
| HINSTANCE hPrev; | HINSTANCE hPrev; |
| Line 291 static int flagload(const OEMCHAR *ext, | Line 291 static int flagload(const OEMCHAR *ext, |
| id = IDYES; | id = IDYES; |
| ret = statsave_check(path, buf, NELEMENTS(buf)); | ret = statsave_check(path, buf, NELEMENTS(buf)); |
| if (ret & (~STATFLAG_DISKCHG)) { | if (ret & (~STATFLAG_DISKCHG)) { |
| MessageBox(hWndMain, OEMTEXT("Couldn't restart"), title, MB_OK | MB_ICONSTOP); | MessageBox(hWndMain, _T("Couldn't restart"), title, |
| MB_OK | MB_ICONSTOP); | |
| id = IDNO; | id = IDNO; |
| } | } |
| else if ((!force) && (ret & STATFLAG_DISKCHG)) { | else if ((!force) && (ret & STATFLAG_DISKCHG)) { |
| Line 336 static void np2popup(HWND hWnd, LPARAM l | Line 337 static void np2popup(HWND hWnd, LPARAM l |
| static void np2cmd(HWND hWnd, UINT16 cmd) { | static void np2cmd(HWND hWnd, UINT16 cmd) { |
| UINT update; | HINSTANCE hInst; |
| BOOL b; | UINT update; |
| BOOL b; | |
| hInst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); | |
| update = 0; | update = 0; |
| switch(cmd) { | switch(cmd) { |
| case IDM_RESET: | case IDM_RESET: |
| Line 442 static void np2cmd(HWND hWnd, UINT16 cmd | Line 445 static void np2cmd(HWND hWnd, UINT16 cmd |
| toolwin_setfdd(3, NULL); | toolwin_setfdd(3, NULL); |
| break; | break; |
| case IDM_SASI1OPEN: | case IDM_IDE0OPEN: |
| winuienter(); | winuienter(); |
| dialog_changehdd(hWnd, 0x00); | dialog_changehdd(hWnd, 0x00); |
| winuileave(); | winuileave(); |
| break; | break; |
| case IDM_SASI1EJECT: | case IDM_IDE0EJECT: |
| diskdrv_sethdd(0x00, NULL); | diskdrv_sethdd(0x00, NULL); |
| break; | break; |
| case IDM_SASI2OPEN: | case IDM_IDE1OPEN: |
| winuienter(); | winuienter(); |
| dialog_changehdd(hWnd, 0x01); | dialog_changehdd(hWnd, 0x01); |
| winuileave(); | winuileave(); |
| break; | break; |
| case IDM_SASI2EJECT: | case IDM_IDE1EJECT: |
| diskdrv_sethdd(0x01, NULL); | diskdrv_sethdd(0x01, NULL); |
| break; | break; |
| #if defined(SUPPORT_IDEIO) | |
| case IDM_IDE2OPEN: | |
| winuienter(); | |
| dialog_changehdd(hWnd, 0x02); | |
| winuileave(); | |
| break; | |
| case IDM_IDE2EJECT: | |
| diskdrv_sethdd(0x02, NULL); | |
| break; | |
| #endif | |
| #if defined(SUPPORT_SCSI) | #if defined(SUPPORT_SCSI) |
| case IDM_SCSI0OPEN: | case IDM_SCSI0OPEN: |
| winuienter(); | winuienter(); |
| Line 502 static void np2cmd(HWND hWnd, UINT16 cmd | Line 518 static void np2cmd(HWND hWnd, UINT16 cmd |
| diskdrv_sethdd(0x23, NULL); | diskdrv_sethdd(0x23, NULL); |
| break; | break; |
| #endif | #endif |
| case IDM_WINDOW: | case IDM_WINDOW: |
| changescreen(scrnmode & (~SCRNMODE_FULLSCREEN)); | changescreen(scrnmode & (~SCRNMODE_FULLSCREEN)); |
| break; | break; |
| Line 875 static void np2cmd(HWND hWnd, UINT16 cmd | Line 892 static void np2cmd(HWND hWnd, UINT16 cmd |
| update |= SYS_UPDATECFG; | update |= SYS_UPDATECFG; |
| break; | break; |
| case IDM_I286SAVE: | case IDM_CPUSAVE: |
| debugsub_status(); | debugsub_status(); |
| break; | break; |
| Line 1080 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 1097 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| GetClientRect(hWnd, &rect); | GetClientRect(hWnd, &rect); |
| width = rect.right - rect.left; | width = rect.right - rect.left; |
| height = rect.bottom - rect.top; | height = rect.bottom - rect.top; |
| hbmp = LoadBitmap(hinst, OEMTEXT("NP2BMP")); | hbmp = LoadBitmap(hinst, _T("NP2BMP")); |
| GetObject(hbmp, sizeof(BITMAP), &bmp); | GetObject(hbmp, sizeof(BITMAP), &bmp); |
| hbrush = (HBRUSH)SelectObject(hdc, | hbrush = (HBRUSH)SelectObject(hdc, |
| GetStockObject(BLACK_BRUSH)); | GetStockObject(BLACK_BRUSH)); |
| Line 1283 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 1300 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| } | } |
| else if (sstpconfirm_exit()) { | else if (sstpconfirm_exit()) { |
| winuienter(); | winuienter(); |
| if (MessageBox(hWnd, OEMTEXT("Sure?"), OEMTEXT("Exit"), | if (MessageBox(hWnd, _T("Sure?"), _T("Exit"), |
| MB_ICONQUESTION | MB_YESNO) == IDYES) { | MB_ICONQUESTION | MB_YESNO) == IDYES) { |
| b = TRUE; | b = TRUE; |
| } | } |
| Line 1416 int WINAPI WinMain(HINSTANCE hInstance, | Line 1433 int WINAPI WinMain(HINSTANCE hInstance, |
| rand_setseed((unsigned)time(NULL)); | rand_setseed((unsigned)time(NULL)); |
| CopyMemory(szClassName, np2oscfg.winid, 3 * sizeof(OEMCHAR)); | szClassName[0] = (TCHAR)np2oscfg.winid[0]; |
| szClassName[1] = (TCHAR)np2oscfg.winid[1]; | |
| szClassName[2] = (TCHAR)np2oscfg.winid[2]; | |
| if ((hWnd = FindWindow(szClassName, NULL)) != NULL) { | if ((hWnd = FindWindow(szClassName, NULL)) != NULL) { |
| sstpmsg_running(); | sstpmsg_running(); |