Skip to content

Commit 7ed0119

Browse files
authored
Update to Steamworks 1.61 (#19)
* Update to Steamworks 1.61 * Update docs, add `LobbyEnter_t` as callback
1 parent 7360e60 commit 7ed0119

File tree

492 files changed

+58952
-11182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

492 files changed

+58952
-11182
lines changed

.github/workflows/test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,31 @@ on:
99
jobs:
1010
macos:
1111
name: macOS SPM unit tests
12-
runs-on: macos-14
12+
runs-on: macos-15
1313
steps:
1414
- uses: actions/checkout@v4
1515
with:
1616
submodules: true
1717
persist-credentials: false
1818
- uses: maxim-lobanov/setup-xcode@v1
1919
with:
20-
xcode-version: '16.0'
20+
xcode-version: '16.1'
2121
- name: Set up SDK
2222
run: cd sdk && sudo make install
2323
- name: Run tests
2424
run: swift test
2525

2626
macos_raw:
2727
name: macOS raw build
28-
runs-on: macos-14
28+
runs-on: macos-15
2929
steps:
3030
- uses: actions/checkout@v4
3131
with:
3232
submodules: true
3333
persist-credentials: false
3434
- uses: maxim-lobanov/setup-xcode@v1
3535
with:
36-
xcode-version: '16.0'
36+
xcode-version: '16.1'
3737
- name: Raw build
3838
run: swift build
3939

.jazzy.yaml

+13-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ build_tool_arguments:
2222
- "-I${PWD}/sdk/public"
2323
- "-Xlinker"
2424
- "-lc++"
25-
title: Steamworks v1.0.0
26-
module_version: 1.0.0
25+
title: Steamworks v1.1.0
26+
module_version: 1.1.0
2727
topic_style: source-order-defs
2828
hide_coverage: true
2929
undocumented_text: ""
@@ -289,7 +289,6 @@ custom_groups:
289289
children:
290290
- GameServerItem
291291
- LobbyCreated
292-
- LobbyEnter
293292
- LobbyMatchList
294293
- ServerNetAdr
295294
- name: Callbacks
@@ -299,6 +298,7 @@ custom_groups:
299298
- LobbyChatMsg
300299
- LobbyChatUpdate
301300
- LobbyDataUpdate
301+
- LobbyEnter
302302
- LobbyGameCreated
303303
- LobbyInvite
304304
- LobbyKicked
@@ -530,10 +530,17 @@ custom_groups:
530530
- name: Interfaces
531531
children:
532532
- SteamTimeline
533+
- name: Simple types
534+
children:
535+
- TimelineEventHandle
533536
- name: Enumerations and Option Sets
534537
children:
535538
- TimelineEventClipPriority
536539
- TimelineGameMode
540+
- name: Structures
541+
children:
542+
- SteamTimelineEventRecordingExists
543+
- SteamTimelineGamePhaseRecordingExists
537544
- name: SteamUGC
538545
topics:
539546
- name: Interfaces
@@ -630,12 +637,12 @@ custom_groups:
630637
- LeaderboardScoresDownloaded
631638
- LeaderboardUGCSet
632639
- NumberOfCurrentPlayers
640+
- UserStatsReceived
633641
- name: Callbacks
634642
children:
635643
- PS3TrophiesInstalled
636644
- UserAchievementIconFetched
637645
- UserAchievementStored
638-
- UserStatsReceived
639646
- UserStatsStored
640647
- UserStatsUnloaded
641648
- name: SteamUtils
@@ -671,6 +678,8 @@ custom_groups:
671678
- SteamVideo
672679
- name: Callbacks
673680
children:
681+
- BroadcastUploadStart
682+
- BroadcastUploadStop
674683
- GetOPFSettingsResult
675684
- GetVideoURLResult
676685
- name: Common Types

DocIndex/docc-steambase-callbacks.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
- ``onAppResumingFromSuspend(_:)``
55
- ``onAvailableBeaconLocationsUpdated(_:)``
66
- ``onAvatarImageLoaded(_:)``
7+
- ``onBroadcastUploadStart(_:)``
8+
- ``onBroadcastUploadStop(_:)``
79
- ``onClientGameServerDeny(_:)``
810
- ``onDlcInstalled(_:)``
911
- ``onDownloadItemResult(_:)``
@@ -68,6 +70,7 @@
6870
- ``onLobbyChatMsg(_:)``
6971
- ``onLobbyChatUpdate(_:)``
7072
- ``onLobbyDataUpdate(_:)``
73+
- ``onLobbyEnter(_:)``
7174
- ``onLobbyGameCreated(_:)``
7275
- ``onLobbyInvite(_:)``
7376
- ``onLobbyKicked(_:)``
@@ -136,7 +139,6 @@
136139
- ``onUnreadChatMessagesChanged(_:)``
137140
- ``onUserAchievementIconFetched(_:)``
138141
- ``onUserAchievementStored(_:)``
139-
- ``onUserStatsReceived(_:)``
140142
- ``onUserStatsStored(_:)``
141143
- ``onUserStatsUnloaded(_:)``
142144
- ``onUserSubscribedItemsListChanged(_:)``
@@ -149,6 +151,8 @@
149151
- ``appResumingFromSuspend``
150152
- ``availableBeaconLocationsUpdated``
151153
- ``avatarImageLoaded``
154+
- ``broadcastUploadStart``
155+
- ``broadcastUploadStop``
152156
- ``clientGameServerDeny``
153157
- ``dlcInstalled``
154158
- ``downloadItemResult``
@@ -213,6 +217,7 @@
213217
- ``lobbyChatMsg``
214218
- ``lobbyChatUpdate``
215219
- ``lobbyDataUpdate``
220+
- ``lobbyEnter``
216221
- ``lobbyGameCreated``
217222
- ``lobbyInvite``
218223
- ``lobbyKicked``
@@ -281,7 +286,6 @@
281286
- ``unreadChatMessagesChanged``
282287
- ``userAchievementIconFetched``
283288
- ``userAchievementStored``
284-
- ``userStatsReceived``
285289
- ``userStatsStored``
286290
- ``userStatsUnloaded``
287291
- ``userSubscribedItemsListChanged``

DocIndex/jazzy-custom-groups.yaml

+11-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@
258258
children:
259259
- GameServerItem
260260
- LobbyCreated
261-
- LobbyEnter
262261
- LobbyMatchList
263262
- ServerNetAdr
264263
- name: Callbacks
@@ -268,6 +267,7 @@
268267
- LobbyChatMsg
269268
- LobbyChatUpdate
270269
- LobbyDataUpdate
270+
- LobbyEnter
271271
- LobbyGameCreated
272272
- LobbyInvite
273273
- LobbyKicked
@@ -499,10 +499,17 @@
499499
- name: Interfaces
500500
children:
501501
- SteamTimeline
502+
- name: Simple types
503+
children:
504+
- TimelineEventHandle
502505
- name: Enumerations and Option Sets
503506
children:
504507
- TimelineEventClipPriority
505508
- TimelineGameMode
509+
- name: Structures
510+
children:
511+
- SteamTimelineEventRecordingExists
512+
- SteamTimelineGamePhaseRecordingExists
506513
- name: SteamUGC
507514
topics:
508515
- name: Interfaces
@@ -599,12 +606,12 @@
599606
- LeaderboardScoresDownloaded
600607
- LeaderboardUGCSet
601608
- NumberOfCurrentPlayers
609+
- UserStatsReceived
602610
- name: Callbacks
603611
children:
604612
- PS3TrophiesInstalled
605613
- UserAchievementIconFetched
606614
- UserAchievementStored
607-
- UserStatsReceived
608615
- UserStatsStored
609616
- UserStatsUnloaded
610617
- name: SteamUtils
@@ -640,6 +647,8 @@
640647
- SteamVideo
641648
- name: Callbacks
642649
children:
650+
- BroadcastUploadStart
651+
- BroadcastUploadStop
643652
- GetOPFSettingsResult
644653
- GetVideoURLResult
645654
- name: Common Types

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
![macOS](https://shields.io/badge/platform-macOS%20|%20Linux%20|%20%3F%3F-lightgrey)
2-
![Steamworks 1.60](https://shields.io/badge/steamworks-1.60-lightgrey)
2+
![Steamworks 1.61](https://shields.io/badge/steamworks-1.61-lightgrey)
33
[![Test](https://github.com/johnfairh/steamworks-swift/actions/workflows/test.yml/badge.svg)](https://github.com/johnfairh/steamworks-swift/actions/workflows/test.yml)
44
![MIT](https://shields.io/badge/license-MIT-black)
55

@@ -246,9 +246,9 @@ executors to look after gameservers or lower-priority work.
246246
## How To Use This Project
247247

248248
Prereqs:
249-
* Needs Swift 6 beta (Xcode 16 beta)
249+
* Needs Swift 6 beta (Xcode 16+)
250250
* Needs Steam client installed (and logged-in, running for the tests or to do anything useful)
251-
* I'm using macOS 14; should work on Linux; might work on Windows eventually
251+
* I'm using macOS 15; should work on Linux; might work on Windows eventually
252252

253253
Install the Steamworks SDK:
254254
* Clone [steamworks-swift-sdk](https://github.com/johnfairh/steamworks-swift-sdk)
@@ -264,7 +264,7 @@ import PackageDescription
264264
let package = Package(
265265
name: "MySteamApp",
266266
platforms: [
267-
.macOS("14.0"),
267+
.macOS("15.0"),
268268
],
269269
dependencies: [
270270
.package(url: "https://github.com/johnfairh/steamworks-swift", from: "1.0.0"),

Sources/CSteamworks/Generated/steam_struct_shims.h

+7
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,13 @@ static inline const char * _Nonnull SteamRemotePlayTogetherGuestInvite_t_m_szCon
260260
return s->m_szConnectURL;
261261
}
262262

263+
__attribute__((swift_name("getter:SteamTimelineGamePhaseRecordingExists_t.m_rgchPhaseID_ptr(self:)")))
264+
static inline const char * _Nonnull SteamTimelineGamePhaseRecordingExists_t_m_rgchPhaseID_ptr(const SteamTimelineGamePhaseRecordingExists_t * _Nonnull s)
265+
{
266+
const_cast<SteamTimelineGamePhaseRecordingExists_t *>(s)->m_rgchPhaseID[63] = 0;
267+
return s->m_rgchPhaseID;
268+
}
269+
263270
__attribute__((swift_name("getter:SteamUGCDetails_t.m_rgchTitle_ptr(self:)")))
264271
static inline const char * _Nonnull SteamUGCDetails_t_m_rgchTitle_ptr(const SteamUGCDetails_t * _Nonnull s)
265272
{

Sources/LibGenerate/Callbacks.swift

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ struct Callbacks {
3030
}
3131
if let cb = method.callback {
3232
explicitCallbacks.insert(cb)
33+
print("Add ExCB: \(cb)")
3334
}
3435
}
3536
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.60
1+
1.61

Sources/LibGenerate/Resources/steam_api_patch.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,8 @@ methods:
538538
type: RTime32
539539
unFlags:
540540
type: EFavoriteFlags
541+
SteamAPI_ISteamMatchmaking_CreateLobby:
542+
callback: LobbyEnter_t
541543
SteamAPI_ISteamMatchmaking_DeleteLobbyData:
542544
discardable_result: true
543545
SteamAPI_ISteamMatchmaking_GetFavoriteGame:

Sources/Steamworks/Documentation.docc/Generated/SteamMatchmaking Interface.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
### Structures
1919
- ``GameServerItem``
2020
- ``LobbyCreated``
21-
- ``LobbyEnter``
2221
- ``LobbyMatchList``
2322
- ``ServerNetAdr``
2423

@@ -28,6 +27,7 @@
2827
- ``LobbyChatMsg``
2928
- ``LobbyChatUpdate``
3029
- ``LobbyDataUpdate``
30+
- ``LobbyEnter``
3131
- ``LobbyGameCreated``
3232
- ``LobbyInvite``
3333
- ``LobbyKicked``

Sources/Steamworks/Documentation.docc/Generated/SteamTimeline Interface.md

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
### Interfaces
66
- ``SteamTimeline``
77

8+
### Simple types
9+
- ``TimelineEventHandle``
10+
811
### Enumerations and Option Sets
912
- ``TimelineEventClipPriority``
1013
- ``TimelineGameMode``
14+
15+
### Structures
16+
- ``SteamTimelineEventRecordingExists``
17+
- ``SteamTimelineGamePhaseRecordingExists``

Sources/Steamworks/Documentation.docc/Generated/SteamUserStats Interface.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
- ``LeaderboardScoresDownloaded``
2525
- ``LeaderboardUGCSet``
2626
- ``NumberOfCurrentPlayers``
27+
- ``UserStatsReceived``
2728

2829
### Callbacks
2930
- ``PS3TrophiesInstalled``
3031
- ``UserAchievementIconFetched``
3132
- ``UserAchievementStored``
32-
- ``UserStatsReceived``
3333
- ``UserStatsStored``
3434
- ``UserStatsUnloaded``

Sources/Steamworks/Documentation.docc/Generated/SteamVideo Interface.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
- ``SteamVideo``
77

88
### Callbacks
9+
- ``BroadcastUploadStart``
10+
- ``BroadcastUploadStop``
911
- ``GetOPFSettingsResult``
1012
- ``GetVideoURLResult``

Sources/Steamworks/Documentation.docc/SteamBaseAPI.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
- ``onAppResumingFromSuspend(_:)``
2626
- ``onAvailableBeaconLocationsUpdated(_:)``
2727
- ``onAvatarImageLoaded(_:)``
28+
- ``onBroadcastUploadStart(_:)``
29+
- ``onBroadcastUploadStop(_:)``
2830
- ``onClientGameServerDeny(_:)``
2931
- ``onDlcInstalled(_:)``
3032
- ``onDownloadItemResult(_:)``
@@ -157,7 +159,6 @@
157159
- ``onUnreadChatMessagesChanged(_:)``
158160
- ``onUserAchievementIconFetched(_:)``
159161
- ``onUserAchievementStored(_:)``
160-
- ``onUserStatsReceived(_:)``
161162
- ``onUserStatsStored(_:)``
162163
- ``onUserStatsUnloaded(_:)``
163164
- ``onUserSubscribedItemsListChanged(_:)``
@@ -170,6 +171,8 @@
170171
- ``appResumingFromSuspend``
171172
- ``availableBeaconLocationsUpdated``
172173
- ``avatarImageLoaded``
174+
- ``broadcastUploadStart``
175+
- ``broadcastUploadStop``
173176
- ``clientGameServerDeny``
174177
- ``dlcInstalled``
175178
- ``downloadItemResult``
@@ -302,7 +305,6 @@
302305
- ``unreadChatMessagesChanged``
303306
- ``userAchievementIconFetched``
304307
- ``userAchievementStored``
305-
- ``userStatsReceived``
306308
- ``userStatsStored``
307309
- ``userStatsUnloaded``
308310
- ``userSubscribedItemsListChanged``

Sources/Steamworks/Generated/Constants.swift

+6
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ public enum SteamConstants {
6464
/// Steamworks `k_nMaxLobbyKeyLength`
6565
public static let maxLobbyKeyLength = Int(255)
6666

67+
/// Steamworks `k_cchMaxPhaseIDLength`
68+
public static let maxPhaseIDSize = Int(64)
69+
6770
/// Steamworks `k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData`
6871
public static let maxSteamDatagramGameCoordinatorServerLoginAppDataSize = Int(2048)
6972

@@ -145,6 +148,9 @@ public enum SteamConstants {
145148
/// Steamworks `k_cchTagListMax`
146149
public static let tagListMaxSize = Int(1024 + 1)
147150

151+
/// Steamworks `k_unTimelinePriority_KeepCurrentValue`
152+
public static let timelinePriorityKeepCurrentValue = Int(1000000)
153+
148154
/// Steamworks `k_cubUFSTagValueMax`
149155
public static let ufsTagValueMaxSize = Int(255)
150156

0 commit comments

Comments
 (0)