Attached Files | cygwinfix.diff [^] (6,076 bytes) 2022-12-28 20:04 [Show Content] [Hide Content]# HG changeset patch
# User TDRR <srb2gamer@gmail.com>
# Date 1672256982 14400
# Wed Dec 28 15:49:42 2022 -0400
# Node ID 328a5e1159b33ddb1113e8d463b1fbf3dc2a17a3
# Parent d71e6eb5bec483faef87665903dd65e9283482be
Fix compilation under Cygwin
diff -r d71e6eb5bec4 -r 328a5e1159b3 CMakeLists.txt
--- a/CMakeLists.txt Fri Dec 16 10:46:24 2022 -0500
+++ b/CMakeLists.txt Wed Dec 28 15:49:42 2022 -0400
@@ -1,6 +1,8 @@
cmake_minimum_required( VERSION 2.4 )
project(Zandronum)
+set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
+
list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} )
include( CreateLaunchers )
include( FindPackageHandleStandardArgs )
@@ -159,6 +161,10 @@
set( DEB_C_FLAGS "" )
endif( MSVC )
+if( CYGWIN )
+ set( ALL_C_FLAGS "-D_GNU_SOURCE" )
+endif( CYGWIN )
+
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${REL_LINKER_FLAGS}" )
set( CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} ${REL_LINKER_FLAGS}" )
set( CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} ${REL_LINKER_FLAGS}" )
diff -r d71e6eb5bec4 -r 328a5e1159b3 output_sdl/CMakeLists.txt
--- a/output_sdl/CMakeLists.txt Fri Dec 16 10:46:24 2022 -0500
+++ b/output_sdl/CMakeLists.txt Wed Dec 28 15:49:42 2022 -0400
@@ -1,4 +1,7 @@
cmake_minimum_required( VERSION 2.4 )
+
+if( NOT NO_SOUND )
+
add_library( output_sdl MODULE output_sdl.c )
include_directories( ${FMOD_INCLUDE_DIR} ${SDL_INCLUDE_DIR} )
@@ -6,3 +9,5 @@
add_custom_command( TARGET output_sdl POST_BUILD
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/link-make
COMMAND /bin/sh -c ${CMAKE_CURRENT_BINARY_DIR}/link-make )
+
+endif( NOT NO_SOUND )
\ No newline at end of file
diff -r d71e6eb5bec4 -r 328a5e1159b3 rcon_utility/zstrformat.cpp
--- a/rcon_utility/zstrformat.cpp Fri Dec 16 10:46:24 2022 -0500
+++ b/rcon_utility/zstrformat.cpp Wed Dec 28 15:49:42 2022 -0400
@@ -13,6 +13,10 @@
typedef signed __int64 int64_t;
#endif
+#ifdef __CYGWIN__
+#include <alloca.h>
+#endif
+
// Even though the standard C library has a function to do printf-style formatting in a
// generic way, there is no standard interface to this function. So if you want to do
// some printf formatting that doesn't fit in the context of the provided functions,
diff -r d71e6eb5bec4 -r 328a5e1159b3 src/farchive.cpp
--- a/src/farchive.cpp Fri Dec 16 10:46:24 2022 -0500
+++ b/src/farchive.cpp Wed Dec 28 15:49:42 2022 -0400
@@ -57,6 +57,10 @@
#include "m_misc.h"
#include "dobject.h"
+#ifdef __CYGWIN__
+#include <alloca.h>
+#endif
+
// These are special tokens found in the data stream of an archive.
// Whenever a new object is encountered, it gets created using new and
// is then asked to serialize itself before processing of the previous
diff -r d71e6eb5bec4 -r 328a5e1159b3 src/gccinlines.h
--- a/src/gccinlines.h Fri Dec 16 10:46:24 2022 -0500
+++ b/src/gccinlines.h Wed Dec 28 15:49:42 2022 -0400
@@ -24,7 +24,9 @@
#include <stdlib.h>
-#ifndef alloca
+#ifdef __CYGWIN__
+#include <alloca.h>
+#elif !defined(alloca)
// MinGW does not seem to come with alloca defined.
#define alloca __builtin_alloca
#endif
diff -r d71e6eb5bec4 -r 328a5e1159b3 src/m_png.cpp
--- a/src/m_png.cpp Fri Dec 16 10:46:24 2022 -0500
+++ b/src/m_png.cpp Wed Dec 28 15:49:42 2022 -0400
@@ -41,6 +41,10 @@
#include <malloc.h> // for alloca()
#endif
+#ifdef __CYGWIN__
+#include <alloca.h>
+#endif
+
#include "m_crc32.h"
#include "m_swap.h"
#include "c_cvars.h"
diff -r d71e6eb5bec4 -r 328a5e1159b3 src/p_glnodes.cpp
--- a/src/p_glnodes.cpp Fri Dec 16 10:46:24 2022 -0500
+++ b/src/p_glnodes.cpp Wed Dec 28 15:49:42 2022 -0400
@@ -35,6 +35,10 @@
#include <malloc.h> // for alloca()
#endif
+#ifdef __CYGWIN__
+#include <alloca.h>
+#endif
+
#ifndef _WIN32
#include <unistd.h>
diff -r d71e6eb5bec4 -r 328a5e1159b3 src/p_setup.cpp
--- a/src/p_setup.cpp Fri Dec 16 10:46:24 2022 -0500
+++ b/src/p_setup.cpp Wed Dec 28 15:49:42 2022 -0400
@@ -28,6 +28,10 @@
#include <malloc.h> // for alloca()
#endif
+#ifdef __CYGWIN__
+#include <alloca.h>
+#endif
+
// [BB] network.h has to be included before stats.h under Linux.
// The reason should be investigated.
#include "network.h"
diff -r d71e6eb5bec4 -r 328a5e1159b3 src/r_things.cpp
--- a/src/r_things.cpp Fri Dec 16 10:46:24 2022 -0500
+++ b/src/r_things.cpp Wed Dec 28 15:49:42 2022 -0400
@@ -70,6 +70,10 @@
#include "network.h"
#include "gamemode.h"
+#ifdef __CYGWIN__
+#include <alloca.h>
+#endif
+
// [RH] A c-buffer. Used for keeping track of offscreen voxel spans.
struct FCoverageBuffer
diff -r d71e6eb5bec4 -r 328a5e1159b3 src/sdl/i_system.h
--- a/src/sdl/i_system.h Fri Dec 16 10:46:24 2022 -0500
+++ b/src/sdl/i_system.h Wed Dec 28 15:49:42 2022 -0400
@@ -152,6 +152,8 @@
#define FA_DIREC 8
#define FA_ARCH 16
+// [TDRR] Cygwin already provides an implementation, which is functionally identical.
+#ifndef __CYGWIN__
static inline char *strlwr(char *str)
{
char *ptr = str;
@@ -162,5 +164,6 @@
}
return str;
}
+#endif
#endif
diff -r d71e6eb5bec4 -r 328a5e1159b3 src/textures/multipatchtexture.cpp
--- a/src/textures/multipatchtexture.cpp Fri Dec 16 10:46:24 2022 -0500
+++ b/src/textures/multipatchtexture.cpp Wed Dec 28 15:49:42 2022 -0400
@@ -51,6 +51,10 @@
#include "textures/textures.h"
#include "r_data/colormaps.h"
+#ifdef __CYGWIN__
+#include <alloca.h>
+#endif
+
// On the Alpha, accessing the shorts directly if they aren't aligned on a
// 4-byte boundary causes unaligned access warnings. Why it does this at
// all and only while initing the textures is beyond me.
diff -r d71e6eb5bec4 -r 328a5e1159b3 src/textures/warptexture.cpp
--- a/src/textures/warptexture.cpp Fri Dec 16 10:46:24 2022 -0500
+++ b/src/textures/warptexture.cpp Wed Dec 28 15:49:42 2022 -0400
@@ -39,6 +39,10 @@
#include "r_utility.h"
#include "textures/textures.h"
+#ifdef __CYGWIN__
+#include <alloca.h>
+#endif
+
FWarpTexture::FWarpTexture (FTexture *source)
: GenTime (0), SourcePic (source), Pixels (0), Spans (0), Speed (1.f)
cygwinsoundfix.diff [^] (16,867 bytes) 2022-12-29 03:28 [Show Content] [Hide Content]# HG changeset patch
# User TDRR <srb2gamer@gmail.com>
# Date 1672284412 14400
# Wed Dec 28 23:26:52 2022 -0400
# Node ID b581638b1ee388036c03bb8d37df480ef7816279
# Parent 328a5e1159b33ddb1113e8d463b1fbf3dc2a17a3
Fix cygwin compilation with sound support
diff -r 328a5e1159b3 -r b581638b1ee3 output_sdl/CMakeLists.txt
--- a/output_sdl/CMakeLists.txt Wed Dec 28 15:49:42 2022 -0400
+++ b/output_sdl/CMakeLists.txt Wed Dec 28 23:26:52 2022 -0400
@@ -5,6 +5,10 @@
add_library( output_sdl MODULE output_sdl.c )
include_directories( ${FMOD_INCLUDE_DIR} ${SDL_INCLUDE_DIR} )
+if( CYGWIN )
+ target_link_libraries( output_sdl -lSDL )
+endif( CYGWIN )
+
FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/link-make "if [ ! -e ${ZDOOM_OUTPUT_DIR}/liboutput_sdl.so ]; then ln -sf output_sdl/liboutput_sdl.so ${ZDOOM_OUTPUT_DIR}/liboutput_sdl.so; fi" )
add_custom_command( TARGET output_sdl POST_BUILD
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/link-make
diff -r 328a5e1159b3 -r b581638b1ee3 src/sound/fmod_wrap.h
--- a/src/sound/fmod_wrap.h Wed Dec 28 15:49:42 2022 -0400
+++ b/src/sound/fmod_wrap.h Wed Dec 28 23:26:52 2022 -0400
@@ -2,7 +2,7 @@
#ifndef FMOD_WRAP_H
#define FMOD_WRAP_H
-#if !defined(_WIN32) || defined(_MSC_VER)
+#if (!defined(_WIN32) || defined(_MSC_VER)) && !defined(__CYGWIN__)
// Use the real C++ interface if it's supported on this platform.
#include "fmod.hpp"
#else
@@ -77,17 +77,17 @@
FMOD_RESULT getOutput (FMOD_OUTPUTTYPE *output) { return FMOD_System_GetOutput(this, output); }
FMOD_RESULT getNumDrivers (int *numdrivers) { return FMOD_System_GetNumDrivers(this, numdrivers); }
FMOD_RESULT getDriverInfo (int id, char *name, int namelen, FMOD_GUID *guid) { return FMOD_System_GetDriverInfo(this, id, name, namelen, guid); }
- FMOD_RESULT getDriverCaps (int id, FMOD_CAPS *caps, int *minfrequency, int *maxfrequency, FMOD_SPEAKERMODE *controlpanelspeakermode) { return FMOD_System_GetDriverCaps(this, id, caps, minfrequency, maxfrequency, controlpanelspeakermode); }
+ FMOD_RESULT getDriverCaps (int id, FMOD_CAPS *caps, int *controlpaneloutputrate, FMOD_SPEAKERMODE *controlpanelspeakermode) { return FMOD_System_GetDriverCaps(this, id, caps, controlpaneloutputrate, controlpanelspeakermode); }
FMOD_RESULT setDriver (int driver) { return FMOD_System_SetDriver(this, driver); }
FMOD_RESULT getDriver (int *driver) { return FMOD_System_GetDriver(this, driver); }
- FMOD_RESULT setHardwareChannels (int min2d, int max2d, int min3d, int max3d) { return FMOD_System_SetHardwareChannels(this, min2d, max2d, min3d, max3d); }
+ FMOD_RESULT setHardwareChannels (int numhardwarechannels) { return FMOD_System_SetHardwareChannels(this, numhardwarechannels); }
FMOD_RESULT setSoftwareChannels (int numsoftwarechannels) { return FMOD_System_SetSoftwareChannels(this, numsoftwarechannels); }
FMOD_RESULT getSoftwareChannels (int *numsoftwarechannels) { return FMOD_System_GetSoftwareChannels(this, numsoftwarechannels); }
FMOD_RESULT setSoftwareFormat (int samplerate, FMOD_SOUND_FORMAT format, int numoutputchannels, int maxinputchannels, FMOD_DSP_RESAMPLER resamplemethod) { return FMOD_System_SetSoftwareFormat(this, samplerate, format, numoutputchannels, maxinputchannels, resamplemethod); }
FMOD_RESULT getSoftwareFormat (int *samplerate, FMOD_SOUND_FORMAT *format, int *numoutputchannels, int *maxinputchannels, FMOD_DSP_RESAMPLER *resamplemethod, int *bits) { return FMOD_System_GetSoftwareFormat(this, samplerate, format, numoutputchannels, maxinputchannels, resamplemethod, bits); }
FMOD_RESULT setDSPBufferSize (unsigned int bufferlength, int numbuffers) { return FMOD_System_SetDSPBufferSize(this, bufferlength, numbuffers); }
FMOD_RESULT getDSPBufferSize (unsigned int *bufferlength, int *numbuffers) { return FMOD_System_GetDSPBufferSize(this, bufferlength, numbuffers); }
- FMOD_RESULT setFileSystem (FMOD_FILE_OPENCALLBACK useropen, FMOD_FILE_CLOSECALLBACK userclose, FMOD_FILE_READCALLBACK userread, FMOD_FILE_SEEKCALLBACK userseek, int blockalign) { return FMOD_System_SetFileSystem(this, useropen, userclose, userread, userseek, blockalign); }
+ FMOD_RESULT setFileSystem (FMOD_FILE_OPENCALLBACK useropen, FMOD_FILE_CLOSECALLBACK userclose, FMOD_FILE_READCALLBACK userread, FMOD_FILE_SEEKCALLBACK userseek, FMOD_FILE_ASYNCREADCALLBACK userasyncread, FMOD_FILE_ASYNCCANCELCALLBACK userasynccancel, int blockalign) { return FMOD_System_SetFileSystem(this, useropen, userclose, userread, userseek, userasyncread, userasynccancel, blockalign); }
FMOD_RESULT attachFileSystem (FMOD_FILE_OPENCALLBACK useropen, FMOD_FILE_CLOSECALLBACK userclose, FMOD_FILE_READCALLBACK userread, FMOD_FILE_SEEKCALLBACK userseek) { return FMOD_System_AttachFileSystem(this, useropen, userclose, userread, userseek); }
FMOD_RESULT setAdvancedSettings (FMOD_ADVANCEDSETTINGS *settings) { return FMOD_System_SetAdvancedSettings(this, settings); }
FMOD_RESULT getAdvancedSettings (FMOD_ADVANCEDSETTINGS *settings) { return FMOD_System_GetAdvancedSettings(this, settings); }
@@ -104,7 +104,8 @@
FMOD_RESULT getPluginInfo (unsigned int handle, FMOD_PLUGINTYPE *plugintype, char *name, int namelen, unsigned int *version) { return FMOD_System_GetPluginInfo(this, handle, plugintype, name, namelen, version); }
FMOD_RESULT setOutputByPlugin (unsigned int handle) { return FMOD_System_SetOutputByPlugin(this, handle); }
FMOD_RESULT getOutputByPlugin (unsigned int *handle) { return FMOD_System_GetOutputByPlugin(this, handle); }
- FMOD_RESULT createCodec (FMOD_CODEC_DESCRIPTION *description, unsigned int priority = 0) { return FMOD_System_CreateCodec(this, description, priority); }
+ FMOD_RESULT registerCodec (FMOD_CODEC_DESCRIPTION *description, unsigned int *handle, unsigned int priority = 0) { return FMOD_System_RegisterCodec(this, description, handle, priority); }
+ FMOD_RESULT registerDSP (FMOD_DSP_DESCRIPTION *description, unsigned int *handle) { return FMOD_System_RegisterDSP(this, description, handle); }
// Init/Close
FMOD_RESULT init (int maxchannels, FMOD_INITFLAGS flags, void *extradriverdata) { return FMOD_System_Init(this, maxchannels, flags, extradriverdata); }
@@ -130,12 +131,8 @@
FMOD_RESULT getVersion (unsigned int *version) { return FMOD_System_GetVersion(this, version); }
FMOD_RESULT getOutputHandle (void **handle) { return FMOD_System_GetOutputHandle(this, handle); }
FMOD_RESULT getChannelsPlaying (int *channels) { return FMOD_System_GetChannelsPlaying(this, channels); }
- FMOD_RESULT getHardwareChannels (int *num2d, int *num3d, int *total) { return FMOD_System_GetHardwareChannels(this, num2d, num3d, total); }
-#if FMOD_VERSION < 0x42501
- FMOD_RESULT getCPUUsage (float *dsp, float *stream, float *update, float *total) { return FMOD_System_GetCPUUsage(this, dsp, stream, update, total); }
-#else
+ FMOD_RESULT getHardwareChannels (int *numhardwarechannels) { return FMOD_System_GetHardwareChannels(this, numhardwarechannels); }
FMOD_RESULT getCPUUsage (float *dsp, float *stream, float *geometry, float *update, float *total) { return FMOD_System_GetCPUUsage(this, dsp, stream, geometry, update, total); }
-#endif
FMOD_RESULT getSoundRAM (int *currentalloced, int *maxalloced, int *total) { return FMOD_System_GetSoundRAM(this, currentalloced, maxalloced, total); }
FMOD_RESULT getNumCDROMDrives (int *numdrives) { return FMOD_System_GetNumCDROMDrives(this, numdrives); }
FMOD_RESULT getCDROMDriveName (int drive, char *drivename, int drivenamelen, char *scsiname, int scsinamelen, char *devicename, int devicenamelen) { return FMOD_System_GetCDROMDriveName(this, drive, drivename, drivenamelen, scsiname, scsinamelen, devicename, devicenamelen); }
@@ -196,7 +193,7 @@
FMOD_RESULT setUserData (void *userdata) { return FMOD_System_SetUserData(this, userdata); }
FMOD_RESULT getUserData (void **userdata) { return FMOD_System_GetUserData(this, userdata); }
- FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array) { return FMOD_System_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_array); }
+ FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) { return FMOD_System_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_details); }
};
/*
@@ -235,7 +232,7 @@
FMOD_RESULT getNumSubSounds (int *numsubsounds) { return FMOD_Sound_GetNumSubSounds(this, numsubsounds); }
FMOD_RESULT getNumTags (int *numtags, int *numtagsupdated) { return FMOD_Sound_GetNumTags(this, numtags, numtagsupdated); }
FMOD_RESULT getTag (const char *name, int index, FMOD_TAG *tag) { return FMOD_Sound_GetTag(this, name, index, tag); }
- FMOD_RESULT getOpenState (FMOD_OPENSTATE *openstate, unsigned int *percentbuffered, bool *starving) { FMOD_BOOL b; FMOD_RESULT res = FMOD_Sound_GetOpenState(this, openstate, percentbuffered, &b); *starving = b; return res; }
+ FMOD_RESULT getOpenState (FMOD_OPENSTATE *openstate, unsigned int *percentbuffered, bool *starving, bool *diskbusy) {FMOD_BOOL starvingB, diskbusyB; FMOD_RESULT res = FMOD_Sound_GetOpenState(this, openstate, percentbuffered, &starvingB, &diskbusyB); *starving = starvingB; *diskbusy = diskbusyB; return res;}
FMOD_RESULT readData (void *buffer, unsigned int lenbytes, unsigned int *read) { return FMOD_Sound_ReadData(this, buffer, lenbytes, read); }
FMOD_RESULT seekData (unsigned int pcm) { return FMOD_Sound_SeekData(this, pcm); }
@@ -261,7 +258,7 @@
FMOD_RESULT setUserData (void *userdata) { return FMOD_Sound_SetUserData(this, userdata); }
FMOD_RESULT getUserData (void **userdata) { return FMOD_Sound_GetUserData(this, userdata); }
- FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array) { return FMOD_Sound_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_array); }
+ FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) { return FMOD_Sound_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_details); }
};
/*
@@ -354,7 +351,7 @@
FMOD_RESULT setUserData (void *userdata) { return FMOD_Channel_SetUserData(this, userdata); }
FMOD_RESULT getUserData (void **userdata) { return FMOD_Channel_GetUserData(this, userdata); }
- FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array) { return FMOD_Channel_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_array); }
+ FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) { return FMOD_Channel_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_details); }
};
/*
@@ -413,7 +410,7 @@
FMOD_RESULT setUserData (void *userdata) { return FMOD_ChannelGroup_SetUserData(this, userdata); }
FMOD_RESULT getUserData (void **userdata) { return FMOD_ChannelGroup_GetUserData(this, userdata); }
- FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array) { return FMOD_ChannelGroup_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_array); }
+ FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) { return FMOD_ChannelGroup_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_details); }
};
/*
@@ -451,7 +448,7 @@
FMOD_RESULT setUserData (void *userdata) { return FMOD_SoundGroup_SetUserData(this, userdata); }
FMOD_RESULT getUserData (void **userdata) { return FMOD_SoundGroup_GetUserData(this, userdata); }
- FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array) { return FMOD_SoundGroup_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_array); }
+ FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) { return FMOD_SoundGroup_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_details); }
};
/*
@@ -504,7 +501,7 @@
FMOD_RESULT setUserData (void *userdata) { return FMOD_DSP_SetUserData(this, userdata); }
FMOD_RESULT getUserData (void **userdata) { return FMOD_DSP_GetUserData(this, userdata); }
- FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array) { return FMOD_DSP_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_array); }
+ FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) { return FMOD_DSP_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_details); }
};
@@ -531,7 +528,7 @@
FMOD_RESULT setUserData (void *userdata) { return FMOD_DSPConnection_SetUserData(this, userdata); }
FMOD_RESULT getUserData (void **userdata) { return FMOD_DSPConnection_GetUserData(this, userdata); }
- FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array) { return FMOD_DSPConnection_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_array); }
+ FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) { return FMOD_DSPConnection_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_details); }
};
@@ -574,7 +571,7 @@
FMOD_RESULT setUserData (void *userdata) { return FMOD_Geometry_SetUserData(this, userdata); }
FMOD_RESULT getUserData (void **userdata) { return FMOD_Geometry_GetUserData(this, userdata); }
- FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array) { return FMOD_Geometry_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_array); }
+ FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) { return FMOD_Geometry_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_details); }
};
@@ -604,7 +601,7 @@
FMOD_RESULT setUserData (void *userdata) { return FMOD_Reverb_SetUserData(this, userdata); }
FMOD_RESULT getUserData (void **userdata) { return FMOD_Reverb_GetUserData(this, userdata); }
- FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, unsigned int *memoryused_array) { return FMOD_Reverb_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_array); }
+ FMOD_RESULT getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) { return FMOD_Reverb_GetMemoryInfo(this, memorybits, event_memorybits, memoryused, memoryused_details); }
};
}
diff -r 328a5e1159b3 -r b581638b1ee3 src/sound/fmodsound.cpp
--- a/src/sound/fmodsound.cpp Wed Dec 28 15:49:42 2022 -0400
+++ b/src/sound/fmodsound.cpp Wed Dec 28 23:26:52 2022 -0400
@@ -47,7 +47,7 @@
// [BB] FreeBSD doesn't accept malloc.h anymore.
#if defined(__APPLE__) || defined(__FreeBSD__)
#include <stdlib.h>
-#elif __sun
+#elif defined(__sun) || defined(__CYGWIN__)
#include <alloca.h>
#else
#include <malloc.h>
|