merge
This commit is contained in:
1
sys/amiga/.gitattributes
vendored
1
sys/amiga/.gitattributes
vendored
@@ -1 +1,2 @@
|
||||
*.p NHSUBST
|
||||
* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.2)
|
||||
|
||||
1
sys/atari/.gitattributes
vendored
Normal file
1
sys/atari/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.2)
|
||||
1
sys/be/.gitattributes
vendored
Normal file
1
sys/be/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.2)
|
||||
1
sys/mac/.gitattributes
vendored
1
sys/mac/.gitattributes
vendored
@@ -1 +1,2 @@
|
||||
NHDeflts NHSUBST
|
||||
* NH_filestag=(file%s_for_68K_Macintosh_versions)
|
||||
|
||||
3
sys/msdos/.gitattributes
vendored
3
sys/msdos/.gitattributes
vendored
@@ -4,3 +4,6 @@ Makefile.* NHSUBST
|
||||
Install.* NHSUBST
|
||||
moveinit.pat NH_header=no
|
||||
vesa.h NH_header=no
|
||||
* NH_filestag=(file%s_for_MSDOS_version_-_untested_for_3.6.2)
|
||||
nhico.uu NH_filestag=(file%s_for_running_MSDOS_binary_under_Windows)
|
||||
nhpif.uu NH_filestag=>nhico.uu
|
||||
|
||||
1
sys/os2/.gitattributes
vendored
1
sys/os2/.gitattributes
vendored
@@ -1 +1,2 @@
|
||||
Makefile.* NHSUBST
|
||||
* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.2)
|
||||
|
||||
38
sys/share/.gitattributes
vendored
38
sys/share/.gitattributes
vendored
@@ -4,3 +4,41 @@ termcap NH_header=no
|
||||
dgn_comp.h NH_header=no
|
||||
lev_comp.h NH_header=no
|
||||
Makefile.lib NH_header=no
|
||||
|
||||
Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.2)
|
||||
#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.2)
|
||||
termcap.uu NH_filestag=>Makefile.lib
|
||||
|
||||
pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_NT,_Amiga,_and_Atari_versions_-_untested_for_3.6.2)
|
||||
|
||||
pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2,_NT,_and_Atari_versions_-_untested_for_3.6.2)
|
||||
pcunix.c NH_filestag=>pcsys.c
|
||||
|
||||
NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.2)
|
||||
pctty.c NH_filestag=>NetHack.cnf
|
||||
|
||||
ioctl.c NH_filestag=(file%s_for_UNIX_and_Be_versions)
|
||||
unixtty.c NH_filestag=>ioctl.c
|
||||
|
||||
nhlan.c NH_filestag=(file_for_NT_version)
|
||||
|
||||
random.c NH_filestag=(Berkeley_random_number_file,_which_may_be_included_in_any_version)
|
||||
|
||||
uudecode.c NH_filestag=(Berkeley_uudecode_file,_which_may_be_used_in_build_process_of_any_version)
|
||||
|
||||
tclib.c NH_filestag=(file_for_VMS_version)
|
||||
|
||||
termcap NH_filestag=(file_for_MSDOS,_OS/2,_and_VMS_versions)
|
||||
|
||||
dgn_comp.h NH_filestag=(lex/yacc_output_for_special_level_and_dungeon_compilers)
|
||||
dgn_lex.c NH_filestag=>dgn_comp.h
|
||||
dgn_yacc.c NH_filestag=>dgn_comp.h
|
||||
lev_comp.h NH_filestag=>dgn_comp.h
|
||||
lev_lex.c NH_filestag=>dgn_comp.h
|
||||
lev_yacc.c NH_filestag=>dgn_comp.h
|
||||
|
||||
posixregex.c NH_filestag=60(posix_regex_for_versions_that_include_regex_in_their_C_library)
|
||||
|
||||
cppregex.cpp NH_filestag=61(c++_regex_code_for_versions_that_can_build_a_C++_module_and_link_it_in)
|
||||
|
||||
pmatchregex.c NH_filestag=62(pmatch_regex_for_other_versions)
|
||||
|
||||
1
sys/share/sounds/.gitattributes
vendored
Normal file
1
sys/share/sounds/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* NH_filestag=(file%s_for_Amiga_and_Macintosh_versions)
|
||||
3
sys/unix/.gitattributes
vendored
3
sys/unix/.gitattributes
vendored
@@ -5,3 +5,6 @@ README.linux NHSUBST
|
||||
depend.awk NHSUBST
|
||||
sysconf NHSUBST
|
||||
*shr NH_header=no
|
||||
* NH_filestag=(file%s_for_UNIX_versions)
|
||||
cpp?.shr NH_filestag=(file%s_for_replacement_cpp,_only_needed_by_some_ancient_UNIX_systems)
|
||||
snd86unx.shr NH_filestag=(file%s_for_sound_driver_for_386_UNIX)
|
||||
|
||||
1
sys/unix/hints/.gitattributes
vendored
1
sys/unix/hints/.gitattributes
vendored
@@ -1 +1,2 @@
|
||||
* NHSUBST
|
||||
* NH_filestag=(file%s_for_configuring_UNIX_NetHack_versions)
|
||||
|
||||
1
sys/vms/.gitattributes
vendored
1
sys/vms/.gitattributes
vendored
@@ -2,3 +2,4 @@ Makefile.* NHSUBST
|
||||
*.com NHSUBST
|
||||
Install.vms NHSUBST
|
||||
sysconf NHSUBST
|
||||
* NH_filestag=(file%s_for_VMS_version)
|
||||
|
||||
1
sys/wince/.gitattributes
vendored
1
sys/wince/.gitattributes
vendored
@@ -1,3 +1,4 @@
|
||||
*.ce NHSUBST
|
||||
*.mak NHSUBST
|
||||
*.bat NHSUBST
|
||||
* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2)
|
||||
|
||||
1
sys/wince/ceinc/.gitattributes
vendored
Normal file
1
sys/wince/ceinc/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2)
|
||||
1
sys/wince/ceinc/sys/.gitattributes
vendored
Normal file
1
sys/wince/ceinc/sys/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* NH_filestag=(sys/stat.h_for_Windows_CE_and_PocketPC_-_untested_for_3.6.2)
|
||||
3
sys/winnt/.gitattributes
vendored
3
sys/winnt/.gitattributes
vendored
@@ -5,3 +5,6 @@ sysconf NHSUBST
|
||||
*.rc NHSUBST
|
||||
*.bat NHSUBST
|
||||
*.def NH_header=no
|
||||
* NH_filestag=(file%s_for_Windows_7/8.x/10_version)
|
||||
..files NH_filegenerated=nethack.ico
|
||||
nethack.ico NH_filesgentag=(file%s_generated_by_uudecode_at_compile_time)
|
||||
|
||||
42
sys/winnt/win10.c
Normal file
42
sys/winnt/win10.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/* NetHack 3.6 win10.c $NHDT-Date: 1432512810 2015/05/25 00:13:30 $ $NHDT-Branch: master $:$NHDT-Revision: 1.15 $ */
|
||||
/* Copyright (C) 2018 by Bart House */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#include <process.h>
|
||||
#include "winMS.h"
|
||||
#include "hack.h"
|
||||
#include "win10.h"
|
||||
#include <VersionHelpers.h>
|
||||
|
||||
Win10 gWin10 = { 0 };
|
||||
|
||||
void win10_init()
|
||||
{
|
||||
if (IsWindows10OrGreater())
|
||||
{
|
||||
HINSTANCE hUser32 = LoadLibraryA("user32.dll");
|
||||
|
||||
if (hUser32 == NULL)
|
||||
panic("Unable to load user32.dll");
|
||||
|
||||
gWin10.GetThreadDpiAwarenessContext = (GetThreadDpiAwarenessContextProc) GetProcAddress(hUser32, "GetThreadDpiAwarenessContext");
|
||||
if (gWin10.GetThreadDpiAwarenessContext == NULL)
|
||||
panic("Unable to get address of GetThreadDpiAwarenessContext()");
|
||||
|
||||
gWin10.AreDpiAwarenessContextsEqual = (AreDpiAwarenessContextsEqualProc) GetProcAddress(hUser32, "AreDpiAwarenessContextsEqual");
|
||||
if (gWin10.AreDpiAwarenessContextsEqual == NULL)
|
||||
panic("Unable to get address of AreDpiAwarenessContextsEqual");
|
||||
|
||||
FreeLibrary(hUser32);
|
||||
|
||||
gWin10.Valid = TRUE;
|
||||
}
|
||||
|
||||
if (gWin10.Valid) {
|
||||
if (!gWin10.AreDpiAwarenessContextsEqual(
|
||||
gWin10.GetThreadDpiAwarenessContext(),
|
||||
DPI_AWARENESS_CONTEXT_UNAWARE))
|
||||
panic("Unexpected DpiAwareness state");
|
||||
}
|
||||
|
||||
}
|
||||
17
sys/winnt/win10.h
Normal file
17
sys/winnt/win10.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/* NetHack 3.6 win10.h $NHDT-Date: 1432512810 2015/05/25 00:13:30 $ $NHDT-Branch: master $:$NHDT-Revision: 1.15 $ */
|
||||
/* Copyright (C) 2018 by Bart House */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
typedef DPI_AWARENESS_CONTEXT(WINAPI * GetThreadDpiAwarenessContextProc)(VOID);
|
||||
typedef BOOL (WINAPI *AreDpiAwarenessContextsEqualProc)(DPI_AWARENESS_CONTEXT dpiContextA, DPI_AWARENESS_CONTEXT dpiContextB);
|
||||
|
||||
typedef struct {
|
||||
BOOL Valid;
|
||||
GetThreadDpiAwarenessContextProc GetThreadDpiAwarenessContext;
|
||||
AreDpiAwarenessContextsEqualProc AreDpiAwarenessContextsEqual;
|
||||
} Win10;
|
||||
|
||||
extern Win10 gWin10;
|
||||
|
||||
void win10_init();
|
||||
|
||||
Reference in New Issue
Block a user