Skip to content

Commit

Permalink
Oh well
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreijstal committed Jan 7, 2025
1 parent fc8b175 commit f910437
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/MSYS2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
qt6-webchannel:p
qt6-websockets:p
x264:p
cc:p
- name: Configure and build RetroArch
shell: msys2 {0}
Expand Down
20 changes: 10 additions & 10 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -2648,16 +2648,16 @@ ifeq ($(HAVE_ODROIDGO2), 1)
gfx/drivers/oga_gfx.o
endif


ifneq ($(findstring Win32,$(OS)),)
# This block executes only if $(OS) contains "Win32"
NT_VERSION := $(shell echo "#include <windows.h>" > temp.c; \
echo "#ifdef _WIN32_WINNT" >> temp.c; \
echo "#define GET_MACRO_VALUE(x) #x" >> temp.c; \
echo "#define EXPAND_MACRO_VALUE(x) GET_MACRO_VALUE(x)" >> temp.c; \
echo "#pragma message (\"_WIN32_WINNT=\" EXPAND_MACRO_VALUE(_WIN32_WINNT))" >> temp.c; \
echo "#endif" >> temp.c; \
$(CC) -c temp.c 2>&1 | sed -n 's/^.*_WIN32_WINNT=\(0x[0-9A-Fa-f]\+\).*/\1/p'; \
ifneq ($(shell sh -c 'command -v sh'),) # Check if we have a Unix shell
# This block executes only if $(OS) contains "Win32" and we're in a Unix shell
NT_VERSION := $(shell echo "#include <windows.h>" > temp.c && \
echo "#ifdef _WIN32_WINNT" >> temp.c && \
echo "#define GET_MACRO_VALUE(x) #x" >> temp.c && \
echo "#define EXPAND_MACRO_VALUE(x) GET_MACRO_VALUE(x)" >> temp.c && \
echo "#pragma message (\"_WIN32_WINNT=\" EXPAND_MACRO_VALUE(_WIN32_WINNT))" >> temp.c && \
echo "#endif" >> temp.c && \
$(CC) -c temp.c 2>&1 | sed -n 's/^.*_WIN32_WINNT=\(0x[0-9A-Fa-f]\+\).*/\1/p' && \
rm -f temp.c temp.o)

# Check if NT_VERSION is greater than 0x602
Expand All @@ -2669,5 +2669,5 @@ else
$(warning Windows NT version macro (_WIN32_WINNT) is not defined.)
endif
endif

endif
##################################

0 comments on commit f910437

Please sign in to comment.