--- np2/win9x/np2.cpp 2004/05/21 08:40:27 1.52 +++ np2/win9x/np2.cpp 2005/02/07 14:46:14 1.56 @@ -56,7 +56,7 @@ static char szClassName[] = "NP2-MainWi HINSTANCE hInst; HINSTANCE hPrev; int mmxflag; - BYTE np2break = 0; // ver0.30 + UINT8 np2break = 0; // ver0.30 BOOL winui_en; NP2OSCFG np2oscfg = { @@ -74,7 +74,7 @@ static char szClassName[] = "NP2-MainWi {0, 0, 0x3e, 19200, "", "", "", ""}, // ver0.34 {0, 0, 0x3e, 19200, "", "", "", ""}, // ver0.34 0xffffff, 0xffbf6a, 0, 0, - 0, 1, 0, 9801, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + 0, 1, 0, 9801, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; char fddfolder[MAX_PATH]; char hddfolder[MAX_PATH]; @@ -84,11 +84,11 @@ static char szClassName[] = "NP2-MainWi static UINT framecnt = 0; static UINT waitcnt = 0; static UINT framemax = 1; -static BYTE np2stopemulate = 0; +static UINT8 np2stopemulate = 0; static int np2opening = 1; static int np2quitmsg = 0; static HMENU hStat = NULL; -static BYTE scrnmode; +static UINT8 scrnmode; static WINLOCEX smwlex; static const char np2help[] = "np2.chm"; @@ -132,10 +132,10 @@ WINLOCEX np2_winlocexallwin(HWND base) { return(winlocex_create(base, list, cnt)); } -static void changescreen(BYTE newmode) { +static void changescreen(UINT8 newmode) { - BYTE change; - BYTE renewal; + UINT8 change; + UINT8 renewal; WINLOCEX wlex; change = scrnmode ^ newmode; @@ -363,6 +363,18 @@ static void np2cmd(HWND hWnd, UINT16 cmd sstpmsg_config(); DialogBox(hInst, MAKEINTRESOURCE(IDD_CONFIG), hWnd, (DLGPROC)CfgDialogProc); + if (!scrnmng_isfullscreen()) { + UINT8 thick; + thick = (GetWindowLong(hWnd, GWL_STYLE) & WS_THICKFRAME)?1:0; + if (thick != np2oscfg.thickframe) { + WINLOCEX wlex; + wlex = np2_winlocexallwin(hWnd); + winlocex_setholdwnd(wlex, hWnd); + np2class_frametype(hWnd, np2oscfg.thickframe); + winlocex_move(wlex); + winlocex_destroy(wlex); + } + } winuileave(); break; @@ -798,7 +810,7 @@ static void np2cmd(HWND hWnd, UINT16 cmd dialog_writebmp(hWnd); winuileave(); break; -#if defined(SUPPPORT_S98) +#if defined(SUPPORT_S98) case IDM_S98LOGGING: winuienter(); dialog_s98(hWnd); @@ -1349,10 +1361,10 @@ static void framereset(UINT cnt) { framecnt = 0; scrnmng_dispclock(); - kdispwin_draw((BYTE)cnt); + kdispwin_draw((UINT8)cnt); skbdwin_process(); mdbgwin_process(); - toolwin_draw((BYTE)cnt); + toolwin_draw((UINT8)cnt); viewer_allreload(FALSE); if (np2oscfg.DISPCLK & 3) { if (sysmng_workclockrenewal()) { @@ -1380,9 +1392,11 @@ int WINAPI WinMain(HINSTANCE hInstance, MSG msg; HWND hWnd; UINT i; + DWORD style; #ifdef OPENING_WAIT UINT32 tick; #endif + BOOL xrollkey; _MEM_INIT(); @@ -1414,10 +1428,12 @@ int WINAPI WinMain(HINSTANCE hInstance, mmxflag += (np2oscfg.disablemmx)?MMXFLAG_DISABLE:0; TRACEINIT(); + xrollkey = (np2oscfg.xrollkey == 0); if (np2oscfg.KEYBOARD >= KEY_TYPEMAX) { int keytype = GetKeyboardType(1); if ((keytype & 0xff00) == 0x0d00) { np2oscfg.KEYBOARD = KEY_PC98; + xrollkey = !xrollkey; } else if (!keytype) { np2oscfg.KEYBOARD = KEY_KEY101; @@ -1426,7 +1442,7 @@ int WINAPI WinMain(HINSTANCE hInstance, np2oscfg.KEYBOARD = KEY_KEY106; } } - winkbd_roll(np2oscfg.KEYBOARD != KEY_PC98); + winkbd_roll(xrollkey); winkbd_setf12(np2oscfg.F12COPY); keystat_initialize(); @@ -1454,9 +1470,11 @@ int WINAPI WinMain(HINSTANCE hInstance, mousemng_initialize(); - hWnd = CreateWindowEx(0, szClassName, np2oscfg.titles, - WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | - WS_THICKFRAME | WS_MINIMIZEBOX, + style = WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | WS_MINIMIZEBOX; + if (np2oscfg.thickframe) { + style |= WS_THICKFRAME; + } + hWnd = CreateWindowEx(0, szClassName, np2oscfg.titles, style, np2oscfg.winx, np2oscfg.winy, 640, 400, NULL, NULL, hInstance, NULL); hWndMain = hWnd;