Windows CE port fixes/enhancements (from <Someone>)

A few other fixes:
- bug: text window does not scroll left on left arrow
- pcmain.c: fix warning: _fileno() returns void* in Windows CE SDK

3.5.0 only:
- files.c: compile error: don't include <signal.h> if NO_SIGNAL is defined. WinMo does not support POSIX signals
- version.c: compile error: append_port_id() is undeclared
- link error: mktime() is unsupported -> define it in celib.c

-<Someone>
This commit is contained in:
nethack.allison
2009-10-22 02:59:35 +00:00
parent dea62334c0
commit 3197e22563
13 changed files with 51 additions and 43 deletions
+9 -26
View File
@@ -876,21 +876,6 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
DialogBox(GetNHApp()->hApp, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
break;
case IDM_CMD_DLG: {
char input[BUFSZ];
char* p;
boolean ctrl = FALSE;
mswin_getlin("Enter command", input);
for(p=input; *p; p++) {
if( *p == '^' ) {
ctrl = TRUE;
continue;
}
NHEVENT_KBD(ctrl? C(*p) : *p);
ctrl = FALSE;
}
} break;
case IDM_EXIT:
done2();
break;
@@ -1090,7 +1075,7 @@ void mswin_select_map_mode(int mode)
/* update "Fit To Screen" item text */
{
TCHAR wbuf[BUFSZ];
MENUITEMINFO mi;
TBBUTTONINFO tbbi;
ZeroMemory( wbuf, sizeof(wbuf) );
if( !LoadString(
@@ -1101,17 +1086,15 @@ void mswin_select_map_mode(int mode)
panic("cannot load main menu strings");
}
ZeroMemory( &mi, sizeof(mi) );
mi.cbSize = sizeof(mi);
mi.fType = MFT_STRING;
mi.fMask = MIIM_TYPE;
mi.dwTypeData = wbuf;
mi.cch = wcslen(wbuf);
if( !SetMenuItemInfo(
hmenuMap,
ZeroMemory( &tbbi, sizeof(tbbi) );
tbbi.cbSize = sizeof(tbbi);
tbbi.dwMask = TBIF_TEXT;
tbbi.pszText = wbuf;
if( !SendMessage(
GetNHApp()->hMenuBar,
TB_SETBUTTONINFO,
IDM_MAP_FIT_TO_SCREEN,
FALSE,
&mi) ) {
(LPARAM)&tbbi) ) {
error( "Cannot update IDM_MAP_FIT_TO_SCREEN menu item." );
}
}