3 Commits

Author SHA1 Message Date
Ethan Lee 391148415c Network: Update to latest Steamworks SDK ABI.
This is mostly to support AArch64.
2026-07-15 10:12:36 -04:00
Ethan Lee 05a5abbfbd CMake: Rework Linux RPATH generation.
This is mostly to fix the AArch64 rpath. i686 will be different after this
change, but I haven't been shipping that architecture for a while now...

Also, took out BIN_LIBROOT which wasn't doing anything, woops!
2026-07-15 10:05:51 -04:00
NyakoFox 8c70c9eb97 Set id and loose_extra fields no matter what
The PR #1278 seems to have introduced a segfault. When an empty music
track is found, it skips past `id` (and `loose_extra`) being set.
Functions which use `id` expect a string, not NULL, causing a crash
whenever `isextra` is called, which happens to be every time the
`music` or `play` commands are invoked.

This fix simply moves the setting of these variables upwards, BEFORE
the valid check, to make sure they're always set.
2026-05-14 18:15:43 -04:00
3 changed files with 24 additions and 17 deletions
+8 -8
View File
@@ -51,18 +51,18 @@ endif()
# RPATH
if(NOT WIN32)
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
set(BIN_LIBROOT "Frameworks")
set(BIN_RPATH "@executable_path/Frameworks")
elseif(APPLE)
set(BIN_LIBROOT "osx")
set(BIN_RPATH "@executable_path/osx")
elseif(CMAKE_SIZEOF_VOID_P MATCHES "8")
set(BIN_LIBROOT "lib64")
set(BIN_RPATH "\$ORIGIN/lib64")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--disable-new-dtags")
else()
set(BIN_LIBROOT "lib")
set(BIN_RPATH "\$ORIGIN/lib")
SET(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-Wl,--disable-new-dtags")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
# Naming quirk for backward compatibility
SET(BIN_RPATH "\$ORIGIN/lib64")
else()
SET(BIN_RPATH "\$ORIGIN/lib${CMAKE_SYSTEM_PROCESSOR}")
endif()
endif()
set(CMAKE_SKIP_BUILD_RPATH TRUE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+4 -3
View File
@@ -381,6 +381,10 @@ public:
MusicTrack(SDL_RWops *rw, const char* _id, bool _loose_extra)
{
SDL_zerop(this);
id = SDL_strdup(_id);
loose_extra = _loose_extra;
if (rw->size(rw) <= 1)
{
// Don't bother
@@ -393,9 +397,6 @@ public:
stb_vorbis_info vorbis_info;
stb_vorbis_comment vorbis_comment;
id = SDL_strdup(_id);
loose_extra = _loose_extra;
vorbis = stb_vorbis_open_memory(read_buf, rw->size(rw), &err, NULL);
if (vorbis == NULL)
{
+12 -6
View File
@@ -10,8 +10,8 @@
/* Steamworks interface versions */
#define VVVVVV_STEAMCLIENT "SteamClient017"
#define VVVVVV_STEAMUSERSTATS "STEAMUSERSTATS_INTERFACE_VERSION011"
#define VVVVVV_STEAMCLIENT "SteamClient023"
#define VVVVVV_STEAMUSERSTATS "STEAMUSERSTATS_INTERFACE_VERSION013"
#define VVVVVV_STEAMSCREENSHOTS "STEAMSCREENSHOTS_INTERFACE_VERSION003"
/* Shared object file name */
@@ -45,8 +45,16 @@ struct SteamAPICallCompleted_t
uint32_t m_cubParam;
};
typedef enum ESteamAPIInitResult
{
k_ESteamAPIInitResult_OK = 0,
k_ESteamAPIInitResult_FailedGeneric = 1,
k_ESteamAPIInitResult_NoSteamClient = 2,
k_ESteamAPIInitResult_VersionMismatch = 3,
} ESteamAPIInitResult;
#define FUNC_LIST \
FOREACH_FUNC(uint8_t, SteamAPI_Init, (void)) \
FOREACH_FUNC(ESteamAPIInitResult, SteamAPI_InitFlat, (void*)) \
FOREACH_FUNC(void, SteamAPI_Shutdown, (void)) \
FOREACH_FUNC(void, SteamAPI_RunCallbacks, (void)) \
FOREACH_FUNC(struct ISteamClient*, SteamInternal_CreateInterface, (const char*)) \
@@ -58,7 +66,6 @@ struct SteamAPICallCompleted_t
int32_t, \
const char* \
)) \
FOREACH_FUNC(uint8_t, SteamAPI_ISteamUserStats_RequestCurrentStats, (struct ISteamUserStats*)) \
FOREACH_FUNC(uint8_t, SteamAPI_ISteamUserStats_StoreStats, (struct ISteamUserStats*)) \
FOREACH_FUNC(uint8_t, SteamAPI_ISteamUserStats_SetAchievement, ( \
struct ISteamUserStats*, \
@@ -177,7 +184,7 @@ int32_t STEAM_init(void)
FUNC_LIST
#undef FOREACH_FUNC
if (!SteamAPI_Init())
if (SteamAPI_InitFlat(NULL) != k_ESteamAPIInitResult_OK)
{
vlog_error("Steamworks not initialized!");
ClearPointers();
@@ -207,7 +214,6 @@ int32_t STEAM_init(void)
ClearPointers();
return 0;
}
SteamAPI_ISteamUserStats_RequestCurrentStats(steamUserStats);
steamScreenshots = SteamAPI_ISteamClient_GetISteamScreenshots(
steamClient,
steamUser,