Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@ on:
jobs:
release:
name: build release
runs-on: windows-2022
runs-on: windows-2025-vs2026
timeout-minutes: 30
steps:
#checkout project
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# setup msbuild
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
uses: microsoft/setup-msbuild@v2

# missionchooser.dll
- name: Build missionchooser.dll
working-directory: src/game/missionchooser
run: MSBuild.exe swarm_sdk_missionchooser.vcxproj -property:Configuration=Release
run: MSBuild.exe swarm_sdk_missionchooser.vcxproj -property:Configuration=Release -property:Platform=Win32

# server.dll
- name: Build server.dll
working-directory: src/game/server
run: MSBuild.exe swarm_sdk_server.vcxproj -property:Configuration=Release
run: MSBuild.exe swarm_sdk_server.vcxproj -property:Configuration=Release -property:Platform=Win32

# client.dll
- name: Build client.dll
working-directory: src/game/client
run: MSBuild.exe swarm_sdk_client.vcxproj -property:Configuration=Release
run: MSBuild.exe swarm_sdk_client.vcxproj -property:Configuration=Release -property:Platform=Win32

# store artifacts
# make sure retention is low, this can become huge otherwise
Expand All @@ -54,30 +54,30 @@ jobs:

debug:
name: build debug
runs-on: windows-2022
runs-on: windows-2025-vs2026
timeout-minutes: 30
steps:
#checkout project
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# setup msbuild
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
uses: microsoft/setup-msbuild@v2

# missionchooser.dll
- name: Build missionchooser.dll
working-directory: src/game/missionchooser
run: MSBuild.exe swarm_sdk_missionchooser.vcxproj -property:Configuration=Debug
run: MSBuild.exe swarm_sdk_missionchooser.vcxproj -property:Configuration=Debug -property:Platform=Win32

# server.dll
- name: Build server.dll
working-directory: src/game/server
run: MSBuild.exe swarm_sdk_server.vcxproj -property:Configuration=Debug
run: MSBuild.exe swarm_sdk_server.vcxproj -property:Configuration=Debug -property:Platform=Win32

# client.dll
- name: Build client.dll
working-directory: src/game/client
run: MSBuild.exe swarm_sdk_client.vcxproj -property:Configuration=Debug
run: MSBuild.exe swarm_sdk_client.vcxproj -property:Configuration=Debug -property:Platform=Win32

# store artifacts
# make sure retention is low, this can become huge otherwise
Expand Down
10 changes: 9 additions & 1 deletion src/game/client/swarm/rd_tooltip_fix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ static class CRD_Tooltip_Fix final : public CAutoGameSystem
// There's only one method in the vtable, so let's just grab it.
auto pApplySchemeSettings = **reinterpret_cast< void( vgui::Tooltip:: *const *const * )( vgui::IScheme * ) >( pTooltip );

byte *pRealFunc = *reinterpret_cast< byte *const * >( &pApplySchemeSettings );
#ifdef _DEBUG
// This is a thunk, so we need to grab the real one.
byte *pThunk = *reinterpret_cast<byte *const *>( &pApplySchemeSettings );
Assert( *pThunk == 0xE9 );
byte *pRealFunc = pThunk + 5 + *reinterpret_cast<const intptr_t *>( pThunk + 1 );
#else
// ...except in release builds, where it's not a thunk.
byte *pRealFunc = *reinterpret_cast<byte *const *>( &pApplySchemeSettings );
#endif
Assert( *pRealFunc == 0xB9 );

// Grab the TextEntry handle that is read at the start of the method.
Expand Down
6 changes: 6 additions & 0 deletions src/game/client/swarm/vgui/rd_vgui_settings_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ static class CRD_VideoConfigVariableListHack : public CAutoGameSystem
// Instead, we have to do this garbage:
const byte *pUpdateCurrentVideoConfig = reinterpret_cast< const byte * >( &UpdateCurrentVideoConfig );

#ifdef _DEBUG
// Gotta deal with thunks on debug builds.
Assert( *pUpdateCurrentVideoConfig == 0xE9 );
pUpdateCurrentVideoConfig += 5 + *reinterpret_cast<const intptr_t *>( pUpdateCurrentVideoConfig + 1 );
#endif

struct VideoConfigSetting_t
{
const char *m_szName;
Expand Down
246 changes: 140 additions & 106 deletions src/game/client/swarm_sdk_client.vcxproj

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion src/game/client/swarm_sdk_client.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -2262,7 +2262,16 @@
<Library Include="videoservices\lib\win32\vorbis.lib">
<Filter>videoservices\lib</Filter>
</Library>
<Library Include="videoservices\lib\win32\vpxmt.lib">
<Library Include="videoservices\lib\win32\vpx_mt.lib">
<Filter>videoservices\lib</Filter>
</Library>
<Library Include="videoservices\lib\win32\webm_mt.lib">
<Filter>videoservices\lib</Filter>
</Library>
<Library Include="videoservices\lib\win32\debug\vpx_mtd.lib">
<Filter>videoservices\lib</Filter>
</Library>
<Library Include="videoservices\lib\win32\debug\webm_mtd.lib">
<Filter>videoservices\lib</Filter>
</Library>
</ItemGroup>
Expand Down
34 changes: 28 additions & 6 deletions src/game/client/videoservices/includes/vpx/vp8cx.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ enum vp8e_enc_control_id {
*
* \note Valid range for VP8: -16..16
* \note Valid range for VP9: -9..9
* \note A negative value (-n) is treated as its absolute value (n) in VP9.
*
* Supported in codecs: VP8, VP9
*/
Expand Down Expand Up @@ -302,7 +303,7 @@ enum vp8e_enc_control_id {
* the feature is off, i.e., no golden frame boost in CBR mode and
* average bitrate target is used.
*
* For example, to allow 100% more bits, i.e, 2X, in a golden frame
* For example, to allow 100% more bits, i.e., 2X, in a golden frame
* than average frame, set this to 100.
*
* Supported in codecs: VP9
Expand Down Expand Up @@ -598,7 +599,7 @@ enum vp8e_enc_control_id {
* the feature is off, i.e., no golden frame boost in CBR mode and
* average bitrate target is used.
*
* For example, to allow 100% more bits, i.e, 2X, in a golden frame
* For example, to allow 100% more bits, i.e., 2X, in a golden frame
* than average frame, set this to 100.
*
* Supported in codecs: VP8
Expand Down Expand Up @@ -672,7 +673,7 @@ enum vp8e_enc_control_id {
*/
VP9E_SET_TPL,

/*!\brief Codec control function to enable postencode frame drop.
/*!\brief Codec control function to enable post encode frame drop.
*
* This will allow encoder to drop frame after it's encoded.
*
Expand Down Expand Up @@ -767,6 +768,24 @@ enum vp8e_enc_control_id {
*
*/
VP9E_SET_QUANTIZER_ONE_PASS,

/*!\brief Codec control function to enable key frame temporal filtering.
*
* Vp9 allows the encoder to run key frame temporal filtering and use it to
* improve the compression performance. To enable, set this parameter to be
* 1. The default value is set to be 0.
*/
VP9E_SET_KEY_FRAME_FILTERING,

/*!\brief Codec control function to validate HBD input.
*
* VP9 allows the encoder to validate the high bitdepth (HBD) input and
* ensure that every pixel is within the valid range. To disable/enable,
* set this parameter to 0/1. The default value is set to be 1.
*
* Supported in codecs: VP9
*/
VP9E_SET_VALIDATE_HBD_INPUT,
};

/*!\brief vpx 1-D scaling mode
Expand All @@ -793,8 +812,7 @@ typedef enum vp9e_temporal_layering_mode {
VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING = 0,

/*!\brief Bypass mode.
* Used when application needs to control temporal layering.
* This will only work when the number of spatial layers equals 1.
* Used when application needs to control spatial and temporal layering.
*/
VP9E_TEMPORAL_LAYERING_MODE_BYPASS = 1,

Expand Down Expand Up @@ -868,7 +886,7 @@ typedef enum {
VP8_EIGHT_TOKENPARTITION = 3
} vp8e_token_partitions;

/*!brief VP9 encoder content type */
/*!\brief VP9 encoder content type */
typedef enum {
VP9E_CONTENT_DEFAULT,
VP9E_CONTENT_SCREEN,
Expand Down Expand Up @@ -1097,6 +1115,10 @@ VPX_CTRL_USE_TYPE(VP8E_SET_RTC_EXTERNAL_RATECTRL, int)
#define VPX_CTRL_VP8E_SET_RTC_EXTERNAL_RATECTRL
VPX_CTRL_USE_TYPE(VP9E_SET_QUANTIZER_ONE_PASS, int)
#define VPX_CTRL_VP9E_SET_QUANTIZER_ONE_PASS
VPX_CTRL_USE_TYPE(VP9E_SET_KEY_FRAME_FILTERING, int)
#define VPX_CTRL_VP9E_SET_KEY_FRAME_FILTERING
VPX_CTRL_USE_TYPE(VP9E_SET_VALIDATE_HBD_INPUT, int)
#define VPX_CTRL_VP9E_SET_VALIDATE_HBD_INPUT

/*!\endcond */
/*! @} - end defgroup vp8_encoder */
Expand Down
20 changes: 12 additions & 8 deletions src/game/client/videoservices/includes/vpx/vpx_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern "C" {

/*!\brief Decorator indicating a function is deprecated */
#ifndef VPX_DEPRECATED
#if defined(__GNUC__) && __GNUC__
#if defined(__GNUC__)
#define VPX_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
#define VPX_DEPRECATED
Expand All @@ -60,7 +60,7 @@ extern "C" {
#endif /* VPX_DEPRECATED */

#ifndef VPX_DECLSPEC_DEPRECATED
#if defined(__GNUC__) && __GNUC__
#if defined(__GNUC__)
#define VPX_DECLSPEC_DEPRECATED /**< \copydoc #VPX_DEPRECATED */
#elif defined(_MSC_VER)
/*!\brief \copydoc #VPX_DEPRECATED */
Expand Down Expand Up @@ -318,19 +318,21 @@ const char *vpx_codec_err_to_string(vpx_codec_err_t err);
* \param[in] ctx Pointer to this instance's context.
*
*/
const char *vpx_codec_error(vpx_codec_ctx_t *ctx);
const char *vpx_codec_error(const vpx_codec_ctx_t *ctx);

/*!\brief Retrieve detailed error information for codec context
*
* Returns a human readable string providing detailed information about
* the last error.
* the last error. The returned string is only valid until the next
* vpx_codec_* function call (except vpx_codec_error and
* vpx_codec_error_detail) on the codec context.
*
* \param[in] ctx Pointer to this instance's context.
*
* \retval NULL
* No detailed information is available.
*/
const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx);
const char *vpx_codec_error_detail(const vpx_codec_ctx_t *ctx);

/* REQUIRED FUNCTIONS
*
Expand All @@ -345,9 +347,11 @@ const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx);
* \param[in] ctx Pointer to this instance's context
*
* \retval #VPX_CODEC_OK
* The codec algorithm initialized.
* \retval #VPX_CODEC_MEM_ERROR
* Memory allocation failed.
* The codec instance has been destroyed.
* \retval #VPX_CODEC_INVALID_PARAM
* ctx is a null pointer.
* \retval #VPX_CODEC_ERROR
* Codec context not initialized.
*/
vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx);

Expand Down
16 changes: 11 additions & 5 deletions src/game/client/videoservices/includes/vpx/vpx_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
extern "C" {
#endif

#include "./vpx_codec.h"
#include "./vpx_codec.h" // IWYU pragma: export
#include "./vpx_frame_buffer.h"

/*!\brief Current ABI version number
Expand Down Expand Up @@ -60,7 +60,7 @@ extern "C" {
#define VPX_CODEC_CAP_INPUT_FRAGMENTS 0x100000
/*!\brief Can support frame-based multi-threading */
#define VPX_CODEC_CAP_FRAME_THREADING 0x200000
/*!brief Can support external frame buffers */
/*!\brief Can support external frame buffers */
#define VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER 0x400000

/*! \brief Initialization-time Feature Enabling
Expand Down Expand Up @@ -120,14 +120,18 @@ typedef struct vpx_codec_dec_cfg {
* is not thread safe and should be guarded with a lock if being used
* in a multithreaded context.
*
* On success, vpx_codec_destroy() must be used to free resources allocated for
* the decoder context. If vpx_codec_dec_init_ver() fails, it is not necessary
* to call vpx_codec_destroy() on the decoder context.
*
* \param[in] ctx Pointer to this instance's context.
* \param[in] iface Pointer to the algorithm interface to use.
* \param[in] cfg Configuration to use, if known. May be NULL.
* \param[in] flags Bitfield of VPX_CODEC_USE_* flags
* \param[in] ver ABI version number. Must be set to
* VPX_DECODER_ABI_VERSION
* \retval #VPX_CODEC_OK
* The decoder algorithm initialized.
* The decoder algorithm has been initialized.
* \retval #VPX_CODEC_MEM_ERROR
* Memory allocation failed.
*/
Expand All @@ -152,7 +156,7 @@ vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx,
* \param[in] iface Pointer to the algorithm interface
* \param[in] data Pointer to a block of data to parse
* \param[in] data_sz Size of the data buffer
* \param[in,out] si Pointer to stream info to update. The size member
* \param[in,out] si Pointer to stream info to update. The sz member
* \ref MUST be properly initialized, but \ref MAY be
* clobbered by the algorithm. This parameter \ref MAY
* be NULL.
Expand All @@ -170,7 +174,7 @@ vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface,
* Returns information about the stream that has been parsed during decoding.
*
* \param[in] ctx Pointer to this instance's context
* \param[in,out] si Pointer to stream info to update. The size member
* \param[in,out] si Pointer to stream info to update. The sz member
* \ref MUST be properly initialized, but \ref MAY be
* clobbered by the algorithm. This parameter \ref MAY
* be NULL.
Expand Down Expand Up @@ -205,6 +209,8 @@ vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx,
* this frame.
* \param[in] deadline Soft deadline the decoder should attempt to meet,
* in us. Set to zero for unlimited.
* NOTE: The deadline parameter is ignored. Always
* pass 0.
*
* \return Returns #VPX_CODEC_OK if the coded data was processed completely
* and future pictures can be decoded without error. Otherwise,
Expand Down
Loading
Loading