RetroAchievements hardcore support (#716)

* enable hardcore mode

* more
This commit is contained in:
Logan McNaughton
2026-04-08 13:57:18 -06:00
committed by GitHub
parent 6ed53e4e9d
commit 601713e102
4 changed files with 16 additions and 2 deletions
+1
View File
@@ -12,6 +12,7 @@ on:
env:
CARGO_TERM_COLOR: always
RA_HARDCORE: ${{ github.ref_type == 'tag' && 'true' || 'false' }}
jobs:
build-linux:
+9
View File
@@ -272,6 +272,15 @@ fn main() {
let git_hash = String::from_utf8(git_output.stdout).unwrap();
println!("cargo:rustc-env=GIT_HASH={git_hash}");
println!("cargo:rerun-if-env-changed=NETPLAY_ID");
let netplay_id = std::env::var("NETPLAY_ID").unwrap_or("gopher64".to_string());
println!("cargo:rustc-env=NETPLAY_ID={netplay_id}");
println!("cargo:rerun-if-env-changed=RA_HARDCORE");
println!("cargo:rustc-check-cfg=cfg(ra_hardcore_enabled)");
if let Ok(ra_hardcore) = std::env::var("RA_HARDCORE")
&& ra_hardcore.to_lowercase() == "true"
{
println!("cargo:rustc-cfg=ra_hardcore_enabled");
}
}
+5 -1
View File
@@ -158,7 +158,11 @@ async fn main() -> std::io::Result<()> {
.unwrap_or_default()
};
retroachievements::init_client(false); //args.ra_hardcore
if cfg!(ra_hardcore_enabled) {
retroachievements::init_client(args.ra_hardcore);
} else {
retroachievements::init_client(false);
}
let mut shutdown_tx = None;
if let Some(peer_addr) = args.netplay_peer_addr
+1 -1
View File
@@ -41,7 +41,7 @@ export component RetroAchievements inherits Page {
HorizontalBox {
alignment: center;
CheckBox {
text: @tr("Hardcore mode (not currently supported)");
text: @tr("Hardcore mode");
checked: RAData.hardcore;
enabled: RAData.enabled;
toggled => {