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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ A **gamepad is recommended**: console games are made for one, and their menus an
E / Q Y / X, Shift / Ctrl the stick clicks, Tab View, P Menu. `keyboard_mouse` and `mouse_sensitivity` in
the game's `xcl.toml` turn it off or change the mouse speed. A gamepad and the keyboard / mouse can be
used together.
- **Window:** the game's image keeps its aspect ratio in a window of another shape (black bars; an
image that fits 1:1 is copied texel for texel). `scaling` in the game's `xcl.toml`: `"fit"`,
`"integer"` (whole multiples only), `"stretch"` (the old behaviour); `XCL_SCALING` overrides it.
- **Screen:** the window is DPI aware (sharp at 125 % / 150 % scaling; `window_width` /
`window_height` are at 100 %). In the game's `xcl.toml`: `fullscreen = true` (borderless, at the
monitor's resolution; Alt+Enter or F11 switches while it runs), `monitor` (`"primary"`, a number
from the `monitor N:` list in `xcl.log`, or `"\\.\DISPLAY2"`). `XCL_FULLSCREEN` and `XCL_MONITOR`
override them.

## Building and usage

Expand Down
1 change: 1 addition & 0 deletions crates/xcl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ features = [
"Win32_System_Com",
"Win32_System_LibraryLoader",
"Win32_System_Threading",
"Win32_UI_HiDpi",
"Win32_UI_WindowsAndMessaging",
]

Expand Down
13 changes: 13 additions & 0 deletions crates/xcl/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ pub struct Config {
/// "center" (the primary monitor's work area), or "x,y" (top-left of the window, screen
/// coordinates; clamped into the nearest monitor's work area). `XCL_WINDOW_POS` overrides.
pub window_pos: String,
/// Borderless fullscreen on `monitor` at its native resolution (Alt+Enter or F11 switches
/// while the game runs). `XCL_FULLSCREEN=1/0` overrides.
pub fullscreen: bool,
/// The monitor for fullscreen (and for a centred window): "primary", a number (1 = the
/// first in the list XCL logs at start) or a device name (`\\.\DISPLAY2`). `XCL_MONITOR` overrides.
pub monitor: String,
/// How the game's image fills the window: "fit" (aspect ratio kept, black bars – a 16:9
/// image in a 21:9 window), "integer" (whole multiples only, 1:1 pixels) or "stretch".
/// `XCL_SCALING` overrides.
pub scaling: String,
/// Answer `XUserGetTokenAndSignature*` with XCL's local placeholder token (for a backend of
/// your own that accepts it). Off: the request fails as on a console that cannot reach Xbox
/// Live (0x80072EFD), and titles go their offline way – Xbox Live's and the titles' own
Expand Down Expand Up @@ -184,6 +194,9 @@ impl Default for Config {
window_width: 1280,
window_height: 720,
window_pos: "auto".into(),
fullscreen: false,
monitor: "primary".into(),
scaling: "fit".into(),
xbox_live_tokens: false,
keyboard_mouse: true,
mouse_sensitivity: 1.0,
Expand Down
Loading
Loading