Skip to content

Commit

Permalink
Merge branch 'master' of github.com:chocolate-doom/chocolate-doom
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiangreffrath committed Sep 20, 2024
2 parents 5a3e8ef + aa2c403 commit 6f412f0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install \
python3-yaml \
libsdl2-dev \
libsdl2-mixer-dev \
libsdl2-net-dev \
Expand All @@ -95,7 +96,11 @@ jobs:
sdl2_net \
libpng \
libsamplerate \
python3 \
fluid-synth
# Since we're running CI inside a VM it doesn't really
# matter if we're "breaking" anything:
pip3 install --break-system-packages pyyaml
- name: Install dependencies (MSYS2)
if: runner.os == 'Windows'
Expand All @@ -114,6 +119,7 @@ jobs:
${{ matrix.config.msys-env }}-libpng
${{ matrix.config.msys-env }}-libsamplerate
${{ matrix.config.msys-env }}-fluidsynth
${{ matrix.config.msys-env }}-python3-yaml
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion quickcheck
Submodule quickcheck updated 54 files
+35 −0 .github/workflows/ci.yml
+1 −0 .gitignore
+43 −103 GNUmakefile
+9 −0 demos.txt
+1 −0 demos/.democonfig
+ demos/30id-4525.zip
+ demos/30mm8356.zip
+1 −0 demos/av/.democonfig
+ demos/av/30av-25337.lmp
+47 −0 demos/av/30av-25337.txt
+ demos/avall-41337.zip
+ demos/cyallx1904.zip
+2 −0 demos/cydreams/.democonfig
+ demos/cydreams/30cyx1904.lmp
+229 −0 demos/cydreams/30cyx1904.txt
+2 −0 demos/d2twid/.democonfig
+ demos/d2twid/30id-4525.lmp
+71 −0 demos/d2twid/30id-4525.txt
+ demos/etall-21854.zip
+1 −0 demos/eternal/.democonfig
+ demos/eternal/30et-13854.lmp
+54 −0 demos/eternal/30et-13854.txt
+ demos/h2all-22944.zip
+1 −0 demos/hr/.democonfig
+ demos/hr/hqr-4339.lmp
+57 −0 demos/hr/hqr-4339.txt
+1 −0 demos/hr2/.democonfig
+ demos/hr2/h2alls2-22944.lmp
+46 −0 demos/hr2/h2alls2-22944.txt
+ demos/hrall-4339.zip
+ demos/m2allo4938.zip
+1 −0 demos/mm/.democonfig
+ demos/mm/30mm8356.lmp
+145 −0 demos/mm/30mm8356.txt
+1 −0 demos/mm2/.democonfig
+ demos/mm2/mm2allnomo4938.lmp
+54 −0 demos/mm2/mm2allnomo4938.txt
+ demos/p2all-6504.zip
+2 −0 demos/pl2/.democonfig
+ demos/pl2/pl2all1.lmp
+36 −0 demos/pl2/pl2all1.txt
+0 −0 expected/av/30av-25337.txt
+0 −0 expected/cydreams/30cyx1904.txt
+0 −0 expected/d2twid/30id-4525.txt
+0 −0 expected/eternal/30et-13854.txt
+0 −0 expected/hr/hqr-4339.txt
+0 −0 expected/hr2/h2alls2-22944.txt
+0 −0 expected/mm/30mm8356.txt
+0 −0 expected/mm2/mm2allnomo4938.txt
+0 −0 expected/pl2/pl2all1.txt
+ iwads/miniwad.wad
+98 −0 makerules
+ miniwad.zip
+0 −28 testrunner
2 changes: 2 additions & 0 deletions src/i_glob.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@

#if defined(_WIN32)
#include <win_opendir.h>
#ifndef S_ISDIR
#define S_ISDIR(m) (((m)& S_IFMT) == S_IFDIR)
#endif
#elif defined(HAVE_DIRENT_H)
#include <dirent.h>
#include <sys/stat.h>
Expand Down
12 changes: 6 additions & 6 deletions win32/win_opendir.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,25 @@ static __ino_t __inode(const wchar_t *name)
typedef BOOL(__stdcall * pfnGetFileInformationByHandleEx)(
HANDLE hFile, dirent_FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
LPVOID lpFileInformation, DWORD dwBufferSize);
pfnGetFileInformationByHandleEx fnGetFileInformationByHandleEx;
HANDLE hFile;

HANDLE hKernel32 = GetModuleHandleW(L"kernel32.dll");
if (!hKernel32)
{
return value;
}

pfnGetFileInformationByHandleEx fnGetFileInformationByHandleEx =
fnGetFileInformationByHandleEx =
(pfnGetFileInformationByHandleEx) GetProcAddress(
hKernel32, "GetFileInformationByHandleEx");
if (!fnGetFileInformationByHandleEx)
{
return value;
}

HANDLE hFile = CreateFileW(name, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, 0, 0);
hFile = CreateFileW(name, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, 0, 0);
if (hFile == INVALID_HANDLE_VALUE)
{
return value;
Expand Down Expand Up @@ -172,8 +174,6 @@ static DIR *__internal_opendir(wchar_t *wname, int size)
{
struct __dir *data = NULL;
struct dirent *tmp_entries = NULL;
static char default_char = '?';
static wchar_t *prefix = L"\\\\?\\";
static wchar_t *suffix = L"\\*.*";
static int extra_prefix = 4; /* use prefix "\\?\" to handle long file names */
static int extra_suffix = 4; /* use suffix "\*.*" to find everything */
Expand Down Expand Up @@ -225,7 +225,7 @@ static DIR *__internal_opendir(wchar_t *wname, int size)
{
WideCharToMultiByte(CP_UTF8, 0, w32fd.cFileName, -1,
data->entries[data->index].d_name, NAME_MAX,
&default_char, NULL);
NULL, NULL);

memcpy(wname + size, w32fd.cFileName, sizeof(wchar_t) * NAME_MAX);

Expand Down

0 comments on commit 6f412f0

Please sign in to comment.