Fixed come crashes (AHA1542, general with SB tips) etc.

This commit is contained in:
waltje
2017-10-09 03:18:50 -04:00
parent fa880c2865
commit efc129eb22
5 changed files with 41 additions and 36 deletions

View File

@@ -8,7 +8,7 @@
*
* The Emulator's Windows core.
*
* Version: @(#)win.c 1.0.17 2017/10/08
* Version: @(#)win.c 1.0.18 2017/10/08
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -1263,9 +1263,6 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nFunsterStil)
/* Fire up the machine. */
pc_reset_hard();
/* Make sure the status bar is up-to-date. */
StatusBarUpdatePanes();
/*
* Everything has been configured, and all seems to work,
* so now it is time to start the main thread to do some

View File

@@ -766,7 +766,7 @@ StatusBarUpdatePanes(void)
break;
case SB_TEXT: /* Status text */
SendMessage(hwndSBAR, SB_SETTEXT, i | SBT_NOBORDERS, (LPARAM) L"");
SendMessage(hwndSBAR, SB_SETTEXT, i | SBT_NOBORDERS, (LPARAM)L"");
sb_part_icons[i] = -1;
break;
}
@@ -1116,6 +1116,7 @@ StatusBarSetTextW(wchar_t *wstr)
int part = -1;
int i;
pclog("SB_settext(%ws)", wstr);
if (!sb_ready || (sb_parts == 0) || (sb_part_meanings == NULL)) return;
for (i=0; i<sb_parts; i++) {
@@ -1123,9 +1124,11 @@ StatusBarSetTextW(wchar_t *wstr)
part = i;
}
}
pclog(" part=%d", part);
if (part != -1)
SendMessage(hwndSBAR, SB_SETTEXT, part | SBT_NOBORDERS, (LPARAM)wstr);
pclog(" done\n");
}