some mingw bits to move its gui variation closer to building and running

This commit is contained in:
nhmall
2020-06-11 12:26:44 -04:00
parent b87d2242af
commit f365bdd254
6 changed files with 43 additions and 16 deletions

View File

@@ -300,7 +300,7 @@ enum player_selector_control {
psc_control_count
};
static const s_psc_id[psc_control_count] = {
static const int s_psc_id[psc_control_count] = {
IDC_PLSEL_NAME_GROUP,
IDC_PLSEL_ROLE_GROUP,
IDC_PLSEL_RACE_GROUP,

View File

@@ -1333,12 +1333,18 @@ mswin_raw_print_flush()
{
if (raw_print_strbuf.str != NULL) {
int wlen = strlen(raw_print_strbuf.str) + 1;
TCHAR * wbuf = (TCHAR *) alloc(wlen * sizeof(TCHAR));
if (wbuf != NULL) {
NHMessageBox(GetNHApp()->hMainWnd,
if (strcmp(raw_print_strbuf.str, "\n") != 0
#ifdef _MSC_VER
|| IsDebuggerPresent()
#endif
) {
TCHAR * wbuf = (TCHAR *) alloc(wlen * sizeof(TCHAR));
if (wbuf != NULL) {
NHMessageBox(GetNHApp()->hMainWnd,
NH_A2W(raw_print_strbuf.str, wbuf, wlen),
MB_ICONINFORMATION | MB_OK);
free(wbuf);
free(wbuf);
}
}
strbuf_empty(&raw_print_strbuf);
}