Skip to content
Open
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ XCL works only on unpacked game files you already own. It does not download, dec
| **XGameRuntime** | ✅ | the GDK thunk protocol real titles use, laid out from a table of all 396 GDK runtime functions; offline XUser, XGameSave, persistent local storage, XPackage, XGame (title id), XSystem – the title sees an Xbox Series X / S; task queues, async, networking and dialogs through the PC's XGameRuntime | the game's libHttpClient initialises; users, saves and storage through the real call path; slot layout cross-checked against the game's own thunks |
| **Input** | ✅ | GameInput: one gamepad – the PC's XInput controller or a PlayStation controller, and keyboard and mouse as a gamepad (see [Controls](#controls)) | unit tests; an Xbox controller in Minecraft; a DualShock 4 (USB) |
| **Audio** | ✅ | XAudio2 → system XAudio2.9 (PCM / float voices; Opus 0x704F decoded via `MSOpusDecoder.dll`; XMA1 / XMA2 decoded in pure Rust) | unit + end-to-end tests |
| **Spatial audio fallback** | ✅ | Titles can submit spatial audio to a silent render endpoint when Windows has no active playback device (#695) | synthetic client exercises endpoint discovery, stream timing and audio buffers |

### Graphics

Expand Down
4 changes: 4 additions & 0 deletions crates/xcl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ retour = "0.3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "1"
windows-core = "0.62"

[dependencies.windows]
version = "0.62"
Expand All @@ -35,8 +36,11 @@ features = [
"Win32_Media_MediaFoundation",
"Win32_Security",
"Win32_System_Com",
"Win32_System_Com_StructuredStorage",
"Win32_System_LibraryLoader",
"Win32_System_Threading",
"Win32_System_Variant",
"Win32_UI_Shell_PropertiesSystem",
"Win32_UI_WindowsAndMessaging",
]

Expand Down
7 changes: 7 additions & 0 deletions crates/xcl/src/hle/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub mod mfplat;
pub mod netoff;
pub mod opus;
pub mod playstation;
mod spatial_audio;
pub mod user;
pub mod xaudio2;
pub mod xma2;
Expand Down Expand Up @@ -97,6 +98,7 @@ pub const MINUSERX: &str = "minuserx.dll";
pub const ACPHAL: &str = "acphal.dll";
/// controllers (`GameInputCreate`)
pub const GAMEINPUT: &str = "gameinput.dll";
const SPATIAL_AUDIO: &str = "xcl-spatial-audio.dll";

fn build(config: &Config) -> Registry {
let mut modules = vec![
Expand All @@ -111,6 +113,7 @@ fn build(config: &Config) -> Registry {
HleModule::new(XG, xg::exports(), &[]),
HleModule::new(ACPHAL, acphal::exports(), &[]),
HleModule::new(GAMEINPUT, gameinput::exports(), &[]),
HleModule::new(SPATIAL_AUDIO, spatial_audio::exports(), &[SELF]),
];
let offline = netoff::enabled();
if offline {
Expand Down Expand Up @@ -155,6 +158,10 @@ fn build(config: &Config) -> Registry {
] {
routes.push((p.into(), Route::Hle(k)));
}
let audio = idx(SPATIAL_AUDIO);
for p in ["ole32.dll", "combase.dll"] {
routes.push((p.into(), Route::Hle(audio)));
}
let x = idx(XGAMERUNTIME);
for p in ["xgameruntime.dll", "xgameruntime*.dll", "xgameplatform.dll"] {
routes.push((p.into(), Route::Hle(x)));
Expand Down
Loading
Loading