Merge pull request #1388 from ts-korhonen/master

Fixes to CMake/msvc/clang builds and debug builds
This commit is contained in:
Miran Grča
2021-04-21 21:43:49 +02:00
committed by GitHub
3 changed files with 6 additions and 4 deletions

View File

@@ -30,6 +30,9 @@ if(MSVC)
target_sources(86Box PRIVATE 86Box.manifest)
target_sources(plat PRIVATE win_opendir.c)
# Append null to resource strings (fixes file dialogs)
set_property(SOURCE 86Box.rc PROPERTY COMPILE_FLAGS -n)
endif()
if(DINPUT)

View File

@@ -17,8 +17,6 @@
* Copyright 1998-2007 MicroWalt Corporation
* Copyright 2017 Fred N. van Kempen
*/
#define UNICODE
#include <windows.h>
#include <io.h>
#include <stdio.h>
#include <stdint.h>
@@ -158,10 +156,11 @@ readdir(DIR *p)
default: /* regular entry. */
#ifdef UNICODE
wcsncpy(p->dent.d_name, ffp->name, MAXNAMLEN+1);
p->dent.d_reclen = (char)wcslen(p->dent.d_name);
#else
strncpy(p->dent.d_name, ffp->name, MAXNAMLEN+1);
p->dent.d_reclen = (char)strlen(p->dent.d_name);
#endif
p->dent.d_reclen = (char) wcslen(p->dent.d_name);
}
/* Read next entry. */

View File

@@ -5060,7 +5060,7 @@ static BOOL
win_settings_categories_init_columns(HWND hdlg)
{
LVCOLUMN lvc;
int iCol;
int iCol = 0;
HWND hwndList = GetDlgItem(hdlg, IDC_SETTINGSCATLIST);
lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;