mirror of
https://github.com/gopher64/gopher64.git
synced 2026-07-11 01:25:20 +02:00
RetroAchievements hardcore support (#716)
* enable hardcore mode * more
This commit is contained in:
@@ -12,6 +12,7 @@ on:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RA_HARDCORE: ${{ github.ref_type == 'tag' && 'true' || 'false' }}
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user