This commit is contained in:
nhmall
2018-11-11 10:29:52 -05:00
parent e486d941ed
commit a0b53ee391
43 changed files with 832 additions and 280 deletions

View File

@@ -8,3 +8,4 @@
*.props NH_header=no
resource.h NH_header=no
nhresource.h NH_header=no
* NH_filestag=(file%s_for_Windows_versions_-_tested_up_to_Windows_10)

1
win/win32/vs2017/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* NH_filestag=(file%s_for_Visual_Studio_2017_Community_Edition_builds)

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">unaware</dpiAwareness>
<!-- <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness> -->
<!-- <gdiScaling xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings">true</gdiScaling> -->
</windowsSettings>
</application>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!-- Windows 7 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> <!-- Windows 8 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!-- Windows 8.1 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> <!-- Windows 10 -->
</application>
</compatibility>
</assembly>

View File

@@ -30,6 +30,9 @@
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Manifest>
<AdditionalManifestFiles>NethackW.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="$(SrcDir)allmain.c" />
@@ -152,6 +155,7 @@
<PreprocessorDefinitions>TTYSTUB;</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="$(SysWinntDir)winnt.c" />
<ClCompile Include="$(SysWinntDir)win10.c" />
<ClCompile Include="$(WinWin32Dir)mhaskyn.c" />
<ClCompile Include="$(WinWin32Dir)mhdlg.c" />
<ClCompile Include="$(WinWin32Dir)mhfont.c" />
@@ -180,4 +184,4 @@
<Target Name="AfterRebuild">
<MSBuild Projects="afternethack.proj" Targets="Build" Properties="Configuration=$(Configuration)" />
</Target>
</Project>
</Project>

View File

@@ -12,6 +12,7 @@
#include "resource.h"
#include "mhmain.h"
#include "mhmap.h"
#include "win10.h"
/* Borland and MinGW redefine "boolean" in shlwapi.h,
so just use the little bit we need */
@@ -88,18 +89,18 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
UNREFERENCED_PARAMETER(lpCmdLine);
UNREFERENCED_PARAMETER(nCmdShow);
//
/* We must initialize state sufficiently to support calls to panic */
// We need to support DPI awareness.
//
// BOOL result = SetProcessDpiAwarenessContext(
// DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
//
/* We must initialize state sufficiently to support calls to panic */
windowprocs.win_raw_print = mswin_raw_print;
windowprocs.win_raw_print_bold = mswin_raw_print_bold;
windowprocs.win_wait_synch = mswin_wait_synch;
win10_init();
sys_early_init();
/* init applicatio structure */